What is force umount and lazy umount in Linux and which option we should use ?

Today we will see how to do force umount a partition and how to use lazy umount in case force umount fails.

1. Syntax

Force umount
# umount -f

Lazy Umount
# umount -l

2. Use of Force mount
The first step when we are not able to mount the filesystem, we use to try “force umount” to umount the filesystem forcefully.
This option is useful when a NFS filesystem is not reachable, and is not responding and we want it to interrupt and umount forcefully.

3. Use of Lazy umount
Lazy unmount detaches the filesystem from system hierarchy and clean up all references to our filesystem as soon as it is not busy anymore. This option is available only with kernel version 2.4.11+ and above.

Why lazy umount is useful ?
Sometimes when the partition got hung and not responding to umount -f option, then there is a trick to remove this partition from system mount hierarchy by using lazy mount and proceed further, however this doesn’t actually umount the partition.
Caution:- The point to keep in mind is not to touch this partition content after umounting to avoid any filesystem corruption.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments