Missing physical volume after adding disklabel to the disk

Solution Unverified - Updated -

Issue

  • System is using LVM on a disk without a disklabel (Partition Table):

    # parted /dev/vdb u s p
    Error: /dev/vdb: unrecognised disk label
    Model: Virtio Block Device (virtblk)                                      
    Disk /dev/vdb: 2097152s
    Sector size (logical/physical): 512B/512B
    Partition Table: unknown
    Disk Flags: 
    
    # lsblk /dev/vdb 
    NAME            MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
    vdb             252:16   0    1G  0 disk 
    └─vgtest-lvtest 253:2    0 1020M  0 lvm  /test
    
  • After running parted /dev/vdb mklabel msdos by mistake, LVM is not listed anymore:

    # parted /dev/vdb u s p
    Model: Virtio Block Device (virtblk)
    Disk /dev/vdb: 2097152s
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    Disk Flags: 
    
    Number  Start  End  Size  Type  File system  Flags
    
    # lsblk /dev/vdb 
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    vdb  252:16   0   1G  0 disk 
    
  • How to restore LVM on a disk without partition?

  • How to restore LVM on a disk with no disklabel?

Environment

  • Red Hat Enterprise Linux (RHEL) 7
  • Logical Volume Manager (LVM)
  • Disk without partition

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