Bug 1335057

Summary: Less confusing tool output when PV is not allocatable
Product: [Community] LVM and device-mapper Reporter: Zdenek Kabelac <zkabelac>
Component: lvm2Assignee: LVM Team <lvm-team>
lvm2 sub component: Command-line tools QA Contact: cluster-qe <cluster-qe>
Status: NEW --- Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, thornber, zkabelac
Version: 2.02.152Flags: rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Zdenek Kabelac 2016-05-11 09:01:05 UTC
Description of problem:

Users are getting confused, when using VGs with not allocatable PVs. 

They try to create a new LV and they get an error about:
"Insufficient free space: XXX extents needed, but only 0 available."
(https://bbs.archlinux.org/viewtopic.php?id=212300)

Also tools like vgs/vgdisplay seems to indicate there could be a lot
of 'FREE' space in a VG - but this space cannot be used for allocation as the PV is already marked as '(u)sed'  (which is relatively recent improvement).

We should consider how to provide better guidance when user hits this case (already seen few cases where users where unaware of using pvchange -xn,
so it's unexpected trouble with not straightforward diagnostic)

vgs/vgdisplay  may possibly provide another 'field'  showing "Allocatable" space (possibly shown only in the case it differs from "Free") 
Maybe error message could show there are 'Free but not Allocatable extents' 
Also consider if the '(U)sed' space is 'Free' - maybe we could shown this space as and 'hidden' LV type ?


Version-Release number of selected component (if applicable):
2.02.152

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
User should easily deduce the reason for missing space.

Additional info: