16

When I ran the command

umount /dev/mapper/ubuntu--gnome--vg-root I I got :

umount: /: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)

I tried some different options with the command lsof and fuser, but it didn't work so far.

Does anyone have any idea how to resolve this issue?

2
  • What issue, exactly? are you really trying to unmount the root filesystem of your running OS? Jan 4, 2017 at 1:30
  • This is a LVM partiton. I'm not an expert, but I should be able to resize this partition, but it is not the case actually.
    – user636872
    Jan 4, 2017 at 1:31

2 Answers 2

29

Please try this commands:

umount -l /PATH/OF/BUSY-DEVICE
umount -f /PATH/OF/BUSY-NFS(NETWORK-FILE-SYSTEM)

Reference: https://stackoverflow.com/questions/7878707/umount-a-busy-device

6
  • How could I find the path of busy-nfs?
    – user636872
    Jan 4, 2017 at 1:35
  • That command (-f) stands for --force, check the link, the author put it that way but you can use the path of your busy device. Also: oletange.blogspot.com/2012/04/umount-device-is-busy-why.html
    – Lv1z
    Jan 4, 2017 at 1:42
  • my autofs nfs share still hangs when I use -f Sep 17, 2017 at 5:37
  • 4
    umount -l worked for me. Thx. Jan 23, 2018 at 19:49
  • 1
    It's unbelievable how well this generally works when nothing else will. Though I run the -f and -l flags both on the same /dev/mapper/ path to the object (-f generally telling me whatever it is is not mounted though). So perhaps all that is really needed is the -l. NFS does not factor into my recovery scenarios, so I have no reason to look for an NFS path. This technique has saved me on a few occasions though. It will absolutely let you rip the filesystem out from under you though, so proceed with caution. Jan 5 at 22:37
0

try these:

dmsestup ls

if your output contain "ubuntu--gnome--vg-root" then try to deactivate lvm volume at first, then try to umount your volume:

lvchange -an "Path-to-Your-LVM-Volume (in this case: /dev/mapper/ubuntu--gnome--vg-root)"

umount /dev/mapper/ubuntu--gnome--vg-root

You must log in to answer this question.