Forcibly Unmounting NFS Filesystems

forcibly unmounting nfs filesystems
summary & for more information
15
summary
There are many times when an NFS filesystem will be in a state where it cannot be
unmounted. In some situations these filesystems are considered “busy” for legitimate
reasons – such as when processes are actively accessing the filesystem or when one or
more processes are holding buffer cache memory resources that reference the filesystem.
At other times a filesystem may be erroneously deemed “busy,” where the filesystem
cannot be unmounted even though no processes are accessing or referencing it.
Whatever the cause, when a filesystem cannot be successfully unmounted and the NFS
server system stops responding to requests, either because it has suffered a hardware or
software failure or because it is simply overwhelmed with requests, the result can be client
application hangs or similar interruptions of service, leading to user frustration and loss of
productivity. At times such as these, it may be desirable to find a way to remove these
filesystems from the client until the NFS server’s responsiveness can be restored. While
HP does not currently provide a mechanism to directly force a client to unmount a “busy”
or “hung” NFS filesystem in HP-UX 11.0 or 11i v1/v2, HP is considering providing this
functionality in an upcoming release of HP-UX.
Until such time as a forcible unmount feature is supported by HP-UX, there are many steps
you can take in your current environment to alleviate the negative impact of these “hung”
filesystems. In most cases the fuser(1M) command can be used to identify and kill the
processes that are accessing or referencing the filesystem, thus allowing the filesystem to
be unmounted. When this fails, a temporary “surrogate” NFS server can be configured
to return an error to the clients, which usually causes the client applications to release
their hold on the “hung” filesystem. Sometimes simply waiting for a period of time and
trying the umount(1M) command again may succeed.
In addition, there are preventative measures you can take to avoid experiencing this
“hung” filesystem problem. HP has released software patches that address defects in our
NFS client kernel code and virtual memory subsystem that erroneously caused filesystems
to be deemed “busy” when there were no legitimate users of the filesystem. There are
also patches for the fuser(1M) command that address problems where fuser(1M) was not
correctly identifying all processes accessing a mounted NFS filesystem. The “soft” NFS
mount option can be used (with caution) to allow client applications to eventually give up
trying to contact an unresponsive NFS server. Finally, HP’s MC/ServiceGuard and
Highly Available NFS products can be used to create a cluster of highly available NFS
servers, which can alleviate the problem of unresponsive NFS servers entirely.
for more
information
To learn more about HP’s MC/ServiceGuard and Highly Available NFS products, contact
your local HP sales representative or visit our Web site at: http://www.hp.com/go/ha
.
For information about HP’s NFS product family or the various commands used throughout
this paper, visit HP’s Documentation Repository Web site at: http://docs.hp.com
or HP’s
IT Resource Center Web site at: http://itrc.hp.com
.
The information in this document is subject to change without notice.
© Copyright Hewlett-Packard Company 2003