Forcibly Unmounting NFS Filesystems
forcibly unmounting nfs filesystems
available solutions
6
4. Use the fuser(1M) command with the “-k” option to kill the processes holding files
open in the target filesystem. (See important fuser(1M) syntax note below.)
5. Issue the umount(1M) command again to successfully unmount the NFS filesystem
now that all processes holding files open in the filesystem have been killed.
Figure 1 - fuser(1M) successfully killing processes holding an NFS filesystem busy
In the above example, fuser(1M) was able to correctly identify and kill the processes that
were holding the NFS filesystem busy, thus allowing the filesystem to be successfully
unmounted while the NFS server was down.
important note on fuser(1M) syntax with NFS filesystems
When using fuser(1M) to query NFS filesystems, always specify the target filesystem
using the format “server:/filesystem” as opposed to specifying client-side path where
the filesystem is mounted. For example, in the case of the following NFS filesystem:
Filesystem Mounted on
hpatcux6:/opt/netscape /nfs_mount
The target filesystem specified on the fuser(1M) command line should be
hpatcux6:/opt/netscape and not /nfs_mount.
fuser(1M) is able to recognize the server:/path syntax as being an NFS filesystem and
it makes no attempt to stat() the remote filesystem, which in the case of a down NFS
server would result in an fuser(1M) hang.