Results 1 to 7 of 7

Thread: mount network drive problem

  1. #1
    Berth_Hoffer NNTP User

    Default mount network drive problem

    Hi

    I am a Linux beginner, this is the first time I installed it, so please be gentle with your answers
    I am using OpenSuse 11.2 with KDE.

    I am trying to permanently mount a share on a network harddisk. I can mount it with the command

    mount -t cifs //IPaddress/sharename -o password= /mnt/dir

    after that the share is accessible in the specified dir.
    But now I am trying to make this automatically happening at startup. For that I put the following line in fstab:

    //IPaddress/sharename /mnt/dir cifs password=,_netdev,uid=linux_username,gid=users 0 0

    But this doesnt work, the share is not mounted after startup, and mount -a also doesnt mount it, although there is also no error msg. Is there an obvious mistake in my fstab entry?

    And a small side question: what command do I use to unmount something?

    Thanks

  2. #2
    Join Date
    Jul 2008
    Location
    Voorhout, Netherlands
    Posts
    262

    Default Re: mount network drive problem

    Berth Hoffer wrote:
    > Hi
    >
    > I am a Linux beginner, this is the first time I installed it, so please
    > be gentle with your answers
    > I am using OpenSuse 11.2 with KDE.
    >
    > I am trying to permanently mount a share on a network harddisk. I can
    > mount it with the command
    >
    > mount -t cifs //IPaddress/sharename -o password= /mnt/dir
    >
    > after that the share is accessible in the specified dir.
    > But now I am trying to make this automatically happening at startup.
    > For that I put the following line in fstab:
    >
    > //IPaddress/sharename /mnt/dir cifs
    > password=,_netdev,uid=linux_username,gid=users 0 0
    >
    > But this doesnt work, the share is not mounted after startup, and mount
    > -a also doesnt mount it, although there is also no error msg. Is there
    > an obvious mistake in my fstab entry?


    The line is fine, but you have the wrong file.
    Use /etc/samba/smbfstab instead.
    $sudo cat /etc/samba/smbfstab
    # This file allows you to mount SMB/ CIFS shares during system boot while
    # hiding passwords to other people than root.

    >
    > And a small side question: what command do I use to unmount something?


    umount /mount/point

    Theo

  3. #3
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,731
    Blog Entries
    2

    Default Re: mount network drive problem

    Does this work:
    Code:
    sudo mount -a
    Leap 42.3 & 15.1 &KDE
    FYIs from the days of yore

  4. #4
    Berth_Hoffer NNTP User

    Default Re: mount network drive problem

    Hi
    Thanks for the answers

    LittleRedRooster:
    Use /etc/samba/smbfstab instead.
    this dir and this file dont exist on my installation.

    swerdna:
    sudo mount -a
    this works. Does it mean I am doing something wrong with userrights?
    Another thing I was wondering about: does Linux try to mount this share before the wireless connection is established? I am using KNetworkManager to connect, which starts at startup, but maybe the shares in fstab are started earlier? Although I thought thats what the _netdev command is for...?

  5. #5
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,731
    Blog Entries
    2

    Default Re: mount network drive problem

    Quote Originally Posted by Berth_Hoffer View Post
    Hi
    swerdna:
    sudo mount -a
    this works. Does it mean I am doing something wrong with userrights?
    Another thing I was wondering about: does Linux try to mount this share before the wireless connection is established? I am using KNetworkManager to connect, which starts at startup, but maybe the shares in fstab are started earlier? Although I thought thats what the _netdev command is for...?
    That's indeed what the _netdev command is for.

    Unfortunately for a few years now the mount-at-boot of cifs via fstab (and also via smbfstab) is broken.

    It's such a required functionality for Linuxers who live in a world with windows that it makes me sake my head that it's just left broken -- but there it is.

    The smbfs daemon (visible in the runlevels editor in Yast, and supposedly configurable there) is also broken.

    That's the problem. Here's the workaround. You edit the root crontab and place this line into the table:
    Code:
    @reboot sleep 10;mount -a
    and it should then work. That forces a 10 sec pause

    More here: http://opensuse.swerdna.org/susecifs.html
    and here: Cron Tables (Crontab) in Suse / openSUSE [Event Scheduler for 10.x, 11.x]
    Leap 42.3 & 15.1 &KDE
    FYIs from the days of yore

  6. #6
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    23,704
    Blog Entries
    1

    Default Re: mount network drive problem

    I found this guide which explains how to use autofs as an alternative means to mount samba shares. Not sure about pros vs cons, but interesting all the same.

  7. #7
    Join Date
    Jul 2008
    Location
    Voorhout, Netherlands
    Posts
    262

    Default Re: mount network drive problem

    Berth Hoffer wrote:
    > Hi
    > Thanks for the answers
    >
    > LittleRedRooster:
    > Use /etc/samba/smbfstab instead.
    > this dir and this file dont exist on my installation.


    > $rpm -qf /etc/samba/smbfstab

    samba-client-3.2.7-11.3.2

    Theo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •