* [gentoo-user] configuring NFS server to handle client reboots
@ 2013-06-30 17:10 Timur Aydin
2013-06-30 17:16 ` Timur Aydin
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Timur Aydin @ 2013-06-30 17:10 UTC (permalink / raw
To: gentoo-user
Hi,
I am using Gentoo Linux as an NFS server while doing development on an
Blackfin embedded system. The Blackfin is running uClinux and the
development host is Gentoo testing version (~amd64). The NFS server
version is 1.2.7.
Here is the problem that I am observing: I start from a known state,
restarting the NFS server on Gentoo and power cycling the Blackfin. Once
the Blackfin system has booted, I mount an folder on the Blackfin. This
succeeds without any problem. Then I power cycle the Blackfin again and
after it is up, I try to mount that same folder again. But this time,
the mount command hangs for a minute or so and eventually fails with a
timeout error.
Here is the mount command:
mount -o nolock,tcp 10.2.2.254:/romfs_2011R1 /mnt
When I look into the NFS server's system log, I can see that the mount
was authenticated:
Jun 30 13:54:53 bonsai rpc.mountd[1597]: authenticated mount request
from 10.2.2.220:911 for /home/ta/uclinux_2011R1/db1/uclinux-dist/romfs
(/home/ta/uclinux_2011R1)
I have captured what is happening using wireshark and what I am seeing
is that the mount request succeeds, but the client initiates another TCP
connection (SYN) and this SYN is never responded to by the server.
I know that a sm-notify program is used on both NFS clients/servers to
notify reboots, but this embedded system does not have the sm-notify
capability. And I would rather not try to port it to uClinux.
So, my question is, can I somehow configure the NFS server to allow
mounting the same directory repeatedly whenever the NFS client reboots?
--
Timur
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] configuring NFS server to handle client reboots
2013-06-30 17:10 [gentoo-user] configuring NFS server to handle client reboots Timur Aydin
@ 2013-06-30 17:16 ` Timur Aydin
2013-06-30 17:26 ` Timur Aydin
2013-07-01 2:09 ` Walter Dnes
2 siblings, 0 replies; 5+ messages in thread
From: Timur Aydin @ 2013-06-30 17:16 UTC (permalink / raw
To: gentoo-user
On 06/30/13 20:10, Timur Aydin wrote:
> Here is the mount command:
>
> mount -o nolock,tcp 10.2.2.254:/romfs_2011R1 /mnt
>
BTW, when I use UDP instead of TCP, then the mount works after repeated
reboots. But I would rather use TCP, because based on past experiments I
did, TCP mounted NFS shares have a higher bandwidth.
Also, when using TCP, if I restart the NFS server on the gentoo host,
/etc/init.d/nfs restart
Then I can mount the NFS share on the Blackfin repeatedly.
This all tells me that the NFS server is preventing subsequent TCP
mounts unless the existing mount is unmounted first.
--
Timur
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] configuring NFS server to handle client reboots
2013-06-30 17:10 [gentoo-user] configuring NFS server to handle client reboots Timur Aydin
2013-06-30 17:16 ` Timur Aydin
@ 2013-06-30 17:26 ` Timur Aydin
2013-07-01 2:09 ` Walter Dnes
2 siblings, 0 replies; 5+ messages in thread
From: Timur Aydin @ 2013-06-30 17:26 UTC (permalink / raw
To: gentoo-user
The server configuration is as follows:
===================================================================================
bonsai ~ # cat /etc/conf.d/nfs
# /etc/conf.d/nfs
# If you wish to set the port numbers for lockd,
# please see /etc/sysctl.conf
# Optional services to include in default `/etc/init.d/nfs start`
# For NFSv4 users, you'll want to add "rpc.idmapd" here.
NFS_NEEDED_SERVICES="rpc.idmapd"
# Number of servers to be started up by default
OPTS_RPC_NFSD="8"
# Options to pass to rpc.mountd
# ex. OPTS_RPC_MOUNTD="-p 32767"
OPTS_RPC_MOUNTD=""
# Options to pass to rpc.statd
# ex. OPTS_RPC_STATD="-p 32765 -o 32766"
OPTS_RPC_STATD=""
# Options to pass to rpc.idmapd
OPTS_RPC_IDMAPD=""
# Options to pass to rpc.gssd
OPTS_RPC_GSSD=""
# Options to pass to rpc.svcgssd
OPTS_RPC_SVCGSSD=""
# Options to pass to rpc.rquotad (requires sys-fs/quota)
OPTS_RPC_RQUOTAD=""
# Timeout (in seconds) for exportfs
EXPORTFS_TIMEOUT=30
# Options to set in the nfsd filesystem (/proc/fs/nfsd/).
# Format is <option>=<value>. Multiple options are allowed.
#OPTS_NFSD="nfsv4leasetime=30 max_block_size=4096"
===================================================================================
bonsai ~ # cat /etc/exports
/home/ta/uclinux_2011R1
*(rw,sync,all_squash,anonuid=1000,anongid=100,no_subtree_check)
/home/ta/tmp/flash_nfsroot
*(rw,sync,all_squash,anonuid=1000,anongid=100,no_subtree_check)
--
Timur
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] configuring NFS server to handle client reboots
2013-06-30 17:10 [gentoo-user] configuring NFS server to handle client reboots Timur Aydin
2013-06-30 17:16 ` Timur Aydin
2013-06-30 17:26 ` Timur Aydin
@ 2013-07-01 2:09 ` Walter Dnes
2013-07-01 10:07 ` Timur Aydin
2 siblings, 1 reply; 5+ messages in thread
From: Walter Dnes @ 2013-07-01 2:09 UTC (permalink / raw
To: gentoo-user
On Sun, Jun 30, 2013 at 08:10:53PM +0300, Timur Aydin wrote
> I know that a sm-notify program is used on both NFS clients/servers to
> notify reboots, but this embedded system does not have the sm-notify
> capability. And I would rather not try to port it to uClinux.
>
> So, my question is, can I somehow configure the NFS server to
> allow mounting the same directory repeatedly whenever the NFS
> client reboots?
A possible "quick-n-dirty" approach is to run a script that first
does a "umount" of the share, and then does the mount. Ignore error
messages from the umount attempt.
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] configuring NFS server to handle client reboots
2013-07-01 2:09 ` Walter Dnes
@ 2013-07-01 10:07 ` Timur Aydin
0 siblings, 0 replies; 5+ messages in thread
From: Timur Aydin @ 2013-07-01 10:07 UTC (permalink / raw
To: gentoo-user
On 7/1/2013 5:09 AM, Walter Dnes wrote:
> A possible "quick-n-dirty" approach is to run a script that first
> does a "umount" of the share, and then does the mount. Ignore error
> messages from the umount attempt.
>
Just tried that, but no joy. uClinux knows that the share isn't mounted
after reboot and doesn't even send an unmount request to the server.
--
Timur
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-07-01 10:07 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-30 17:10 [gentoo-user] configuring NFS server to handle client reboots Timur Aydin
2013-06-30 17:16 ` Timur Aydin
2013-06-30 17:26 ` Timur Aydin
2013-07-01 2:09 ` Walter Dnes
2013-07-01 10:07 ` Timur Aydin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox