How to repair metadata on physical volume online?

Solution Verified - Updated -

Issue

  • Need to repair metadata on physical volume online which is corrupted or zeroed.
  • Unable to recreate a PV label on an exiting device.
# pvcreate --uuid NgIQIH-irp3-ncrC-yNYg-hTsH-LF1c-6iUd7E --restorefile /etc/lvm/backup/testvg /dev/vdb -ff
  WARNING: Couldn't find device with uuid NgIQIH-irp3-ncrC-yNYg-hTsH-LF1c-6iUd7E.
  Can't open /dev/vdb exclusively.  Mounted filesystem?
  Can't open /dev/vdb exclusively.  Mounted filesystem?

Environment

  • Red Hat Enterprise Linux 8.2
    • lvm2-2.03.09-5.el8 or higher.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content