Bug 1284971

Summary: [RFE] Disk space usage by a LVM snapshot
Product: [Fedora] Fedora Reporter: Gudge <shankhabanerjee>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: agk, bmarzins, bmr, dwysocha, heinzm, jbrassow, jonathan, lvm-team, msnitzer, nkshirsa, prajnoha, rmadhuso, shankhabanerjee, thornber, zkabelac
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-08 06:06:29 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 Gudge 2015-11-24 15:07:11 UTC
Description of problem:
Enhance thin tools support to calculate actual disk usage of thin logical volumes and LVM Snapshots created from a thin logical volume.

Expected results:
The actual disk usage of each lvm snapshot and lvm thin volume. 
If possible the capability to ask for the size based on thin id/name of the snapshot or thin logical volume.

Thanks

Comment 1 Heinz Mauelshagen 2015-11-24 15:28:37 UTC
In case you're requesting the metadata footage, see tool thin_metadata_size

Comment 2 Zdenek Kabelac 2015-11-24 15:50:11 UTC
The bug here tries to learn the 'space' occupied by  individual LV.


It has  some 'shared' mapppings
And some 'exlusive' mappings.



Initially we should provide some 'script'  to calc these 2 values.

Later those could be built-in into e.g. thin_dump tool.

Let's think about how lvm2 could make it easier for user.

Comment 3 Gudge 2016-04-07 18:45:29 UTC
Could you please let me know if there are any plans for this RFE. 

Thanks

Comment 4 Mike Snitzer 2016-04-07 18:52:34 UTC
(In reply to Gudge from comment #3)
> Could you please let me know if there are any plans for this RFE. 

The latest device-mapper-persistent-data package should include the new 'thin_ls' utility.  But I'll defer to Joe and/or Peter to say definitively.

Comment 5 Peter Rajnoha 2016-04-08 06:06:29 UTC
Yes, we have thin_ls in device-mapper-persistent-data package since device-mapper-persistent-data-0.6.0-1 (20th January).

Comment 6 Peter Rajnoha 2016-04-08 06:08:26 UTC
But still, we're planning to display this info in LVM command directly (this is RFE for lvm2).

Comment 8 Zdenek Kabelac 2020-04-30 08:55:30 UTC
thin_ls  is tool from  'd-m-p-d' set of tools and as such it requires
access to 'stable' version of kernel metadata  (aka _tmeta) device
(i.e. very similar to thin_dump)

For active thin-pool - that means creating a kernel metadata snapshot and access this content.

For inactive thin-pool - user needs to active (component activation)  _tmeta volume and
use this device to obtain info.

There is 'native' support for this tool inside lvm2.