Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-38447

[RFE] Allow pvcreate -f to overwrite devices have GPT partition label.

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • rhel-9.6
    • rhel-9.4
    • lvm2
    • lvm2-2.03.27-1.el9
    • None
    • Moderate
    • Hide
      84cabd068b190aad2dc6639aa3b68b6197a8b4ea
      d5d2c98980b4d02368f75d892e748647d00d3ae8
      4524778b2324dd7975879e0efd15dcf39df325af
      Show
      84cabd068b190aad2dc6639aa3b68b6197a8b4ea d5d2c98980b4d02368f75d892e748647d00d3ae8 4524778b2324dd7975879e0efd15dcf39df325af
    • sst_logical_storage
    • ssg_filesystems_storage_and_HA
    • 8
    • 12
    • 5
    • QE ack, Dev ack
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • All
    • None

      What were you trying to do that didn't work?

      When a device contains a "GPT" label but no actual partition, even with the "-y" option, pvcreate fails to initialize the device.

      Please provide the package NVR for which bug is seen:

      # rpm -q lvm2

      lvm2-2.03.21-3.el9.x86_64

      How reproducible:

      Always

      Steps to reproduce

      1. Create GPT label on disk.
      2.  Try to initialize the device as PV with pvcreate -f .
      3.  

      Expected results

      If the device has no actual partitions on it, then using the "-f" option to pvcreate should remove the gpt label from the disk.

      Actual results

       

      pvcreate fails with below error when disk has GPT label.

       

      # parted /dev/sda mklabel gpt 
      # pvcreate -f /dev/sda 
        Devices file /dev/sda is excluded: device is partitioned.
        Cannot use /dev/sda: device is partitioned
      # wipefs /dev/sda 
      DEVICE OFFSET     TYPE UUID LABEL
      sda    0x200      gpt       
      sda    0x7ffffe00 gpt       
      sda    0x1fe      PMBR  
      

       

      The behavior should be same as "MDSOS" label.

       

      # parted /dev/sda mklabel msdos
      # wipefs /dev/sda 
      DEVICE OFFSET TYPE UUID LABEL
      sda    0x1fe  dos     
      # pvcreate -f /dev/sda 
        Wiping dos signature on /dev/sda.
        Physical volume "/dev/sda" successfully created.
      

       

            mcsontos@redhat.com Marian Csontos
            rhn-support-rmadhuso Ranjith ML
            Peter Rajnoha Peter Rajnoha
            Cluster QE Cluster QE
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: