Resolving LVM Metadata Corruption
LVM or Logical Volume Manager for Linux is responsible for managing mass-storage devices like disk drives. It allows you to add or replace disks, resize disk partition, take snapshots and resize dynamic volumes etc. LVM metadata holds critical system information and if it gets corrupted, you cannot access the stored data.
Such situations necessitate the use of appropriate tools to fix LVM metadata corruption or repartition and reformat the hard disk as a whole. You will need to use your last backup to restore the information that has got lost while the process. In critical situations, when you don´t find data backup in suitable state to restore or backup doesn´t exist at all, you are suggested to immediately use third-party Linux Recovery applications on the affected hard disk.
LVM metadata corruption is not so frequent. But if system prompts it as corrupted, high odds are that file system is also damaged. In such situations if you will try o activate the volume group, you will checksum errors, followed by these error messages:
"Couldn´t read volume group metadata.
Volume group sales metadata is inconsistent"
LVM maintains the metadata backup for all devices in /etc/lvm/backup and /etc/lvm/archive, if you haven´t turned off the auto backup feature of LVM. Thus if LVM metadata gets damaged someway, you can restore it. To resolve the above issue, consider following these methods:
• Restore the LVM metadata using vgcfgrestore. It will work if the damages to LVM metadata are minor.
• If the damage to LVM metadata is large, the disk will not be recognized. In such cases, you first need to restore the UUID for the missing device. To do so, compare the output of pvscan and cat /proc/partitions and paste the required UUID using pvscan results. You can then use vgcfgrestore to restore LVM metadata.
• After applying any of the above methods, it is required that you run a file system check using fsck. The file sytem might be damaged. If this doesn´t help, reformat the disk and use your most recent data backup to restore the lost data.
If data backup is not present or exists in invalid state, use Data Recovery Linux applications. These are read-only Linux Data Recovery tools that perform safe and complete data recovery from logically crashed Linux disks.
Stellar Phoenix Linux Data Recovery is a complete and advanced tool to recover lost data from Ext2, Ext3 and Reiser FS formatted drives. It offers various advanced Data Recovery Linux options, like RAW File Recovery, Create Image, File Filter, Append Header etc. The software is compatible with almost all Linux distributions including Red Hat, SUSE, Debian, Turbo Linux etc.