Linux – Lazy Umount or Unmounting a Busy Disk

linuxumount

I have read that it is possible to 'umount' a disk that is otherwise busy by using the 'lazy' option. The manpage has this to say about it:

umount – unmount file systems

-l Lazy unmount. Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as
it is not busy anymore. This option allows a "busy" filesystem
to be unmounted. (Requires kernel 2.4.11 or later.)

But what would be the point in that? I considered why we dismount partitions at all:

  1. To remove the hardware
  2. To perform operations on the filesystem that would be unsafe to do while mounted

In either of these cases, all a 'lazy' unmount serves IMHO is to make it more difficult to determine if the disk really is dismounted and you can actually proceed with these actions. The only application for umount -l seems to be for inexperienced users to 'feel' like they've achieved something they haven't.

Why would you use a lazy unmount?

Best Answer

Because you're lazy - you want to unmount after the disk operations are done.

Here's a plausible scenario:

You're using rsync to perform your backups and walk away. You can umount -l the drive and once it's finished copying and synched, it unmounts, so that when you come back after a break (that you know will take longer than the backup) you can just unplug the drive instead of having to fiddle with the keyboard again.