[linux-lvm] LVM: Metadata on ... has wrong VG name

linux-lvm at harrier.ch linux-lvm at harrier.ch
Sun Dec 19 12:14:08 UTC 2021


Issue: How do I repair this situation?
  >sudo pvscan
   Metadata on /dev/sdd2 at 12800 has wrong VG name “fedora32 {
   id = “gJgZM9-n2Rd-V7us-RWae-cpT6-H84E-g7dAsk”
   seqno = 9
   format = “lvm2”
   status = [“RESIZEABLE”, “READ”, “WRITE”]
   flag” expected fedora.
   WARNING: Reading VG fedora on /dev/sdd2 failed.
   WARNING: PV /dev/sdd2 is marked in use but no VG was found using it.
   WARNING: PV /dev/sdd2 might need repairing.

  I am a simple long-time developer, attempting to upgrade Fedora, first exposure to LVM.
  I cloned my old drive to a new one, same size. Pretty much out-of-the-box installation - a single PV contains LVs root, home and swap

  Upon completion, I renamed the Volume Group on the original drive (/dev/sdd2) with the intent to mount both Volume Groups concurrently:
   > sudo lvm vgrename GGUoJ7-Cj8n-yYnW-DjO7-HHJQ-mMey-jOlBXx fedora32

  I'm working with a Fedora Live USB, LVM TOOLS 2.03.11(2) (2021-01-08), which I rebooted at this point

  A PVID conflict arose, which I solved by changing the PV UUID on the new drive:
   > sudo lvm pvchange -u /dev/sda2

Now I get no access to the logical volumes on the old drive with the error above.

So how do either 1) correctly propagate or 2) roll back the Volume Group Name change?

I’ve found some references to “repair”, recreating the LVM metadata, but am hesitant as I would not like to lose the contents of the old drive. /etc/lvm only has a backup from the pvchange execution on the new disk, nothing from the original due to the reboot. I got in this situation thru RTFM - I didn’t realise RTWholeFM was required. Still looking for procedures: where I went wrong, how to fix it. Nothing in the archives seems to address this directly.

Has been ages since I patched disk sectors but that's the only option I have any minor confidence in at this point. Is there a simple reference to a procedure that can help me recover this?  



More information about the linux-lvm mailing list