Bug 2227805

Summary: Anaconda does not assign free space to VG when creating LVM layout
Product: [Fedora] Fedora Reporter: Bryn M. Reeves <bmr>
Component: anacondaAssignee: anaconda-maint
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 39CC: anaconda-maint, vslavik, w
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bryn M. Reeves 2023-07-31 14:44:07 UTC
When creating an LVM layout using custom partitioning any free space remaining after assigning mount points is left as unpartitioned space. For e.g. creating a layout that consumes roughly 13GiB on a 20GiB device leads to the following layout:

# fdisk -l /dev/vda
Disk /dev/vda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 7608F1F7-661E-4264-978F-B0B9D88E3BC0

Device       Start      End  Sectors  Size Type
/dev/vda1     2048     4095     2048    1M BIOS boot
/dev/vda2     4096  2052095  2048000 1000M Linux filesystem
/dev/vda3  2052096 26742783 24690688 11.8G Linux LVM

So there is ~7.2GiB of unpartitioned space at the end of the disk. To make use of this space in the LVM2 volume group the user either needs to edit the existing Linux LVM partition to enlarge it using pvresize, or create a new partition and add it to the volume group with vgextend.

Reproducible: Always

Steps to Reproduce:
1. Install Fedora using custom partitioning
2. Create an LVM layout by selecting lvm from the drop-down box and defining mount points
Actual Results:  
Free space remains at the end of the disk.

Expected Results:  
Free space is available to use in the created volume group.

Comment 1 Fedora Release Engineering 2023-08-16 08:13:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.