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?

  • What issue, exactly? are you really trying to unmount the root filesystem of your running OS? – steeldriver Jan 04 '17 at 01: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. –  Jan 04 '17 at 01:31

2 Answers2

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

Lv1z
  • 331
  • 2
  • 4
  • How could I find the path of busy-nfs? –  Jan 04 '17 at 01: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: http://oletange.blogspot.com/2012/04/umount-device-is-busy-why.html – Lv1z Jan 04 '17 at 01:42
  • my autofs nfs share still hangs when I use `-f` – Sridhar Sarnobat Sep 17 '17 at 05:37
  • 4
    umount -l worked for me. Thx. – Konrad Gajewski Jan 23 '18 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. – SeligkeitIstInGott Jan 05 '23 at 22:37
  • `umount -l`does not actually unmount the filesystem. Please be sure to understand the implications of using `umount -l`. – ChristophK Sep 02 '23 at 09:35
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
scarface_90
  • 176
  • 4