Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
netmount stop doesn't stop nfsmount
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mieses
Tux's lil' helper
Tux's lil' helper


Joined: 28 Feb 2004
Posts: 110

PostPosted: Mon Mar 28, 2011 9:47 pm    Post subject: netmount stop doesn't stop nfsmount Reply with quote

Updating net-fs/nfs-utils from 1.1.4-r1 to 1.2.3-r1 causes /etc/init.d/netmount to fail when mounting any NFS shares specified in /etc/fstab.

/etc/init.d/nfsmount and command line mount both continue to work.

Running the netmount script manually does not produce any errors.

I have not tested netmount with other types of network shares, so I don't know if the problem is isolated to just NFS mounts or if netmount is completely broken. Re-emerging baselayout-1.12.14-r1 did not help.

UPDATE: netmount stop and restart do not not stop nfsmount. The NFS mounts are unmounted but the status of nfsmount remains "started". From that point on, "netmount start" sees that nfsmount is already "started" and does not try to mount the (unmounted) NFS mounts.


Last edited by mieses on Thu Mar 31, 2011 1:09 am; edited 2 times in total
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Tue Mar 29, 2011 8:25 am    Post subject: Reply with quote

make sure you have both NFS3 and NFS4 compiled "in" the kernel and also activate all flags for NFS-UTILS and re-compile it.

I had this with an error like 521 or something and I think this fixed it.
Back to top
View user's profile Send private message
mieses
Tux's lil' helper
Tux's lil' helper


Joined: 28 Feb 2004
Posts: 110

PostPosted: Tue Mar 29, 2011 4:21 pm    Post subject: Reply with quote

Thank you for the reply. The settings were already set correctly.

USE flags
Code:
net-fs/nfs-utils-1.2.3-r1  elibc_glibc ipv6 nfsv3 nfsv4 tcpd -caps -kerberos

Kernel options
Code:
# grep -i NFS /usr/src/linux/.config
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
# CONFIG_NFS_V4_1 is not set
# CONFIG_ROOT_NFS is not set
CONFIG_NFSD=m
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y
CONFIG_NCPFS_NFS_NS=y

In case it has to do with RPC, here is the status of the related services:
Code:
# rc-status -a | grep -i rpc
 rpc.statd                            [ started  ]
 rpcbind                              [ started  ]
 rpc.idmapd                           [ stopped  ]
 rpc.pipefs                           [ started  ]
Back to top
View user's profile Send private message
EatMeerkats
Apprentice
Apprentice


Joined: 15 Mar 2006
Posts: 234

PostPosted: Tue Mar 29, 2011 4:29 pm    Post subject: Reply with quote

I recently had this problem as well, and after some searching, I figured out that I had to add "vers=3" to the mount options in /etc/fstab. Pretty annoying that there was no warning (that I saw, at least) in the emerge output about this!
Back to top
View user's profile Send private message
mieses
Tux's lil' helper
Tux's lil' helper


Joined: 28 Feb 2004
Posts: 110

PostPosted: Tue Mar 29, 2011 5:36 pm    Post subject: Reply with quote

After testing with the nfsvers=3 option in /etc/fstab, I noticed that stopping netmount does not stop nfsmount! I think this is the source of the problem. The presence of nfsvers=3 does not change the behavior.

"/etc/init.d/netmount start" does mount the NFS shares provided that nfsmount is not previously running.

"/etc/init.d/netmount stop" unmounts the NFS shares but does NOT stop nfsmount. Subsequent runs of "/etc/init.d/netmount start" do not try to mount the NFS shares because netmount sees that nfsmount is already running.

So the problem would not appear the first time netmount is run, only on any subsequent attempts to restart it.
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Wed Mar 30, 2011 7:57 am    Post subject: Reply with quote

AFAIK you need the kerberos flag for NFS to work if you don't tell it to use NFSV3 with the vers option.
Rich
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23193

PostPosted: Thu Mar 31, 2011 3:00 am    Post subject: Reply with quote

Why are you running both netmount and nfsmount? If you only want NFS, run only nfsmount and not netmount.
Back to top
View user's profile Send private message
mieses
Tux's lil' helper
Tux's lil' helper


Joined: 28 Feb 2004
Posts: 110

PostPosted: Thu Mar 31, 2011 3:59 am    Post subject: Reply with quote

I don't want to use both netmount and nfsmount. I would like to only use netmount which has stopped mounting NFS shares since I updated net-fs/nfs-utils from 1.1.4-r1 to 1.2.3-r1. I have since started testing nfsmount which led to some interesting(?) results:

When nfsmount is added to the default runlevel but is *stopped*, then "netmount start" will also start nfsmount and mount the shares, even though I did not explicitly call nfsmount. Looking through the netmount script, I see that it uses nfsmount, at least in some cases.

When nfsmount is deleted from all runlevels, then starting netmount does not start nfsmount and the NFS shares are not mounted.

I'm still trying to understand the logic.
Back to top
View user's profile Send private message
mieses
Tux's lil' helper
Tux's lil' helper


Joined: 28 Feb 2004
Posts: 110

PostPosted: Thu Mar 31, 2011 9:14 pm    Post subject: Reply with quote

I added the kerberos USE flag to nfs-utils and re-emerged nfs-utils. This also required the addition of the kerberos flag to net-libs/libtirpc and the emerging of 4 additional packages. It didn't work. netmount still fails to mount NFS shares. I had no problems with netmount and the previous version of nfs-utils.

I tested with a single NFS mount specified in fstab. The server uses NFS3. The fstab mount options include nfsvers=3:
Code:
nfsserver mountpoint nfs nfsvers=3,defaults,user 0 0

There are some bug reports in bugzilla which might be related. Probably this version of nfs-utils was stabilized too soon.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum