nfs mount not behaving as expected (according to man pages)
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Despite the presence of auto and the permissive settings of timeo and retry, the mount does not happen at boot time:
Code:
pwa@suillus:~> mount | grep hp
Furthermore, despite the presence of users, (I also tried user), an ordinary user can't do the mount:
Code:
pwa@suillus:~> mount /mediavault
mount: hpmediavault:/shares/Volume1/FileShare failed, reason given by server: Permission denied
pwa@suillus:~> mount /musicvault
mount: hpmediavault:/shares/Volume1/MediaShare failed, reason given by server: Permission denied
However, root can do it:
Code:
pwa@suillus:~> sudo mount -a
pwa@suillus:~> mount | grep hp
hpmediavault:/shares/Volume1/FileShare on /mediavault type nfs (rw,users,noexec,nosuid,nodev,rsize=8192,wsize=8192,timeo=30,retry=5,addr=192.168.0.104)
hpmediavault:/shares/Volume1/MediaShare on /musicvault type nfs (rw,users,noexec,nosuid,nodev,rsize=8192,wsize=8192,timeo=30,retry=5,addr=192.168.0.104)
Here is the description of auto from the mount man page:
Quote:
auto
Can be mounted with the -a option.
(The mount at boot time is done with mount -a, I believe.)
And here is the description of users from that man page:
Quote:
users
Allow every user to mount and unmount the file system. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line users,exec,dev,suid).
So what am I missing?
Last edited by pwabrahams; 10-30-2007 at 05:59 PM.
Reason: Reference the OS I'm using.
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
Networking more than likely has not started yet before running the fstab file.
Change the auto to noauto so it will not be trying to mount yet.
Now not a Suse user but would say there is some knid of script that is started near the end of the boot process. In that add you mount -a command.
In Redhat type distros there is /etc/rc.local script.
Only root can use the mount command unless you let others through sudo.
It seems that an ordinary user can actually issue the mount command, since it works perfectly well without parameters and gives the mount status. I was able to use user in /etc/fstab in the previous version of OpenSuSE (10.2) and there an ordinary user was able to do the mount.
As to noauto: specifying it means that mount -a won't work at all, so there's a loss of functionality in doing that. Nevertheless I can still follow your suggestion about inserting mount -a in one of the init scripts. But as I read the manual, the mount is retried until it times out (which I don't think it does), so it should happen after a while anyway. And it doesn't.
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
You are right about the noauto not working with the mount -a command.
I just leave mine as noauto and then use the mount command to mount the defineed share.
Bugzilla at Novell reports that the problem with user not working is a bug, which can be fixed by setting the suid bit for mount.nfs. It hasn't been fixed yet because of security issues, but it's set in Kubuntu.
The situation with auto is less clear. Others have reported the problem, but it hasn't been pinned down yet.
In the file /etc/init.d/after.local, which gets executed after all other initializations, I put this:
Code:
rpc.statd
mount -a
Now I get the automatic mounting and activation of rpc.statd, albeit with a delay of a couple of minutes. Of course, that shouldn't be necessary.
That file may have other locations in distributions other than OpenSuSE 10.3 (but perhaps those other distributions don't have the problem in the first place!).
Perhaps am I late on this, but for the boot mount to be enabled, you just have to start nfs client deamon at startup. (as root : chkconfig nfs 35) or with YaST.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.