From: Ben Greear <greearb@candelatech.com>
To: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: Killing process in D state on mount to dead NFS server.
Date: Thu, 31 Jul 2014 12:52:54 -0700 [thread overview]
Message-ID: <53DA9E96.8080100@candelatech.com> (raw)
In-Reply-To: <20140731194936.GB29395@us.ibm.com>
On 07/31/2014 12:49 PM, Malahal Naineni wrote:
> Ben Greear [greearb@candelatech.com] wrote:
>> So, this has been asked all over the interweb for years and years, but
>> the best answer I can find is to reboot the system or create a fake NFS
>> server somewhere with the same IP as the gone-away NFS server.
>>
>> The problem is:
>>
>> I have some mounts to an NFS server that no longer exists (crashed/powered down).
>>
>> I have some processes stuck trying to write to files open on these mounts.
>>
>> I want to kill the process and unmount.
>>
>> umount -l will make the mount go a way, sort of. But process is still hung.
>> umount -f complains:
>> umount2: Device or resource busy
>> umount.nfs: /mnt/foo: device is busy
>>
>> kill -9 does not work on process.
>>
>>
>> Aside from bringing a fake NFS server back up on the same IP, is there any
>> other way to get these mounts unmounted and the processes killed without
>> rebooting?
>
> You don't need a fake NFS server, you just need a fake or real server
> with that IP address. A popular way is to alias that IP on the NFS
> client itself.
>
> See the second popular answer below:
> http://stackoverflow.com/questions/40317/force-unmount-of-nfs-mounted-directory
In my case, routing is set up so that the NFS traffic always exits the system, so
doing a local IP that matches the server is not an option. It also seems like a
horrible hack that should have a better solution :P
Thanks,
Ben
>
> Regards, Malahal.
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
next prev parent reply other threads:[~2014-07-31 19:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-31 18:00 Killing process in D state on mount to dead NFS server Ben Greear
2014-07-31 19:49 ` Malahal Naineni
2014-07-31 19:52 ` Ben Greear [this message]
2014-07-31 20:42 ` NeilBrown
2014-07-31 21:20 ` Ben Greear
2014-07-31 21:50 ` Killing process in D state on mount to dead NFS server. (when process is in fsync) NeilBrown
2014-08-01 12:47 ` Jan Kara
2014-08-02 1:21 ` Jeff Layton
2014-08-02 1:50 ` Roger Heflin
2014-08-02 2:07 ` Jeff Layton
2014-08-02 2:55 ` Trond Myklebust
2014-08-02 3:19 ` NeilBrown
2014-08-02 3:44 ` Trond Myklebust
2014-08-13 15:42 ` Killing process in D state on mount to dead NFS server Ben Greear
2014-08-13 21:18 ` NeilBrown
2014-08-13 21:22 ` Ben Greear
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53DA9E96.8080100@candelatech.com \
--to=greearb@candelatech.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).