User Tools

Site Tools



What to do if your lvm volume group get damaged by bugs like 81841? This is what happened to me lately. Luckily, I did not loose any data, but had to recover my phisical volume. This is described at

Long story short: Make sure you have a recent backup of /etc/lvm/archive/ with XXXX being incremented each time you create or remove a logical (snapshot) volume. No you need to issue these commands from e.g. a live cd:

pvcreate --uuid "<some_long_string>" --restorefile /etc/lvm/archive/ <PhysicalVolume>

Note that if used correctly, this doesn't destroy your physical volume, but only touches the (destroyed) metadata. After this, you most probably need to recover your volume group metadata. This is done with the tool 'vgcfgrestore':

vgcfgrestore --file /etc/lvm/archive/ --test --verbose -n /dev/$PV

With $PV being your damaged physical volume.




blog/lvm-recovery.txt · Last modified: 2008/10/18 17:56 (external edit)