Bug 1315452 - Make thin_ls available in rhel 7.3
Summary: Make thin_ls available in rhel 7.3
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: device-mapper-persistent-data
Version: 7.3
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Peter Rajnoha
QA Contact: Bruno Goncalves
Milan Navratil
: 1355797 (view as bug list)
Depends On:
Blocks: 1355797 1356884
TreeView+ depends on / blocked
Reported: 2016-03-07 19:19 UTC by Vivek Goyal
Modified: 2021-09-03 12:07 UTC (History)
12 users (show)

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.
Clone Of:
: 1315460 1355797 1356884 (view as bug list)
Last Closed: 2016-11-04 00:30:26 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2211 0 normal SHIPPED_LIVE device-mapper-persistent-data bug fix update 2016-11-03 13:24:04 UTC

Description Vivek Goyal 2016-03-07 19:19:22 UTC
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 19:20:33 UTC
Here is upstream discussion looking for thin_ls.


Comment 2 Andy Goldstein 2016-03-07 19:26:52 UTC
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 20:36:52 UTC
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 20:48:45 UTC
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 09:22:14 UTC
# 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 08:33:13 UTC
*** Bug 1355797 has been marked as a duplicate of this bug. ***

Comment 16 errata-xmlrpc 2016-11-04 00:30:26 UTC
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.