2013-07-24 13:11:03

by Kees Bakker

[permalink] [raw]
Subject: Re: How to avoid rebooting Linux NFS-client when NFS-server is not available?

Peter Funk <[email protected]> wrote:
| We've researched this question for quite a while now and nobody here
| found a solution to the following problem:
|
| 1: A Linux computer is NFS client of some other Linux NFS server
| and has some active mounts and some processes working with files
| on that NFS server.
|
| 2: Now the NFS server becomes unavailable and a system administrator
| wants to clean up the situation on the NFS client computer without
| having to reboot this client computer.
|
| Is this possible? And if how exactly?

What you could try is temporarily add the IP number of the dead NFS
server to another NFS server. The other NFS server should reject any
request for the dead mount, and the client can continue with an error.

--
Dick



2013-07-26 14:32:37

by Michael Richardson

[permalink] [raw]
Subject: Re: How to avoid rebooting Linux NFS-client when NFS-server is not available?


Peter Funk <[email protected]> wrote:
> Indeed: This workaround seems to work!

> Assume example: The NFS-server has IP 192.168.123.45 and the client
> has also the nfs-kernel-server package installed and it is running.
> Then this sequence on the client did the trick::

> ifconfig eth0:fakesrv 192.168.123.45 up
> umount -f -l ....
> umount -f -l ....
> ....
> ifconfig eth0:fakesrv down

Good idea, but I suggest doing it on lo rather than eth0.


2013-07-26 12:08:52

by Peter Funk

[permalink] [raw]
Subject: Re: How to avoid rebooting Linux NFS-client when NFS-server is not available?

Dick Streefland wrote 24.07.2013 13:03:
> Peter Funk <[email protected]> wrote:
> | We've researched this question for quite a while now and nobody here
> | found a solution to the following problem:
> |
> | 1: A Linux computer is NFS client of some other Linux NFS server
> | and has some active mounts and some processes working with files
> | on that NFS server.
> |
> | 2: Now the NFS server becomes unavailable and a system administrator
> | wants to clean up the situation on the NFS client computer without
> | having to reboot this client computer.
> |
> | Is this possible? And if how exactly?
>
> What you could try is temporarily add the IP number of the dead NFS
> server to another NFS server. The other NFS server should reject any
> request for the dead mount, and the client can continue with an error.

Indeed: This workaround seems to work!

Assume example: The NFS-server has IP 192.168.123.45 and the client
has also the nfs-kernel-server package installed and it is running.
Then this sequence on the client did the trick::

ifconfig eth0:fakesrv 192.168.123.45 up
umount -f -l ....
umount -f -l ....
....
ifconfig eth0:fakesrv down

Best Regards and many thanks for your suggestion,
Peter Funk
--
Peter Funk, home: ✉Oldenburger Str.86, D-27777 Ganderkesee
mobile:+49-179-640-8878 phone:+49-421-20419-0 <http://www.artcom-gmbh.de/>
office: ArtCom GmbH, ✉Haferwende 2, D-28357 Bremen, Germany

2017-06-08 14:55:20

by J. Bruce Fields

[permalink] [raw]
Subject: Re: Re: How to avoid rebooting Linux NFS-client when NFS-server is not available?

On Thu, Jun 08, 2017 at 04:06:32PM +0200, [email protected] wrote:
> > Ripping out the storage from underneath your applications is a pretty
> > drastic step and may lose data,
>
> We did not rip out our storage, it`s still there and reachable without problems. Our hung nfs is NEVER being caused by nfs server reboots or poweroff, it seems to happen on network disruption or whatever.

OK, sounds like there's some other bug causing the original hang then, I
don't know what that is.

--b.