Linux - Howto recreate/restore PV/VG

Ohhhh.. I have lost the LVM metadata information on all my discs ... I lost all VG information .... vgscan , vgdisplay, pvscan, pvs, doesn't show any VG information! All disks are aviable on server and I can see It with multipath, but when I run pvscan/pvs, there's no LVM information on It.

May still have a hope of retrieving information from the PV / VG.

Run the procedure under their responsibility, the procedure described below could remove the entire contents of your VG.

Go to /etc/lvm/archiver/

cat from last copy from your vg file:


pv0 {
id = "2RP6OX-w6uo-smtQ-Vp05-avud-2uwE-Db5duT"
device = "/dev/mapper/LX_DB01_DATOS_1"

pv1 {
id = "u5f5kk-S2Sf-QhrY-WTCR-Xnzz-he9G-N0M5Nc"
device = "/dev/mapper/LX_DB01_REDOS_1"

pv2 {
id = "m9Ji4x-9RWW-rdWV-GBJ0-e62y-9Ipu-pdacLy"
device = "/dev/mapper/LX_DB01_REDOS_2"

pv3 {
id = "0iiGPY-zfBT-cV3u-PnQV-e2Z4-Y1hp-dmUtSY"
device = "/dev/mapper/LX_DB01_RESTO"

Recreate pv metada on disk header:

pvcreate --uuid "2RP6OX-w6uo-smtQ-Vp05-avud-2uwE-Db5duT" --restorefile /etc/lvm/archive/ /dev/mapper/LX_DB01_DATOS_1

pvcreate --uuid "u5f5kk-S2Sf-QhrY-WTCR-Xnzz-he9G-N0M5Nc" --restorefile /etc/lvm/archive/ /dev/mapper/LX_DB01_REDOS_1

pvcreate --uuid "m9Ji4x-9RWW-rdWV-GBJ0-e62y-9Ipu-pdacLy" --restorefile /etc/lvm/archive/ /dev/mapper/LX_DB01_REDOS_2

pvcreate --uuid "0iiGPY-zfBT-cV3u-PnQV-e2Z4-Y1hp-dmUtSY" --restorefile /etc/lvm/archive/ /dev/mapper/LX_DB01_RESTO

Restore vg:

vgcfgrestore vgDB01