GNU bug report logs - #18329
mkpart clearing GPT attributes

Previous Next

Package: parted;

Reported by: Scott Sullivan <ssullivan <at> liquidweb.com>

Date: Mon, 25 Aug 2014 18:06:02 UTC

Severity: normal

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Scott Sullivan <ssullivan <at> liquidweb.com>
To: bug-parted <at> gnu.org
Subject: mkpart clearing GPT attributes
Date: Mon, 25 Aug 2014 13:52:07 -0400
Parted version: 3.1.6-e38d-dirty

Summary: mkpart appears to be wiping out existing GPT attributes.

To reproduce, consider the below example of me reproducing this issue. It doesn't seem like Parted should be clearing out existing GPT attributes for other pre-existing partitions just by creating a new partition with mkpart.

 [root <at> sta-jenkins-slave-01 /opt/template-automation/distros]# lvcreate -L 10G -n test LVM
  Logical volume "test" created
[root <at> sta-jenkins-slave-01 /opt/template-automation/distros]# parted /dev/LVM/test -s mklabel gpt
[root <at> sta-jenkins-slave-01 /opt/template-automation/distros]# parted /dev/LVM/test -s p free
Model: Linux device-mapper (linear) (dm)
Disk /dev/dm-38: 10.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
        17.4kB  10.7GB  10.7GB  Free Space

[root <at> sta-jenkins-slave-01 /opt/template-automation/distros]# parted /dev/LVM/test -s mkpart lbah 0% 10%
[root <at> sta-jenkins-slave-01 /opt/template-automation/distros]# parted /dev/LVM/test -s mkpart lbah 10% 20%
[root <at> sta-jenkins-slave-01 /opt/template-automation/distros]# parted /dev/LVM/test -s p free
Model: Linux device-mapper (linear) (dm)
Disk /dev/dm-38: 10.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
        17.4kB  1049kB  1031kB  Free Space
 1      1049kB  1074MB  1073MB               lbah
 2      1074MB  2147MB  1074MB               lbah
        2147MB  10.7GB  8590MB  Free Space

[root <at> sta-jenkins-slave-01 /opt/template-automation/distros]# sgdisk -A 2:set:63 /dev/LVM/test
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
[root <at> sta-jenkins-slave-01 /opt/template-automation/distros]# sgdisk /dev/LVM/test --attributes=2:show
2:63:1 (do not automount)
[root <at> sta-jenkins-slave-01 /opt/template-automation/distros]# parted /dev/LVM/test -s mkpart lbah 20% 100%
[root <at> sta-jenkins-slave-01 /opt/template-automation/distros]# sgdisk /dev/LVM/test --attributes=2:show
[root <at> sta-jenkins-slave-01 /opt/template-automation/distros]#


Can someone confirm this isn't expected behavior? I am happy to help with testing, on latest stable (3.2) or latest master if its useful. Our workaround for now is to globally re-apply the GPT attributes after creating all partitions.




This bug report was last modified 10 years and 299 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.