From: James H. Markowitz on
I have an NFS partition P mounted locally from a remote machine.
The problem is that the remote machine has died. When I do

umount -f P

I get a diagnostic whereby somebody is still using P. I try to find out
who by means of fuser, and fuser hangs, apparently forever.

How can I get rid of P without rebooting my box?

From: Maxwell Lol on
"James H. Markowitz" <noone(a)nowhere.net> writes:

> I have an NFS partition P mounted locally from a remote machine.
> The problem is that the remote machine has died. When I do
>
> umount -f P
>
> I get a diagnostic whereby somebody is still using P. I try to find out
> who by means of fuser, and fuser hangs, apparently forever.
>
> How can I get rid of P without rebooting my box?

for any command that might access the file descriptor on the remote
machine, run it in the background. (i.e. type & at the end of the
line).

So you want to run fuser, or ps uaxwwe, or whatever to find the
process, then kill the process. And then unmount the filesystems. All
in the background.

The timeouts are exponential. Eventually the timeout will occur and
you will get a response. Eventually.
From: Robert Heller on
At Sat, 22 May 2010 13:41:47 +0000 (UTC) "James H. Markowitz" <noone(a)nowhere.net> wrote:

>
> I have an NFS partition P mounted locally from a remote machine.
> The problem is that the remote machine has died. When I do
>
> umount -f P
>
> I get a diagnostic whereby somebody is still using P. I try to find out
> who by means of fuser, and fuser hangs, apparently forever.
>
> How can I get rid of P without rebooting my box?

One of the (unfortunate) things about NFS is that it does not really
handle this situation well (never has). Once you start getting wedged
processes (often df's), the only solution is a reboot. OTOH, the hung
processes don't really consume much in the way of resources and there is
little chance of system breakage, so you can take your time and schedule
the reboot at some time that is otherwise least distruptive (like at 2am
or something).

>
>

--
Robert Heller -- 978-544-6933
Deepwoods Software -- Download the Model Railroad System
http://www.deepsoft.com/ -- Binaries for Linux and MS-Windows
heller(a)deepsoft.com -- http://www.deepsoft.com/ModelRailroadSystem/

From: unruh on
On 2010-05-22, Maxwell Lol <nospam(a)com.invalid> wrote:
> "James H. Markowitz" <noone(a)nowhere.net> writes:
>
>> I have an NFS partition P mounted locally from a remote machine.
>> The problem is that the remote machine has died. When I do
>>
>> umount -f P
>>
>> I get a diagnostic whereby somebody is still using P. I try to find out
>> who by means of fuser, and fuser hangs, apparently forever.
>>
>> How can I get rid of P without rebooting my box?
>
> for any command that might access the file descriptor on the remote
> machine, run it in the background. (i.e. type & at the end of the
> line).

??? Since almost any program could, that would essentially mean running
all programs in background, including the ones from the gui.
NFS needs a way of unmounting even if a filesystem is "in use". Yes, I
know that could cause troubles, but refusing to unmount a dead
filesystem also causes problems.

>
> So you want to run fuser, or ps uaxwwe, or whatever to find the
> process, then kill the process. And then unmount the filesystems. All
> in the background.

I have had this problem and none of lsof or fuser, or anything else
would tell me what program was using that dead filesystem. And it will
stubbornly refuse to unmount.
And what in the world does "in the background" do for you. Especially
running ps in the background, or fuser in the background.

>
> The timeouts are exponential. Eventually the timeout will occur and
> you will get a response. Eventually.
:-)
From: The Natural Philosopher on
Robert Heller wrote:
> At Sat, 22 May 2010 13:41:47 +0000 (UTC) "James H. Markowitz" <noone(a)nowhere.net> wrote:
>
>> I have an NFS partition P mounted locally from a remote machine.
>> The problem is that the remote machine has died. When I do
>>
>> umount -f P
>>
>> I get a diagnostic whereby somebody is still using P. I try to find out
>> who by means of fuser, and fuser hangs, apparently forever.
>>
>> How can I get rid of P without rebooting my box?
>
> One of the (unfortunate) things about NFS is that it does not really
> handle this situation well (never has). Once you start getting wedged
> processes (often df's), the only solution is a reboot. OTOH, the hung
> processes don't really consume much in the way of resources and there is
> little chance of system breakage, so you can take your time and schedule
> the reboot at some time that is otherwise least distruptive (like at 2am
> or something).
>

Seconded in every respect.

>>
>