Bug 623261 - clearpart --initlabel is broken for disks with a whole disk format.
clearpart --initlabel is broken for disks with a whole disk format.
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: anaconda (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: David Lehman
Release Test Team
: RHELNAK
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-11 14:00 EDT by Hans de Goede
Modified: 2010-10-01 15:04 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In some circumstances, disks that contain a whole disk format (e.g. a LVM Physical Volume populating a whole disk) are not cleared correctly using the clearpart --initlabel kickstart command. Adding the --all switch — as in clearpart --initlabel --all — ensures disks are cleared correctly
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-01 15:04:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hans de Goede 2010-08-11 14:00:34 EDT
When a ks file contains:
clearpart --initlabel

And one of the disks to be cleared contains a whole disk format like a whole disk lvm PV "clearpart --initlabel" is not honored and the disk will not be given a fresh disklabel.
Comment 2 RHEL Product and Program Management 2010-08-11 14:18:49 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 4 David Cantrell 2010-08-11 16:32:26 EDT
Technical note added. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.

New Contents:
Some disks containing a whole disk format, such as a whole disk LVM PV, may not be cleared correctly with the "clearpart --initlabel" command in kickstart.  In these cases, users may add a %pre section to the kickstart file to run "parted -s /dev/PATH mklabel msdos" on the problem device.  The clearpart command should then work as expected.  See the RHEL 6.0 Kickstart documentation for more information on the %pre section.
Comment 5 Hans de Goede 2010-08-12 06:29:53 EDT
About the technote, I believe that an easier workaround exists. When discussing this with dlehman yesterday it was mentioned that while:

clearpart --initlabel 

Will not do the right thing for whole disk formats, that:

clearpart --initlabel --linux

Will do the right thing for linux whole disk formats, ie a PV / mdraid member (albeit the disklabel for whole disk formats will get cleared later in the 
 partition process then the ones for regular partitioned disks).

Thinking more about this, that means that:
clearpart --initlabel --all

Should do the right thing for all formats. dlehman do you agree with this
assessment ? If so I think we should modify the technote to document this as a workaround instead.
Comment 6 David Lehman 2010-08-12 10:46:23 EDT
That is correct. The --linux and --all modifiers will have the same effect for whole-disk formats as they do for formats on partitions.
Comment 7 Hans de Goede 2010-08-12 13:53:24 EDT
Technical note updated. If any revisions are required, please edit the "Technical Notes" field
accordingly. All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -1 +1 @@
-Some disks containing a whole disk format, such as a whole disk LVM PV, may not be cleared correctly with the "clearpart --initlabel" command in kickstart.  In these cases, users may add a %pre section to the kickstart file to run "parted -s /dev/PATH mklabel msdos" on the problem device.  The clearpart command should then work as expected.  See the RHEL 6.0 Kickstart documentation for more information on the %pre section.+Some disks containing a whole disk format, such as a whole disk LVM PV, may not be cleared correctly with the "clearpart --initlabel" command in kickstart. To work around this issue use "clearpart --initlabel --all"
Comment 10 Ryan Lerch 2010-08-30 22:49:57 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-Some disks containing a whole disk format, such as a whole disk LVM PV, may not be cleared correctly with the "clearpart --initlabel" command in kickstart. To work around this issue use "clearpart --initlabel --all"+Disks that contain a whole disk format (e.g. a LVM Physical Volume populating a whole disk) might not be cleared correctly using the "clearpart --initlabel" kickstart command. To work around this issue, use the kickstart command "clearpart --initlabel --all"
Comment 11 Ryan Lerch 2010-08-31 20:10:25 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-Disks that contain a whole disk format (e.g. a LVM Physical Volume populating a whole disk) might not be cleared correctly using the "clearpart --initlabel" kickstart command. To work around this issue, use the kickstart command "clearpart --initlabel --all"+In some circumstances, disks that contain a whole disk format (e.g. a LVM Physical Volume populating a whole disk) are not cleared correctly using the clearpart --initlabel kickstart command. Adding the --all switch — as in clearpart --initlabel --all — ensures disks are cleared correctly
Comment 12 RHEL Product and Program Management 2010-10-01 15:04:54 EDT
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.

Note You need to log in before you can comment on or make changes to this bug.