Couldn't find device with uuid - Recover LVM Metadata Linux

Couldn't find device with uuid, Recover LVM Metadata, recover linux lvm metadata, restore uuid, how to restore uuid, lvm error couldn't find device with uuid

This post shows you how to recover LVM physical volume metadata in linux when you get an error something like "Couldn't find device with uuid". This is mostly because of a physical volume is accidentally removed, overwritten or destroyed. So LVM wont be able to find a original physical volume associated with a Volume Group with particular UUID, hence you get an below error when you use any lvm commands.
  Couldn't find device with uuid 'FmGRh3-zhok-iVI8-7qTD-S5BI-MAEN-NYM5Sk'.
  Couldn't find all physical volumes for volume group vgroot.
By writing a new metadata on the new physical volume by using the existing UUID, we can recover the LVM Metadata. From the above error, we have got the UUID "FmGRh3-zhok-iVI8-7qTD-S5BI-MAEN-NYM5Sk".

Couldn't find device with uuid - Recover LVM Metadata Linux

By default, the LVM label is placed in the second 512-byte sector. The LVM label identifies the device as an LVM physical volume which contains the UUID for the physical name. It also stores the size of block devices in bytes, and LVM metadata stored on the disk. An identical copy of the metadata is maintained in every metadata area in every physical volume within the volume group.

Lets get started.

Confirm the UUID of the physical volume from the corresponding VG (vgroot) file (VolumeGroupName_xxxx.vg) under the directory /etc/lvm/archive.
[root@learnitguide1 ~]# cat /etc/lvm/archive/* | grep -i "FmGRh3-zhok-iVI8-7qTD-S5BI-MAEN-NYM5Sk"
id = "FmGRh3-zhok-iVI8-7qTD-S5BI-MAEN-NYM5Sk"
Restoring UUID to recover the LVM Metadata
[ads-post]
Use the --uuid and --restorefile arguments of the pvcreate command to restore the physical volume.
[root@learnitguide1 ~]# pvcreate --uuid "FmGRh3-zhok-iVI8-7qTD-S5BI-MAEN-NYM5Sk" --restore /etc/lvm/backup/vgroot_xxxx.vg /dev/sdd
  Couldn't find device with uuid FmGRh3-zhok-iVI8-7qTD-S5BI-MAEN-NYM5Sk.
  Writing physical volume data to disk "/dev/sdd"
  Physical volume "/dev/sdd" successfully created
Use vgcfgrestore command to restore the volume group's metadata.
[root@learnitguide1 ~]# vgcfgrestore vgroot
  Restored volume group vgroot
Now your physical volume metadata is recovered.

Verify the UUID
Use pvs command to ensure the UUID is replaced or not.
[root@learnitguide1 ~]# pvs -o pv_name,uuid
  PV         PV UUID
  /dev/sdd  FmGRh3-zhok-iVI8-7qTD-S5BI-MAEN-NYM5Sk
If the volume is not active, then activate the volume. Else this step is not required.
[root@learnitguide1 ~]# lvchange -ay /dev/vgroot/lvroot
Hope you have got an idea how to restore or recover the LVM metadata using UUID.

Support Us: Share with your friends and groups.
Couldn't find device with uuid, Recover LVM Metadata, recover linux lvm metadata, restore uuid, how to restore uuid, how to recover corrupt lvm in linux, recover lvm physical volume, vgcfgrestore linux.
Stay connected with us on social networking sites, Thank you.
YouTube | Facebook | Twitter | Pinterest | Rss
Recovering Physical Volume Metadata, couldn't find device with uuid linux, couldn't find device with uuid linux lvm, couldn't find device with uuid redhat, couldn't find device with uuid centos, couldn't find device with uuid pvscan, couldn't find device with uuid lvm redhat, couldn't find device with uuid vgcfgrestore, lvm couldn't find device with uuid, lvm error couldn't find device with uuid, lvm disk error
December 24, 2017

Post a Comment

[disqus][facebook][blogger]

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget