Various reasons for the failure of an umount command

An umount command usually fails with the following message:
umount: /mnt/test: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))

The referenced blog post lists most reasons for an umount to fail. The use of lsof and fuser is quite common knowledge. However the use of the -v option with lsof is not. Eg. if you try to umount an NFS exported directory and run lsof and fuser, both will produce nothing. But the umount still fails. If you run fuser with the -v option, it'll point out the culprit, namely the kernel's NFS code holding locks on the given partition (as explained here):
# fuser -v -m /mnt/test
                      USER        PID ACCESS COMMAND
/mnt/test:            root     kernel mount /mnt/test

Syndicate content