Bug 1315452 - Make thin_ls available in rhel 7.3
Make thin_ls available in rhel 7.3
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: device-mapper-persistent-data (Show other bugs)
All Linux
high Severity medium
: rc
: ---
Assigned To: Peter Rajnoha
Bruno Goncalves
Milan Navratil
: ZStream
: 1355797 (view as bug list)
Depends On:
Blocks: 1355797 1356884
  Show dependency treegraph
Reported: 2016-03-07 14:19 EST by Vivek Goyal
Modified: 2016-11-03 20:30 EDT (History)
12 users (show)

See Also:
Fixed In Version: device-mapper-persistent-data-0.6.2-0.1.rc6.el7
Doc Type: Release Note
Doc Text:
_device-mapper-persistent-data_ rebased to version 0.6.2 The _device-mapper-persistent-data_ packages have been upgraded to upstream version 0.6.2, which provides a number of bug fixes and enhancements over the previous version. Notably, the *thin_ls* tool, which can provide information about thin volumes in a pool, is now available.
Story Points: ---
Clone Of:
: 1315460 1355797 1356884 (view as bug list)
Last Closed: 2016-11-03 20:30:26 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Vivek Goyal 2016-03-07 14:19:22 EST
Description of problem:

Openshift people are looking for availability of thin_ls on rhel. This is
useful to figure out COW layer usage of container. Update device-mapper-persistent-data package to latest for 7.3.

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

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:
Comment 1 Vivek Goyal 2016-03-07 14:20:33 EST
Here is upstream discussion looking for thin_ls.

Comment 2 Andy Goldstein 2016-03-07 14:26:52 EST
This is needed for both Kubernetes and OpenShift. thin_ls gives us the ability to determine the amount of storage that a container has used in its COW layer.
Comment 4 Seth Jennings 2016-03-07 15:36:52 EST
Currently thin_ls does not operate on live metadata

$ ./thin_ls -o DEV,EXCLUSIVE /dev/mapper/fedora-docker--pool_tmeta
syscall 'open' failed: Device or resource busy
Note: you cannot run this tool with these options on live metadata.

This a problem for the cadvisor use case.  Strangely, it seems to work when docker is using the loop thin dm rather than a real device.

Still looking into this.
Comment 5 Seth Jennings 2016-03-07 15:48:45 EST
In order for thin_ls to work on a live thin device a snapshot must be taken

dmsetup message /dev/mapper/fedora-docker--pool 0 "reserve_metadata_snap"

Then thin_ls will work.  After thin_ls is run, the snapshot needs to be released

dmsetup message /dev/mapper/fedora-docker--pool 0 "release_metadata_snap"
Comment 8 Bruno Goncalves 2016-06-13 05:22:14 EDT
# rpm -q device-mapper-persistent-data

# rpm -ql device-mapper-persistent-data | grep thin_ls

# lvcreate -L 200M -T vgtest/mythinpool -V1G -n thin1
# lvcreate  -T vgtest/mythinpool -V1G -n thin2

# dmsetup message /dev/mapper/vgtest-mythinpool-tpool 0 reserve_metadata_snap
# thin_ls  --metadata-snap /dev/mapper/vgtest-mythinpool_tmeta 
  1      0           0         0 
  2      0           0         0 

# dmsetup message /dev/mapper/vgtest-mythinpool-tpool 0 release_metadata_snap
Comment 9 Peter Rajnoha 2016-07-13 04:33:13 EDT
*** Bug 1355797 has been marked as a duplicate of this bug. ***
Comment 16 errata-xmlrpc 2016-11-03 20:30:26 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.