diff options
author | Qiang Chen <qiang.chen@windriver.com> | 2013-10-25 14:49:11 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-12-12 17:00:03 +0000 |
commit | 470f00562429b18b345f0560a5176c0f873f8e0e (patch) | |
tree | 44034cc75557afa89d94a26e76e5a5fab0c7b284 /meta/recipes-connectivity | |
parent | a1927d6c458485ad4f2b4e5dea17d4985a46b3c9 (diff) | |
download | poky-470f00562429b18b345f0560a5176c0f873f8e0e.tar.gz |
nfs-utils: nfsserver restart should kill and recreate nfsd kernel threads
nfsserver restart without killing kernel threads worked when portmap
was the rpc publishing process and portmap was restarted.
When rpcbind replaces portmap, nfsserver restart in this way does not
work after an rpcbind restart.
Steps to reproduce:
1). Make ext3 filesystem image on local host.
cd /root
dd if=/dev/zero of=test bs=1024K count=50
mkfs.ext3 -F test
2). runqemu qemux86-64
mkdir /mnt/wrtest
mount -t ext3 -o loop test /mnt/wrtest
echo "/mnt/wrtest *(sync,rw,no_subtree_check,no_root_squash)" > /etc/exports
/etc/init.d/rpcbind restart
/etc/init.d/nfsserver restart
showmount -e localhost
mkdir wrtest
mount -t nfs localhost:/mnt/wrtest wrtest
mount: mounting localhost:/mnt/wrtest on wrtest failed: Connection refused
Modifying the nfsserver script to kill and restart kernel threads on
restart makes the problem go away and is consistent with current
RHEL/SUSE and Ubuntu/Debian mechanisms of handling the nfs server.
(From OE-Core master rev: 1a96b8d7dfc490fc61bbd470a8b09065750cd563)
(From OE-Core rev: d1b5e944656807c9db9cbe5d08d7b4bd8daeb826)
Signed-off-by: Rich Dubielzig <rich.dubielzig@windriver.com>
Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r-- | meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver index 8ee8d0bb50..d7cf6e0048 100644 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver | |||
@@ -161,14 +161,9 @@ status) | |||
161 | [ $RETVAL -eq 0 ] && exit $rval | 161 | [ $RETVAL -eq 0 ] && exit $rval |
162 | exit $RETVAL;; | 162 | exit $RETVAL;; |
163 | reload) test -r /etc/exports && exportfs -r;; | 163 | reload) test -r /etc/exports && exportfs -r;; |
164 | restart)exportfs -ua | 164 | restart) |
165 | stop_mountd | 165 | $0 stop |
166 | stop_statd | 166 | $0 start;; |
167 | # restart does not restart the kernel threads, | ||
168 | # only the user mode processes | ||
169 | start_mountd | ||
170 | start_statd | ||
171 | test -r /etc/exports && exportfs -a;; | ||
172 | *) echo "Usage: $0 {start|stop|status|reload|restart}" | 167 | *) echo "Usage: $0 {start|stop|status|reload|restart}" |
173 | exit 1;; | 168 | exit 1;; |
174 | esac | 169 | esac |