After overwriting the PV metadata with GPT partition table, LVM commands fail to recognise the PV. How to recover the data on this PV.

Solution Verified - Updated -

Issue

  • After overwriting the PV metadata with GPT partition table, LVM commands fail to recognise the PV. How to recover the data on this PV. only one PV was in the VG and also there was only one LV on it.
  • After writing the GPT table, we were getting
$ cat sos_commands/filesys/fdisk_-l_.dev.sdc 
        WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.
        Disk /dev/sdc: 644.2 GB, 644245094400 bytes
        255 heads, 63 sectors/track, 78325 cylinders
        Units = cylinders of 16065 * 512 = 8225280 bytes
           Device Boot      Start         End      Blocks   Id  System
        /dev/sdc1               1       78326   629145599+  ee  EFI GPT

The sdc device was mpath0 in the system.

mpath0 (1HITACHI_123104820198)
        [size=600 GB][features="0"][hwhandler="0"]
        \_ round-robin 0 [prio=1][active]
         \_ 1:0:0:1     sdc 8:32 [active][ready]
        \_ round-robin 0 [enabled]
         \_ 2:0:0:1     sdd 8:48 [active][ready]

Environment

  • Red Hat Enterprise Linux
  • LVM2 - Logical Volume Manager

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