Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
Hi, sorry for the simple issue but I'm having trouble setting a CIFS mount on a RHEL 5 box in /etc/fstab. I must be doing some stupid but I couldnt ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! hunter_thom's Avatar
    Join Date
    Apr 2010
    Posts
    89

    Simple CIFS issue


    Hi, sorry for the simple issue but I'm having trouble setting a CIFS mount on a RHEL 5 box in /etc/fstab. I must be doing some stupid but I couldnt specifically find anything in my googling that told me my fstab entry was wrong.

    Issue is I am trying to add a CIFS mount to /etc/fstab but when booting the box this CIFS mount is not mounted.

    The entry I'm trying to make work is:
    //x.x.x.x/Dirname\$ /Dirname cifs username=blah,password=blah,_netdev 0 0

    This does not work. However I can manually mount as such:
    mount -t cifs -o username=blah,password=blah //x.x.x.x/Dirname\$ /Dirname/

    I didnt see any errors in /var/log/messages or /var/log/dmesg hinting at a failure when attempting to mount, but those mountpoints are not mounted during initialization; I have to manually do this.

    Any ideas? Am I doing something stupid? Or am I missing something essential in the fstab entry?


    Thanks in advance for any help!

  2. #2
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    I believe the problem you are having is the filesystems are being mounted before network loads
    linux user # 503963

  3. #3
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    Additionally you may see if netfs is enabled. As an alternative, you can throw the mount command into rc.local, but that really isn't going to solve the problem
    linux user # 503963

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,663
    Please post contents of /etc/fstab here.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  6. #5
    Just Joined! hunter_thom's Avatar
    Join Date
    Apr 2010
    Posts
    89
    Quote Originally Posted by scathefire View Post
    I believe the problem you are having is the filesystems are being mounted before network loads
    That is what it seems like, but as I understand it, that is what the _netdev option is for, which I am using.

  7. #6
    Just Joined! hunter_thom's Avatar
    Join Date
    Apr 2010
    Posts
    89
    Quote Originally Posted by Rubberman View Post
    Please post contents of /etc/fstab here.
    Here it is:
    /dev/VolGroup00/LogVol00 / ext3 nodev 1 1
    /dev/VolGroup00/LogVol06 /home ext3 nodev 1 2
    /dev/VolGroup00/LogVol07 /opt ext3 nodev 1 2
    /dev/VolGroup00/LogVol02 /tmp ext3 nodev 1 2
    /dev/VolGroup00/LogVol03 /var ext3 nodev 1 2
    /dev/VolGroup00/LogVol04 /var/log ext3 nodev 1 2
    /dev/VolGroup00/LogVol05 /var/log/audit ext3 nodev 1 2
    LABEL=/boot /boot ext3 defaults 1 2
    tmpfs /dev/shm tmpfs defaults 0 0
    devpts /dev/pts devpts gid=5,mode=620 0 0
    sysfs /sys sysfs defaults 0 0
    proc /proc proc defaults 0 0
    /dev/VolGroup00/LogVol01 swap swap defaults 0 0
    //192.168.7.25/Transfer\$ /Transfer cifs username=user,password=pass,_netdev 0 0


    Thanks guys!

  8. #7
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Did you try removing the \ from the $ from the share name? If you run the mount command from a terminal, the shell will try to expand it, but it doesn't do that if it is defined in /etc/fstab. At least that's what a quick test on my boxes tells me...

    Give it a quick try and then do a 'mount -a'

  9. #8
    Just Joined! hunter_thom's Avatar
    Join Date
    Apr 2010
    Posts
    89
    Quote Originally Posted by atreyu View Post
    Did you try removing the \ from the $ from the share name? If you run the mount command from a terminal, the shell will try to expand it, but it doesn't do that if it is defined in /etc/fstab. At least that's what a quick test on my boxes tells me...

    Give it a quick try and then do a 'mount -a'
    Thanks for the pointer. I did try this, and it worked with a 'mount -a' so I rebooted (on a passive node of course) after removing the \ and it still did not mount. Then once the box was back up, I did a mount -a and got the CIFS mount.

    So, it does sound like an issue with attempting to mount before network is active. The fstab entry works, but not during initialization. Perhaps I am misusing the _netdev entry? Based on the man pages, it looks as though I am using it correctly however. Anyone have experience getting _netdev to work?

  10. #9
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Are you using NetworkManager, by chance? If so, maybe try ruling that out as a possible problem. On a non-critical node, do

    Code:
    chkconfig NetworkManager off
    chkconfig network on
    and reboot...

  11. #10
    Just Joined! hunter_thom's Avatar
    Join Date
    Apr 2010
    Posts
    89
    Hadn't thought about NetworkManager, thanks! But yes it is disabled. This is our CIS compliant kickstart.

    NetworkManager 0:off 1:off 2:off 3:off 4:off 5:off 6:off
    network 0:off 1:off 2:on 3:on 4:on 5:on 6:off

Page 1 of 2 1 2 LastLast

Posting Permissions

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