From: "J. Bruce Fields" <bfields@fieldses.org>
To: Martin Hicks <mort@bork.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: server mountpoint busy after unexporting nfs4 share
Date: Mon, 19 Aug 2013 14:42:12 -0400 [thread overview]
Message-ID: <20130819184212.GA15945@fieldses.org> (raw)
In-Reply-To: <CAJUS3Xk=vqunKx8bKGV2iWTV=o9N_TX3h+2PL0iMm3m7FKjuig@mail.gmail.com>
On Mon, Aug 19, 2013 at 11:55:58AM -0400, Martin Hicks wrote:
> Hi Bruce,
>
> On Fri, Aug 16, 2013 at 5:12 PM, J. Bruce Fields <bfields@fieldses.org> wrote:
> > On Thu, Aug 15, 2013 at 12:04:33PM -0400, Martin Hicks wrote:
> >> I'm wondering if I'm missing something or if this is a bug.
> >>
> >> A NFS4 export has active clients. The mount is removed from
> >> /etc/exports and 'exportfs -r' is run. Clients immediately start
> >> getting 'Stale file handle' errors, but the mountpoint is still busy
> >> and cannot be unmounted. Killing off nfsd solves the problem, but is
> >> undesirable for obvious reasons.
> >>
> >> On debian linux, kernel version 3.10-2-amd64, with nfs-utils 1.2.8.
> >
> > Yeah, the clients may hold opens or locks on the filesystem and those
> > don't get removed on exports -r.
> >
> > For now shutting down the server is the only solution.
> >
> > We could possibly fix that, or provide some other way to do whatever it
> > is you're trying to do, but it's likely not a small change.
>
> Essentially I've got a NAS with two doors that have removable disks
> behind them. I get a signal from hardware when one of the doors is
> opened, and I need to kill services, unmount and remove the block
> device very quickly so the user can remove or swap disks. I was
> trying to avoid killing nfsd so that any clients connected to the
> block device behind the other door could continue uninterrupted.
OK, understood, so you're mainly worried about access to the remaining
data continuing uniterrrupted.
That said--it's *really* not a problem that the other stuff starts
erroring out immediately? I imagine the typical application isn't
going to handle the errors very gracefully.
> If this isn't possible then I need to minimize the downtime to the
> other disk. With quick experiements this morning if I simply restart
> nfs it seems to take between 60 and 90 seconds for the client to start
> doing IO again. I haven't tracked down the reason yet, but it seems
> like the server is preventing the client from doing IO for some
> time...
It's probably the grace period (which will block pretty much any IO for
clients using NFSv4).
--b.
next prev parent reply other threads:[~2013-08-19 18:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-15 16:04 server mountpoint busy after unexporting nfs4 share Martin Hicks
2013-08-16 21:12 ` J. Bruce Fields
2013-08-19 15:55 ` Martin Hicks
2013-08-19 18:42 ` J. Bruce Fields [this message]
2013-08-20 17:49 ` Martin Hicks
2013-08-21 2:43 ` NeilBrown
2013-08-21 11:27 ` J. Bruce Fields
2013-08-22 13:44 ` Martin Hicks
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=20130819184212.GA15945@fieldses.org \
--to=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=mort@bork.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).