unmount a Linux disk partition centos

To unmount a Linux disk partition centos

# umount /dev/sda1

Type the command to unmount /mnt forcefully:
# fuser -km /mnt
Where,

  • -k : Kill processes accessing the file.
  • -m : Name specifies a file on a mounted file system or a block device that is mounted. In above example you are using /mnt

Linux umount command to unmount a disk partition
You can also try umount command with –l option:
# umount -l /mnt
Where,

  • -l : Also known as 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 works with kernel version 2.4.11+ and above only.

If you would like to unmount a NFS mount point then try following command:
# umount -f /mnt
Where,

  • -f: Force unmount in case of an unreachable NFS system

Caution: Using these commands or option can cause data loss for open files; programs which access files after the file system has been unmounted will get an error.

 

Leave a Reply