On Thu, Sep 09, 2021 at 03:11:45PM -0400, brian wrote: > I switched over to ubuntu and got the error "Device or resource busy". How > do I get around this error? > > Here is what I did: > --------------------------------------------------------- > sudo apt-get install qemu > sudo apt install qemu-utils > sudo apt-get install xfsprogs > > sudo modprobe nbd max_part=8 > > sudo qemu-nbd --connect=/dev/nbd0 > /media/sf_virtual_machine_share/centoOS7Python3p9_tmp-disk1.vdi > > sudo xfs_repair /dev/nbd0p2 > --------------------------------------------------------- > > I got the error: > --------------------------------------------------------- > xfs_repair: cannot open /dev/nbd0p2: Device or resource busy > --------------------------------------------------------- Because /dev/nbd0p2 is not the device the filesystem is on. The filesystem is on a lvm volume: > brian@brian-VirtualBox:~/Desktop$ sudo lvmdiskscan > /dev/loop0 [ 219.00 MiB] > /dev/loop1 [ <55.44 MiB] > /dev/sda1 [ 512.00 MiB] > /dev/nbd0p1 [ 1.00 GiB] > /dev/loop2 [ <65.10 MiB] > /dev/nbd0p2 [ <101.71 GiB] LVM physical volume As noted here. > cmd: > --------------------------------------------------------- > sudo lvscan > --------------------------------------------------------- > > Result: > --------------------------------------------------------- > ACTIVE '/dev/centos/swap' [2.00 GiB] inherit > ACTIVE '/dev/centos/home' [<49.70 GiB] inherit > ACTIVE '/dev/centos/root' [50.00 GiB] inherit > --------------------------------------------------------- And these are the devices inside the LVM volume that contain filesystems/data. Likely the one you are having trouble with is /dev/centos/root, but there may be issues with /dev/centos/home, too. And to answer your other question, "<dev>" is just shorthand for "<insert whatever device your filesystem is on here>". i.e. /dev/centos/root in this case... Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx