* [PATCH] nfsserver restart should kill and recreate nfsd kernel threads
@ 2013-10-22 3:19 qiang.chen
2013-10-24 21:13 ` Saul Wold
0 siblings, 1 reply; 3+ messages in thread
From: qiang.chen @ 2013-10-22 3:19 UTC (permalink / raw)
To: openembedded-core
From: Qiang Chen <qiang.chen@windriver.com>
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.
Signed-off-by: Rich Dubielzig <rich.dubielzig@windriver.com>
Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
---
.../nfs-utils/nfs-utils/nfsserver | 11 +++--------
1 file 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 8ee8d0b..d7cf6e0 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
@@ -161,14 +161,9 @@ status)
[ $RETVAL -eq 0 ] && exit $rval
exit $RETVAL;;
reload) test -r /etc/exports && exportfs -r;;
-restart)exportfs -ua
- stop_mountd
- stop_statd
- # restart does not restart the kernel threads,
- # only the user mode processes
- start_mountd
- start_statd
- test -r /etc/exports && exportfs -a;;
+restart)
+ $0 stop
+ $0 start;;
*) echo "Usage: $0 {start|stop|status|reload|restart}"
exit 1;;
esac
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nfsserver restart should kill and recreate nfsd kernel threads
2013-10-22 3:19 [PATCH] nfsserver restart should kill and recreate nfsd kernel threads qiang.chen
@ 2013-10-24 21:13 ` Saul Wold
2013-10-25 6:33 ` Qiang Chen
0 siblings, 1 reply; 3+ messages in thread
From: Saul Wold @ 2013-10-24 21:13 UTC (permalink / raw)
To: qiang.chen, openembedded-core
The short summary should include the recipe name.
Sau!
On 10/21/2013 08:19 PM, qiang.chen@windriver.com wrote:
> From: Qiang Chen <qiang.chen@windriver.com>
>
> 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.
>
> Signed-off-by: Rich Dubielzig <rich.dubielzig@windriver.com>
> Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
> ---
> .../nfs-utils/nfs-utils/nfsserver | 11 +++--------
> 1 file 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 8ee8d0b..d7cf6e0 100644
> --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
> @@ -161,14 +161,9 @@ status)
> [ $RETVAL -eq 0 ] && exit $rval
> exit $RETVAL;;
> reload) test -r /etc/exports && exportfs -r;;
> -restart)exportfs -ua
> - stop_mountd
> - stop_statd
> - # restart does not restart the kernel threads,
> - # only the user mode processes
> - start_mountd
> - start_statd
> - test -r /etc/exports && exportfs -a;;
> +restart)
> + $0 stop
> + $0 start;;
> *) echo "Usage: $0 {start|stop|status|reload|restart}"
> exit 1;;
> esac
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nfsserver restart should kill and recreate nfsd kernel threads
2013-10-24 21:13 ` Saul Wold
@ 2013-10-25 6:33 ` Qiang Chen
0 siblings, 0 replies; 3+ messages in thread
From: Qiang Chen @ 2013-10-25 6:33 UTC (permalink / raw)
To: Saul Wold; +Cc: openembedded-core
On 10/25/2013 05:13 AM, Saul Wold wrote:
> The short summary should include the recipe name.
Got it. I'll send V2 for this patch.
Thanks a lot !
Qiang
> Sau!
> On 10/21/2013 08:19 PM, qiang.chen@windriver.com wrote:
>> From: Qiang Chen <qiang.chen@windriver.com>
>> 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.
>> Signed-off-by: Rich Dubielzig <rich.dubielzig@windriver.com>
>> Signed-off-by: Qiang Chen <qiang.chen@windriver.com>
>> ---
>> .../nfs-utils/nfs-utils/nfsserver | 11 +++--------
>> 1 file 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 8ee8d0b..d7cf6e0 100644
>> --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
>> +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
>> @@ -161,14 +161,9 @@ status)
>> [ $RETVAL -eq 0 ] && exit $rval
>> exit $RETVAL;;
>> reload) test -r /etc/exports && exportfs -r;;
>> -restart)exportfs -ua
>> - stop_mountd
>> - stop_statd
>> - # restart does not restart the kernel threads,
>> - # only the user mode processes
>> - start_mountd
>> - start_statd
>> - test -r /etc/exports && exportfs -a;;
>> +restart)
>> + $0 stop
>> + $0 start;;
>> *) echo "Usage: $0 {start|stop|status|reload|restart}"
>> exit 1;;
>> esac
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-25 6:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-22 3:19 [PATCH] nfsserver restart should kill and recreate nfsd kernel threads qiang.chen
2013-10-24 21:13 ` Saul Wold
2013-10-25 6:33 ` Qiang Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox