LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-30-2007, 06:57 PM   #1
pwabrahams
Member
 
Registered: Nov 2005
Location: Deerfield MA
Distribution: OpenSuSE, Kubuntu
Posts: 272

Rep: Reputation: 41
nfs mount not behaving as expected (according to man pages)


Im running OpenSuSE 10.3, and I'm having a problem in getting two nfs mounts to work properly. Here's what is in /etc/fstab:

Code:
pwa@suillus:~> cat /etc/fstab | grep hp
hpmediavault:/shares/Volume1/FileShare  /mediavault nfs auto,users,rw,rsize=8192,wsize=8192,timeo=30,retry=5
hpmediavault:/shares/Volume1/MediaShare /musicvault nfs auto,users,rw,rsize=8192,wsize=8192,timeo=30,retry=5
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 06:59 PM. Reason: Reference the OS I'm using.
 
Old 10-30-2007, 07:02 PM   #2
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
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: Reputation: 61
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.

Brian
 
Old 10-30-2007, 07:17 PM   #3
pwabrahams
Member
 
Registered: Nov 2005
Location: Deerfield MA
Distribution: OpenSuSE, Kubuntu
Posts: 272

Original Poster
Rep: Reputation: 41
Who can do a mount?

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.
 
Old 10-30-2007, 08:03 PM   #4
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
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: Reputation: 61
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.

Brian
 
Old 10-31-2007, 10:09 AM   #5
pwabrahams
Member
 
Registered: Nov 2005
Location: Deerfield MA
Distribution: OpenSuSE, Kubuntu
Posts: 272

Original Poster
Rep: Reputation: 41
There be bugs here!

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.
 
Old 11-03-2007, 03:35 PM   #6
pwabrahams
Member
 
Registered: Nov 2005
Location: Deerfield MA
Distribution: OpenSuSE, Kubuntu
Posts: 272

Original Poster
Rep: Reputation: 41
A workaround for the missed automount

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!).
 
Old 02-24-2008, 12:04 PM   #7
gsancosme
LQ Newbie
 
Registered: Sep 2006
Posts: 1

Rep: Reputation: 0
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.
 
Old 10-22-2008, 12:09 AM   #8
JATA01
Member
 
Registered: Nov 2007
Posts: 197

Rep: Reputation: 15
Why the rsize and wsize is fixed 8192 in nfs???

Thanks-
 
  


Reply

Tags
mount, nfs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with NFS, can't find what I need in the man pages... NoeticRapture Slackware 12 03-31-2010 11:37 PM
how to mount a nfs mount from linux client to AIX nfs server dennyqian AIX 8 09-22-2006 04:34 AM
who - man pages kshkid Programming 17 03-01-2006 03:37 AM
What do you mean by MAN pages? inspectreo Linux - Newbie 2 05-08-2005 03:12 PM
man pages haobaba1 Linux - General 4 07-30-2003 03:09 PM


All times are GMT -5. The time now is 08:49 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration