Posts

Showing posts with the label lvm

Recovering from a failed LVM2 pvmove

After I left a loop moving the data from my LVM2 LVs to a new raid1 array overnight (I wanted to also reorder the LVs physically at the beginning of the disk) I came back in the morning to see that one of the moves had hung. I killed it, and the loop kept going. Unfortunately something had already gone wrong and I had to issue pvmove --abort to get things in order. And that almost worked, except I started getting these: > sudo lvs --all Number of segments in active LV pvmove0 does not match metadata Number of segments in active LV pvmove0 does not match metadata LV VG Attr LSize Origin Snap% Move Log Copy% Convert  download lionvg -wi-ao 200.00g home lionvg -wi-ao 100.00g kvmpool lionvg -wi-ao 50.00g opt lionvg -wi-ao 15.00g [pvmove0] lionvg p-C-a- 0 repos lionvg -wi-ao 2.00g root lionvg -wi-ao 4.00g  usr lionvg -wi-ao 20.00g var lionvg -wi-ao 20.00g I was furthermore unable to destroy or make inac...

LVM metadata corruption

I had the biggest PC related scare a couple of days ago. After I had two disks in my RAID5 fail in a very short amount of time and only pure luck saved my data I moved to RAID6 and I felt safer. That was, until two days ago I ran: # pvs -v pvs Scanning for physical volume names pvs Incorrect metadata area header checksum pvs Incorrect metadata area header checksum pvs WARNING: Volume Group vg0 is not consistent pvs Incorrect metadata area header checksum pvs Incorrect metadata area header checksum pvs PV VG Fmt Attr PSize PFree DevSize PV UUID pvs /dev/md2 vg0 lvm2 a- 1.80T 922.19G 1.80T Y9naEo-OKG6-0ZyX-qmZX-u3JP-uCPg-cE1hVX Ooops. Not looking good. # vgs -v vgs Finding all volume groups vgs Incorrect metadata area header checksum vgs Finding volume group "vg0" vgs Incorrect metadata area header checksum vgs Incorrect metadata area header checksum vgs VG Attr Ext #PV #LV #SN VSize VFree VG UUID vgs vg0 wz--n- 4.00M 1 15 ...