[linux-lvm] Corrupted LV after resize2fs crashed when adding new disk to LV

Stuart D. Gathman stuart at bmsi.com
Thu Oct 8 19:37:34 UTC 2009


On Thu, 8 Oct 2009, Ken Bass wrote:

> The last command - resize2fs - crashed before completing.

Did you let resize2fs default to the device size?

> After that:
> 
> - vgdisplay showed a total 442G for VolGroup3W (the original size plus the
> new PV) - that's okay
> - lvs showed a total of 331G for LogVol3W (the original size, without the
> new PV)

Assuming the previous answer was yes (if 'no', then that is your problem),
looks like the LVM metadata got rolled back.  (Effectively undoing the
lvextend.)  When that happened is when resize2fs crashed.

> When I run e2fsck and answer 'n' to abort, I get 2648 Group checksum errors,
> and after answering 'y' to fix them, I get this:

Bad move, when things go south, you want to leave things unmodified until
you figure it out.

> So it seems to me, IMHO, that the LVM is looking at one set of data, while
> the other utilities (eg, mount, e2fsck) are looking at another. I am

No, the mount,e2fsck are looking at a filesystem on an LV that got reduced (mid
resize, apparently).  Did you do 'lvs' before starting the resize?

> assuming that the original LV data is still intact, just somewhere the file
> size/block count is wrong.(one place says the original size, the other sees
> the size with the new disk (attempted to be) added.
> 
> Is there ANY way possible to rectify this? PLEASE!!!

Look at your metadata backups, and see if you can find the version with
the larger LV.  Look at the timestamp on the revert to get a clue on
how it got reverted.

First, I would make a copy of what you got (it will fit on a cheap
external USB disk) before making any more mods.  Then restore the metadata
to the extended LV before retrying e2fsck.

Disclaimer, I am not an LVM expert.

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.




More information about the linux-lvm mailing list