Options

OpenSUSE: Mount CIFS to /mnt/directoryname with fstab

RobertKaucherRobertKaucher Member Posts: 4,299 ■■■■■■■■■■
Here is the content of fstab.
LABEL=SWAP           swap                 swap       defaults              0 0
LABEL=M6310-BOOT     /boot                ext3       data=journal,acl,user_xattr 1 2
LABEL=M6310-HOME     /                    ext3       data=journal,acl,user_xattr 1 1
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
//usd-am-dat-02/Groups/documentation/USB_data   /mnt/usb_image   cifs   username=svcacct-name,password=ultrasecure,domain=am   0 0
I'm not sure what I have done wrong. I've tried several things. mount -t works fine manually. It's not mounting at boot.

Comments

  • Options
    tierstentiersten Member Posts: 4,505
    Look at the logs. I guess it is trying to mount that share before the network is ready?
  • Options
    RobertKaucherRobertKaucher Member Posts: 4,299 ■■■■■■■■■■
    tiersten wrote: »
    Look at the logs. I guess it is trying to mount that share before the network is ready?

    Don't think that's the case...
    Starting Samba NMB daemon done
    Mount CIFS File Systems
    from /etc/fstab . done
  • Options
    tierstentiersten Member Posts: 4,505
    Don't think that's the case...
    The CIFS VFS kernel module doesn't use Samba to mount a share. You need to look at the logs to see what is going on.
  • Options
    RobertKaucherRobertKaucher Member Posts: 4,299 ■■■■■■■■■■
    tiersten wrote: »
    The CIFS VFS kernel module doesn't use Samba to mount a share. You need to look at the logs to see what is going on.

    I am looking in /var/log/boot.msg and I am seeing
    Mount CIFS File Systems
    from /etc/fstab . done

    without error and after NetworkManager and other network related items like eth0. Is there something more specific I should be looking for?
  • Options
    tierstentiersten Member Posts: 4,505
    I am looking in /var/log/boot.msg and I am seeing



    without error and after NetworkManager and other network related items like eth0. Is there something more specific I should be looking for?
    I don't know the exact syslog configuration for SUSE but I'd look in /var/log/messages and the output of the kernel ring buffer (dmesg)
  • Options
    PaperlanternPaperlantern Member Posts: 352
    Assuming this is to a windows share? Samba needs to be installed for this to work.

    This is more secure, as well as permanent, it will mount this share every time you boot.

    Create a file called cifspw in your /etc folder with the contents like this
    username=username
    password=password
    

    Then... Lock it down
    chmod 700 /etc/cifspw
    

    Then add this to your fstab file
    //Servershare  /mnt/FolderName  cifs exec,credentials=/etc/cifspw 0 0
    

    Rock and roll
    mount -a
    
  • Options
    RobertKaucherRobertKaucher Member Posts: 4,299 ■■■■■■■■■■
    Thanks for the replies.

    @Paperlanter - I had actually already tried that setup and it did not work. I was resorting to a simpler method in an attempt to get anything to work at boot. Just to be sure I tried your method line for line and it still did not work at boot. mount -a mounts from fstab just fine. Which is the same result I was having... :-/

    @tiersten - nothing in messages indicating a failure. I searched for mount, /mnt/usb_image, usb, fail, and net and found nothing indicating that it was a failure at boot of the network systems not being ready.

    I even created a startup shell script with the full mount command stored it in /etc/init.d and set it to be executed at runlevel 5 and it still did not work! I also added the two lines to boot.local one running the mount -t etc.. command, still did not work, and another running mkdir /home/temp/test and wouldn't you know it the mkdir line works just fine! I have come to the conclusion that it is not worth my time to go any further and I am suggesting that whoever uses the USB duplicators simply open a terminal and run mount -a before they do any work.

    Thanks, guys! If you have further suggestions let me know and I might be able to give them a try. But as of now, I'm done with this!
  • Options
    RobertKaucherRobertKaucher Member Posts: 4,299 ■■■■■■■■■■
    As an update on this thread...

    The unit I was writing about is still having this issue. However and identical unit is working just fine with the proper entry in fstab. I found out the one giving me a headache crashed a few weeks ago and it was having issues with network connectivity. We are going to the vendor to see if they can do anything.
Sign In or Register to comment.