Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




13.9. Recover physical volume metadata

If you get the warning "incorrect metadata area header checksum" or something about not being able to find PV with UUID foo, you probably toasted the volume group descriptor area and lvm startup can't occur.

WarningOnly run on non-functional VG

Don't do this on a properly working lvm. You need to specify the correct physical volume to pvcreate or you may lose your data.

Extract the exact uuid for the PV that was overwritten from the file /etc/lvm/archive/ (Where XXXXX represents the number of the last known good archived lvm metadata).

Use pvcreate to restore the metadata: pvcreate --uuid "<some_long_string>" --restorefile /etc/lvm/archive/ <PhysicalVolume>

If you are lucky you'll find that the on-disk lvm metadata takes at least so much space as what it was overwritten with. The above command has been know to recover a PV overwritten with mkswap. If whatever overwrote the VGDA writes past that area, LVs may be affected. In this case, fsck might be able to fix the filesystem on the LV, or you may need more drastic measures to pull data off of it. Contact your local friendly filesystem expert for help in that case.


pvcreate only overwrites the lvm metadata areas on disk and doesn't touch the data areas (the logical volumes).

  Published under the terms of the GNU General Public License Design by Interspire