Operations 7 min read

How to Force‑Unmount a Busy NFS Share on Linux: Step‑by‑Step Guide

This guide explains why NFS mounts can become "device busy", shows how to locate the processes holding the mount with lsof and fuser, demonstrates safe termination of those processes, and covers both regular and lazy unmount techniques to reliably release the filesystem.

Open Source Linux
Open Source Linux
Open Source Linux
How to Force‑Unmount a Busy NFS Share on Linux: Step‑by‑Step Guide

When an NFS mount reports “device is busy”, you must identify and stop the processes using the mount point before forcing an unmount.

Using lsof

The lsof command lists all open files on a specific filesystem, revealing which processes are accessing the NFS directory. # lsof /mnt/nfs/linoxide_srv/ Typical output shows processes such as bash and vim with their PIDs. After confirming that the user has saved work, you can terminate the processes:

# kill -9 24098
# kill -9 24125

Using fuser

The fuser command identifies processes that prevent unmounting. Use the -m option to specify the mount point and -v for a verbose listing. # fuser -mv /mnt/nfs/linoxide_srv/ Output displays the user, PID, access mode, and command. To kill all processes accessing the mount point, add the -k option:

# fuser -kmv /mnt/nfs/linoxide_srv/

Standard unmount

After terminating the interfering processes, attempt a normal unmount: # umount /mnt/nfs/linoxide_srv/ If successful, df -h will no longer list the mount point.

Lazy (delayed) unmount

If the mount remains busy, you can perform a lazy unmount with the -l flag. This removes the mount from the namespace while allowing existing references to continue until they close. # umount -l /mnt/nfs/linoxide_srv/ Check the exit status ( echo $?) – a zero indicates success. Verify the mount point is gone with df -h.

Using lsof and fuser to locate and terminate blocking processes, followed by a regular or lazy unmount, reliably resolves "device is busy" errors on NFS mounts.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxSystem AdministrationNFSlsoffuserumount
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.