Monday, April 13, 2009

Umount / Umount2 device is busy

I was playing with a UML installation on debain, and after
finishing stuff needed for the installation, I needed to manually
unmount the partition. So I started with the simple umount -


$> umount /mnt/uml/
umount: /mnt/uml: device is busy

So I figured the issue could be solved by a forced unmount which led to -

node1-1:~/# umount -f /mnt/uml
umount2: Device or resource busy
umount: /mnt/uml: device is busy
umount2: Device or resource busy
umount: /mnt/uml: device is busy
Finally, after searching the only solution that seems to do the trick is
a lazy unmount -

node1-1:~/# umount -l /mnt/uml
node1-1:~/#
Lazy unmounting works the smart way by detatching the filesystem from the
hierarchy as soon as the command is issued and does the reference cleanup as
soon as it detects that the device is not busy anymore. An alternative approach
to this may involve finding out what operation is causing the device to be busy
using utilities like fuser. However doing it the "lazy" way is always easier.

0 comments:

Post a Comment