Description of problem: When using the --physicalextentsize option to vgcreate it is possible to create a vg that is unusable. Version-Release number of selected component (if applicable): Don't think this is specific to any version, but this is what I was running: # lvm version LVM version: 2.02.116(2) (2015-01-30) Library version: 1.02.93 (2015-01-30) Driver version: 4.28.0 How reproducible: Every time Steps to Reproduce: Create a vg with a PE size that is > than the total size of the PVs that comprise the VG. # pvs ... /dev/sdg lvm2 --- 18.00g 18.00g /dev/sdh lvm2 --- 18.00g 18.00g # vgcreate --physicalextentsize 1T pe_size_test /dev/sdg /dev/sdh ; echo $? Volume group "pe_size_test" successfully created 0 # vgs -o vg_extent_size,vg_name,vg_extent_count,vg_size pe_size_test Ext VG #Ext VSize 1.00t pe_size_test 0 0 Actual results: The vg is created but shows no available space and you are unable to create a LV from it. # pvs -S "vg_name='pe_size_test'" PV VG Fmt Attr PSize PFree /dev/sdg pe_size_test lvm2 a-- 18.00g 0 /dev/sdh pe_size_test lvm2 a-- 18.00g 0 # vgs pe_size_test VG #PV #LV #SN Attr VSize VFree pe_size_test 2 0 0 wz--n- 0 0 # lvcreate -L 100m pe_size_test ; echo $? Rounding up size to full physical extent 1.00 TiB Volume group "pe_size_test" has insufficient free space (0 extents): 1 required. 5 Expected results: The vgcreate command should ideally fail if the PE size is out of range with a non-zero exit code and a useful error message. Additional info: Man page states: "If the volume group metadata uses lvm2 format those restrictions do not apply, but having a large number of extents will slow down the tools but have no impact on I/O performance to the logical volume. The smallest PE is 1KiB" The smallest appears to be 512B from usage and at the moment the largest is unbound. The man page should be updated to correct size ranges or limitations when the additional checks are added.
This was talked about in bug 1100514.
As for the upper bound for the extent size - it's true that we could possibly do a check during vgcreate - we could check the list of PVs and see if we're able to do any sane allocation with the extent size specified given the disks we're using. However, the VG can still be extented later on with a PV that would make the allocation possible (in your example above, the vgextend with a PV that has 1t would do it). So it's questionable whether limiting the extent size during vgcreate is the right choice here. Maybe we could just print a warning instead with a question? Something like "With the PVs given, it won't be possible to allocate any LVs. Do you want to continue with vgcreate? Y/N" Something like that...
People might want a PV just for metadata, not for data, so there is no longer a requirement for every PV to hold at least one PE.
This message is a reminder that Fedora 21 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 21. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '21'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 21 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle. Changing version to '24'. More information and reason for this action is here: https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase
This message is a reminder that Fedora 24 is nearing its end of life. Approximately 2 (two) weeks from now Fedora will stop maintaining and issuing updates for Fedora 24. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '24'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 24 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
This message is a reminder that Fedora 26 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 26. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '26'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 26 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Hmm not yet fixed, taking it myself.