Force umount on Linux

Posted by Martin Perron on May 19, 2009 in HowTo - Linux1 comment

Did you ever had a problem to unmount a drive/share on a linux system? Maybe the mount share is not accessible but the mount still there.

Example:

umount /mnt/blah
unmount error 16 = Device or resource busy
Refer to the umount.cifs(8) manual page (man 8 umount.cifs)

You can do the following:

umount -f /mnt/blah

If it doesnt work, use the lazyness method:

umount -l /mnt/blah

Test if your mount is still mounted with the command mount

mount

What man say about umount

man umount

-f     Force unmount (in case of an unreachable NFS system).  (Requires
kernel 2.1.116 or later.)

-l     Lazy unmount. Detach the filesystem from the filesystem  hierar-
chy now, and cleanup all references to the filesystem as soon as
it is not busy anymore.  (Requires kernel 2.4.11 or later.)

Enjoy!

  • Share/Save/Bookmark

1 comment

» Comments RSS Feed
  1. If you want to know what processes are keeping the filesystem busy, you can do:

    fuser -m /mnt/blah

Leave a comment