public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* NFS auto-reconnect tuning.
@ 2014-09-24 15:39 Benjamin ESTRABAUD
  2014-09-25  1:44 ` NeilBrown
  0 siblings, 1 reply; 6+ messages in thread
From: Benjamin ESTRABAUD @ 2014-09-24 15:39 UTC (permalink / raw)
  To: linux-nfs

Hi!

I've got a scenario where I'm connected to a NFS share on a client, have 
a file descriptor open as read only (could also be write) on a file from 
that share, and I'm suddenly changing the IP address of that client.

Obviously, the NFS share will hang, so if I now try to read the file 
descriptor I've got open (here in Python), the "read" call will also hang.

However, the driver seems to attempt to do something (maybe 
save/determine whether the existing connection can be saved) and then, 
after about 20 minutes the driver transparently reconnects to the NFS 
share (which is what I wanted anyways) and the "read" call instantiated 
earlier simply finishes (I don't even have to re-open the file again or 
even call "read" again).

The dmesg prints I get are as follow:

[ 4424.500380] nfs: server 10.0.2.17 not responding, still trying <-- 
changed IP address and started reading the file.
[ 4451.560467] nfs: server 10.0.2.17 OK <--- The NFS share was 
reconnected, the "read" call completes successfully.

I would like to know if there was any way to tune this behaviour, 
telling the NFS driver to reconnect if a share is unavailable after say 
10 seconds.

I tried the following options without any success:

retry=0; hard/soft; timeo=3; retrans=1; bg/fg

I am running on a custom distro (homemade embedded distro, not based on 
anything in particular) running stock kernel 3.10.18 compiled for i686.

Would anyone know what I could do to force NFS into reconnecting a 
seemingly "dead" session sooner?

Thanks in advance for your help.

Regards,

Ben - MPSTOR.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-29 21:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-24 15:39 NFS auto-reconnect tuning Benjamin ESTRABAUD
2014-09-25  1:44 ` NeilBrown
2014-09-25  9:46   ` Benjamin ESTRABAUD
2014-09-28 23:28     ` NeilBrown
2014-09-29 10:06       ` Benjamin ESTRABAUD
2014-09-29 21:34         ` NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox