Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Jul 2017 22:43:29 +0000
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>
Subject:   Review of an NFS forced dismount option
Message-ID:  <YTXPR01MB0189E2DF72AF29B4E788420ADDB80@YTXPR01MB0189.CANPRD01.PROD.OUTLOOK.COM>

next in thread | raw e-mail | index | archive | help
I have put a patch on https://reviews.freebsd.org/D11735 which I'd apprecia=
te
any reviews of. It is an attempt at fixing the NFS client problem where a
"umount -f" of an NFS mount point gets hung because a "df" or non-forced "u=
mount"
has already been done on the mount point.

Here's the summary for it:
If an NFS mount point is hung due to an unresponsive NFS server, a "umount =
-f" will unmount the mount point, if the "umount" executes the NFS VFS_UNMO=
UNT() call.
Unfortunately, this often won't happen. Typically this fails when a process=
, such as "df" or
a "umount" without "-f" is hung on the mountpoint while holding a lock, suc=
h as the vnode
lock for the mounted-on vnode.
=20
This patch adds a new option to umount called "-N" which does the forced di=
smount but
bypasses the checking in umount.c (which often gets hung as above) and by d=
oing an nfssvc() syscall to ensure that any process hung on the mount point=
 fails, so any locks get released. It can then reliably do the forced dismo=
unt.
Unfortunately, since it doesn't do any checking, it only works if the mount=
ed-on path is
specified exactly as it was at mount time (and is stored in mnt_stat.f_mnto=
nname).



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