So, we need to manually unmount a mounted resource, for example a disk. We make sure that no program is using this disk or resource anymore, and run the umount command. However, the OS objects to this:
umount2: Device or resource busy
umount: /mymount: device is busy
in this example we (allegedly) tried to unmount the resource attached to the /mymount directory.
That is, the system refuses to perform the unmount operation because something is still using this resource. Most of the time that really is the case, and the unmount operation would cause a crash in the software that was using this resource or disk. However, there are also erroneous situations - the disk is in fact no longer in use, but the OS tables still have open handles left over.
Force unmount:
$ sudo umount -l /mymount
As we can see, the magic -l flag lets us force the unmount of this resource regardless of whether some piece of software is using our resource or not.
Comments