0

My virtual machine had a power failure and forced shutdown, when I restarted it, it entered rescue mode and reported the following error, I want to know how I should start it, there is some information in it that I need

[23.8678251XFS(sda1): Metadata corruption detected at xfs_agf_read_verify+8
×78/0×128[ xfs], xfs_agf block 8x1
[23.071343] XFS(sda1): Unmount and run xfs_repair
[23.072926] XFS(sdal): First 64 butes of corrupted metadata buffer:

I'm using VMware, image is centos7, vm storage is host's disk, I mean, my physical machine had a power failure, VM was forced to shut down,

Report error picture

Nikita Kipriyanov
  • 10,947
  • 2
  • 24
  • 45
  • You mount your disk in the host or boot with live environment and run xfs_repair as it suggests. Make backup of the VM image before doing that. To have more detailed instructions, please, elaborate your question more: what virtualization system you use, how the VM disk is stored (file in some host file system? Logical volume? ZFS pool?), what means "VM had a power failure" — a host had a power failure perhaps, VM couldn't; also, what OS distribution is used in the VM — that suggests which tools are available directly in the initramfs. – Nikita Kipriyanov Nov 18 '22 at 05:19
  • Thank you very much, I'm using `VMware`, image is `centos7`, vm storage is host's disk, I mean, my physical machine had a power failure, VM was forced to shut down, as you said, I tried to use `xfs_repair` – 山河以无恙 Nov 18 '22 at 06:10
  • So, what `xfs_repair -n /dev/sda1` said about you file system? Note that it should have xfs_repair utility included directly into the initramfs; you must have been able to run it from the initramfs emergency shell it dropped you into. Run xfs_repair with `-v` flag if you need more verbose output. `-n` doesn't write any changes, only detects and explains corruptions; this is safest way to run it for the first time to get an impression on the scale of the problem. – Nikita Kipriyanov Nov 18 '22 at 09:40
  • @NikitaKipriyanov Thank you very much for your patient answer, it solved my problem – 山河以无恙 Nov 18 '22 at 16:53

0 Answers0