Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Aug 2013 08:50:40 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Mark Felder <feld@FreeBSD.org>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: fixing "umount -f" for the NFS client
Message-ID:  <1440314933.15156431.1377780640143.JavaMail.root@uoguelph.ca>
In-Reply-To: <1377779585.6006.15542805.33D96D05@webmail.messagingengine.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Mark Felder wrote:
> On Wed, Aug 28, 2013, at 19:15, Rick Macklem wrote:
> > I've been doing a little more testing of "umount -f" for NFS
> > mounts and they seem to be working unless some other process/thread
> > has busied the file system via vfs_busy().
> > 
> > Unfortunately, it is pretty easy to vfs_busy() the file system
> > by using a command like "df" that is stuck on the unresponsive
> > NFS server.
> > 
> 
> always mount your nfs with options "soft,intr" or you'll run into
> this
> :)
I'm not sure if your smiley is because you already know what I think
of "soft, intr", but...

Application software generally doesn't expect I/O syscalls (read, write...)
to fail with ETIMEDOUT or EINTR. As such, I would never use "soft", except
maybe for some read-only volume where intermittent failures aren't an issue.
As for "intr", I believe that processes can get stuck in uninterruptible
situations when they are waiting for a buffer/page that is in use by
another thread (that no "intr" signal has been issued for). However,
this just means the process won't "interrupt", so so long as there isn't
an unexpected interruption caused by a signal, it could be ok.

Finally, neither of these options are safe to use for NFSv4, because
operations that manipulate state (like locks) cannot be safely interrupted,
since they will leave the lock in an undefined state, at least for the
FreeBSD server.
So, at least for NFSv4, a forced dismount is a necessary alternative.

Personally, when I was a sysadmin, I tried to make sure my NFS server and
network ran reliably and always used hard mounts (no "intr, soft") to avoid
the issue.

rick

> _______________________________________________
> freebsd-fs@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1440314933.15156431.1377780640143.JavaMail.root>