Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 323713 - net-fs/nfs-utils does not properly shut down nfs
Summary: net-fs/nfs-utils does not properly shut down nfs
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal
Assignee: Network Filesystems
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-12 20:43 UTC by Alex Buell
Modified: 2010-06-13 22:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Buell 2010-06-12 20:43:51 UTC
Starting up NFSv4 is fine, works perfectly. However, shutting down NFS misses out a couple of rpc processes, those include rpc.idmapd and rpc.statd. 

# /etc/init.d/nfs start
 * Exporting NFS directories ...                                          [ ok ]
 * Starting NFS mountd ...                                                [ ok ]
 * Starting NFS daemon ...                                                [ ok ]
 * Starting NFS smnotify ...                                              [ ok ]
lithium ~ # ps ax|grep rpc
 6174 ?        S      0:00 [rpciod/0]
 6175 ?        S      0:00 [rpciod/1]
18344 ?        Ss     0:00 /usr/sbin/rpc.mountd -p 32767
18375 pts/2    S+     0:00 grep --colour=auto rpc
23902 ?        Ss     0:00 /usr/sbin/rpc.idmapd
23956 ?        Ss     0:00 /sbin/rpc.statd --no-notify -p 32765 -o 32766

portmap is running.

# /etc/init.d/nfs stop
 * Stopping NFS mountd ...                                                [ ok ]
 * Stopping NFS daemon ...                                                [ ok ]
 * Unexporting NFS directories ...                                        [ ok ]
lithium ~ # ps ax|grep rpc
 6174 ?        S      0:00 [rpciod/0]
 6175 ?        S      0:00 [rpciod/1]
18463 pts/2    S+     0:00 grep --colour=auto rpc
23902 ?        Ss     0:00 /usr/sbin/rpc.idmapd
23956 ?        Ss     0:00 /sbin/rpc.statd --no-notify -p 32765 -o 32766

This can be dealt with by checking /etc/coonf.d/nfs to see what processes needs shutting down as rpc.idmapd is optional. However, rpc.statd should be terminated anyway. portmap doesn't seem to get terminated either, perhaps /etc/init.d/nfs should call the other rpc.* scripts in /etc/init.d to ensure their termination on shutdown?
Comment 1 SpanKY gentoo-dev 2010-06-13 02:37:34 UTC
they're separate init.d scripts and not part of /etc/init.d/nfs, so you need to shutdown /etc/init.d/rpc.{statd,idmapd} too
Comment 2 Alex Buell 2010-06-13 09:39:00 UTC
But when I start /etc/init.d/nfs it starts these other processes, surely it would make sense to call these shutdown scripts for those as well? 
Comment 3 SpanKY gentoo-dev 2010-06-13 16:30:30 UTC
that is not an nfs-utils specific issue in any way.  any service with dependencies that are started implicitly will have this behavior.  there are no plans to address this since it isnt a big problem and it isnt easy to divine user's intentions.
Comment 4 Alex Buell 2010-06-13 20:54:06 UTC
OK, I stand corrected. Reason I was asking is because I only run BFSv4 occasionally, and wanted an easy shutdown process but thank you for your attention.
Comment 5 SpanKY gentoo-dev 2010-06-13 22:44:19 UTC
if you want to get back to a known state, you could do `rc <softlevel>`.  it'll shutdown all services not listed in there.