Results 1 to 3 of 3

Thread: Mounting NAS using cifs at startup problem, help!

  1. #1

    Default Mounting NAS using cifs at startup problem, help!

    Mounting NAS using cifs at startup problem


    Hi Everyone,

    I'm trying to mount a network drive at startup so I can have access to my remotely stored music. I know there are other detailed threads on this and I've read them and followed the instructions but I'm still unable to get it to work. This is the situation so far:

    - I'm using Suse 11.1 64 bit on my samsung q310 laptop

    - I want to connect to a QNAP NAS that lives on my network

    - I can connect manually from the command line using:

    mount -t cifs -o username=admin,password=myPassword //192.168.2.101/Public/Music /home/Ross/Music

    which works fine, great but I want it to happen automatically at start up...

    - So I edited the /etc/fstab file to include the line:

    Ross@linux-nmxz:/etc> cat fstab
    /dev/disk/by-id/ata-FUJITSU_MHY2250BH_K42XT8726WWD-part5 swap swap defaults 0 0
    /dev/disk/by-id/ata-FUJITSU_MHY2250BH_K42XT8726WWD-part6 / ext3 acl,user_xattr 1 1
    /dev/disk/by-id/ata-FUJITSU_MHY2250BH_K42XT8726WWD-part7 /home ext3 acl,user_xattr 1 2
    /dev/disk/by-id/ata-FUJITSU_MHY2250BH_K42XT8726WWD-part2 /windows/C ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_GB.UTF-8 0 0
    /dev/disk/by-id/ata-FUJITSU_MHY2250BH_K42XT8726WWD-part3 /windows/D ntfs-3g users,gid=users,fmask=133,dmask=022,locale=en_GB.UTF-8 0 0
    proc /proc proc defaults 0 0
    sysfs /sys sysfs noauto 0 0
    debugfs /sys/kernel/debug debugfs noauto 0 0
    usbfs /proc/bus/usb usbfs noauto 0 0
    devpts /dev/pts devpts mode=0620,gid=5 0 0
    //192.168.2.101/Public /mnt/Music cifs username=admin,password=myPassword,_netdev 0 0

    - Still no luck with this working at startup but thought that it could just be that the computer is slow connecting to the network, so...

    - I edited the crontab, I haven't done this before so I:

    - Logged in as su from the terminal
    - typed: crontab -e
    - looks like there was no file set up so I think it set up a new one? Anyway, I added the following line so the file looks like this:

    @reboot sleep 30;mount -a

    - That's all that's in the file, nothing else...


    - I've now rebooted several times but still no luck and I'm out of ideas...

    - Can anyone suggest what else I should be checking? Or how to go about further diagnosing the issue?? Any help appreciated!


    Thanks everyone!!

  2. #2
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,925
    Blog Entries
    14

    Default Re: Mounting NAS using cifs at startup problem, help!

    The line in fstab mounts the Public folder with everything in it in /mnt/Music. Boot with the line in fstab, open a terminal window and do:
    su -c 'mount /mnt/Music'
    Enter root password when asked for, copy and paste output here.


    If you want it mounted like in your manual successful attempt, change the line to:
    //192.168.2.101/Public/Music /home/Ross/Music cifs username=admin,password=myPassword,_netdev 0 0

    Did you try removing the _netdev option ?


    And....if you wrote the line in a file 'CRONTEST', did you perform a:
    su -c 'crontab CRONTEST'
    If not, cron does not know it has to execute the command

    Hope this helps you
    -
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,788

    Default Re: Mounting NAS using cifs at startup problem, help!

    As Knurpht already says, you really can not say that mounting manualy:
    Code:
    mount -t cifs -o username=admin,password=myPassword //192.168.2.101/Public/Music /home/Ross/Music
    and as specified in your /etc/fstab:
    Code:
    //192.168.2.101/Public /mnt/Music cifs username=admin,password=myPassword,_netdev 0 0
    should have the same result as they are different in several points:
    . different mount point;
    . different options.
    Please do first decide what you want and test that before your are using crontab, etc.

    You can see what is mounted where by e.g.
    Code:
    mount
    and/or
    Code:
    df
    Henk van Velden

Posting Permissions

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