Fail explicitly if partitions with size over 2 TiB are requested with 'msdos' disk_label

Bug #1298362 reported by Lucas Alvares Gomes on 2014-03-27
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ironic-lib
Wishlist
Unassigned

Bug Description

Ironic uses sfdisk to partition disk, sfdisk only works with MBR (Master Boot Record) and for disks >2TB we need to add support for GPT (GUID Partitioning Table).

Changed in ironic:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
importance: Undecided → Wishlist

Fix proposed to branch: master
Review: https://review.openstack.org/83396

Changed in ironic:
status: New → In Progress
Changed in ironic:
milestone: none → juno-1

Reviewed: https://review.openstack.org/83396
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=4bdd6afb5a7abfd5ccf2e0095cacadbf9fcc62dd
Submitter: Jenkins
Branch: master

commit 4bdd6afb5a7abfd5ccf2e0095cacadbf9fcc62dd
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Mar 27 14:27:56 2014 +0000

    Add DiskPartitioner

    DiskPartitioner is a convenient wrapper around the parted tool, this
    wrapper will make things easier for fixing other problems in Ironic like
    removing the swap partition if not specified, having a more consistent
    partition layout or future work like creating GPT (GUID Partition Table)
    partitions (needed for creating partitions with size bigger than 2TB),
    efi partitions, etc..

    Change-Id: I44be217d1e55778ed94f27603ce0537ff740febf
    Partial-Bug: #1297925
    Partial-Bug: #1298362

Changed in ironic:
assignee: Lucas Alvares Gomes (lucasagomes) → nobody
Changed in ironic:
status: In Progress → Triaged
milestone: juno-1 → none

Is there a reason we wouldnt take the next step to make the disk partition default type be gpt for >2TB 'disks'.

I tested this change and here was the partition table that resulted - as expected - I didnt declare the full disk size

2014-10-07 16:31:40.478 8298 DEBUG ironic.common.utils [-] Execution completed, command line is "parted -a optimal -s /dev/disk/by-path/ip-10.10.10.5:3260-iscsi-iqn-057c7bb8-df01-4e90-9fb3-c598ea2618ee-lun-1 -- unit MiB mklabel gpt mkpart primary 1 2764801 mkpart primary 2764801 2795521"

(parted) unit mib
(parted) print
Model: HP LOGICAL VOLUME (scsi)
Disk /dev/sda: 3815394MiB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
 1 1.00MiB 2764801MiB 2764800MiB ext4 primary
 2 2764801MiB 2795521MiB 30720MiB ext4 primary

Fix proposed to branch: master
Review: https://review.openstack.org/126625

Changed in ironic:
assignee: nobody → Tom Hancock (tom-hancock)
status: Triaged → In Progress
Changed in ironic:
assignee: Tom Hancock (tom-hancock) → Michael Davies (mrda)

Looks like the only thing we lack here is a check that we don't request huge partitions with MSDOS label.

summary: - Can't create partitions with size > 2TB
+ Fail explicitly if partitions with size over 2 TiB are requested with
+ 'msdos' disk_label
tags: added: low-hanging-fruit
affects: ironic → ironic-lib
Changed in ironic-lib:
status: In Progress → Triaged
assignee: Michael Davies (mrda) → nobody
Ruby Loo (rloo) wrote :

@Tom, the answer to why we wouldn't "take the next step to make the disk partition default type be gpt for >2TB 'disks'" is in the comments in https://review.openstack.org/#/c/225556/.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers