Bug 958459

Summary: [RFE] Add an option to lvs to show total vg space usage for each lv
Product: [Community] LVM and device-mapper Reporter: David Lehman <dlehman>
Component: lvm2Assignee: LVM Team <lvm-team>
lvm2 sub component: Displaying and Reporting QA Contact: cluster-qe <cluster-qe>
Status: NEW --- Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, bmarzins, bmr, dwysocha, heinzm, jbrassow, jonathan, lvm-team, msnitzer, prajnoha, zkabelac
Version: 2.02.166Keywords: FutureFeature
Target Milestone: ---Flags: rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
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 David Lehman 2013-05-01 14:36:38 UTC
Description of problem:
The OS installer needs to know how much space will be freed up in a vg by removing a given lv from it. It is fairly convoluted process determining the total amount of vg space consumed by an lv that uses striping or mirroring or any of the raid segment types. It would be nice to have an option to 'lvs -o ...' that would show the total of vg space used by each lv. The units do not matter much to me.

Given a mirrored, striped, or raid lv, the total space consumption would be output instead of having to use 'lvs -a' and scraping mimage, mlog, &c and combining them to calculate the total space usage. The current method requires too much knowledge of lvm implementation details to be appropriate for anaconda/blivet.

Comment 1 David Lehman 2013-05-01 14:41:04 UTC
Additional info: this is a critical piece for adding support for various lvm segment types to anaconda/blivet.

Comment 2 Alasdair Kergon 2013-05-01 15:20:24 UTC
The total amount of physical space used by an LV is NOT necessarily the same as the amount of space that would be freed if the LV was removed.  Some LVs share space with others and in those cases it's not possible to calculate an amount of space that would be released - expect some double-counting.  We'll work through each type of LV and see what totals we can usefully provide.