Bug 1264850

Summary: Unnecessary creation of extended partition instead of primary partition
Product: [Fedora] Fedora Reporter: Seb L. <D8F55524>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 22CC: anaconda-maint-list, g.kaviyarasu, jonathan, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-09-21 12:56:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Seb L. 2015-09-21 11:22:29 UTC
Description of problem:
When installing Fedora on a system with msdos label and two existing primary partitions and when using LVM, the /boot is created as a primary partition but instead of writing the LVM PV on a primary partition, an extended partition with a single logical partition (on which the LVM PV is written) is created.

As three partitions (the two pre-existing ones plus the newly created /boot) exist, the last partition is created as extended in order to allow the creation of more (logical) partitions.

This behaviour is correct, except when there is only one last partition to create (the fourth) and 100% of the disk is used (the user will therefore never be able to create any more logical partition anyway). The last partition should in this case simply be created as a primary partition (the fourth and last).

Alternatively, the user should be offered the option to create the LVM PV as primary partition (instead of a logical partition inside an extended partition).

Version-Release number of selected component (if applicable):
Current Fedora 22 net install.

How reproducible:
Always.

Steps to Reproduce:
1. Take an system with two existing primary partitions
2. Install Fedora with one /boot partition and everything else on LVM

Actual results:
sda
├─sda1  (existing primary partition)
├─sda2  (existing primary partition)
├─sda3  (/boot,   primary partition)
└─sda4  (newly created extended partition, containing...)
  └─sda5  (... a single logical partition hosting the LVM PV)
    ├─... (LVM LVs)

The extended partition will never contain more than a single logical partition, which is useless.

Expected results:
sda
├─sda1  (existing primary partition)
├─sda2  (existing primary partition)
├─sda3  (/boot,   primary partition)
└─sda4  (LVM PV,  primary partition)
  ├─... (LVM LVs)

Additional info:

Comment 1 David Shea 2015-09-21 12:56:17 UTC
Anaconda will not create a fourth primary partition in case, in the future, you decide to shrink a filesystem and create a new partition. If anaconda were to create four primary partitions, adding a new partition would be impossible without deleting one first. If you need four primary partitions, create the partitions outside of anaconda and use anaconda to assign to assign filesystems to them, or use kickstart.