Re: Repair Metadata corruption detected at xfs_inode_buf_verify on CentOS 7 virtual machine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was able to get /home mounted and copy my data off.  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 mkdir /mnt/dirNbd0p2

sudo mount -o ro,norecovery /dev/mapper/centos-home /mnt/dirNbd0p2
---------------------------------------------------------

I couldn't get the vdi corruption fixed but I did get my data.


@Dave

Thank you for your help.

Brian



On 09/09/2021 05:09 PM, Dave Chinner wrote:
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.





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux