RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1476253 - thin_rmap works without --region, but outputs nothing
Summary: thin_rmap works without --region, but outputs nothing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: device-mapper-persistent-data
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Joe Thornber
QA Contact: Jakub Krysl
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-28 12:19 UTC by Jakub Krysl
Modified: 2021-09-03 12:11 UTC (History)
6 users (show)

Fixed In Version: device-mapper-persistent-data-0.7.2-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-10 13:17:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0776 0 None None None 2018-04-10 13:18:06 UTC

Description Jakub Krysl 2017-07-28 12:19:59 UTC
Description of problem:
It is possible to run thin_rmap without using --region option, but it outputs nothing and the return value is 0. Manpage suggest user must specify region:
"thin_rmap outputs the reverse mapping stored in the metadata on a  device  or  file between a region of thin provisioned pool blocks and the associated thin provisioned devices."
Specifing region correctly prints out the data:
thin_rmap /dev/mapper/vgtest-swapvol --region 0..-1
data 0..3 -> thin(1) 0..3
data 3..19 -> thin(1) 8..24
data 19..20 -> thin(1) 128..129
data 20..21 -> thin(1) 191..192
data 21..24 -> thin(2) 0..3
data 24..40 -> thin(2) 8..24
data 40..41 -> thin(2) 128..129
data 41..42 -> thin(2) 191..192
data 42..45 -> thin(3) 0..3
data 45..61 -> thin(3) 8..24
data 61..62 -> thin(3) 128..129
data 62..63 -> thin(3) 191..192
data 63..66 -> thin(4) 0..3
data 66..82 -> thin(4) 8..24
data 82..83 -> thin(4) 128..129
data 83..84 -> thin(4) 191..192
data 84..87 -> thin(5) 0..3
data 87..103 -> thin(5) 8..24
data 103..104 -> thin(5) 128..129
data 104..105 -> thin(5) 191..192
data 105..108 -> thin(6) 0..3
data 108..124 -> thin(6) 8..24
data 124..125 -> thin(6) 128..129
data 125..126 -> thin(6) 191..192
data 126..129 -> thin(7) 0..3
data 129..145 -> thin(7) 8..24
data 145..146 -> thin(7) 128..129
data 146..147 -> thin(7) 191..192
data 147..150 -> thin(8) 0..3
data 150..166 -> thin(8) 8..24
data 166..167 -> thin(8) 128..129
data 167..168 -> thin(8) 191..192
data 168..171 -> thin(9) 0..3
data 171..187 -> thin(9) 8..24
data 187..188 -> thin(9) 128..129
data 188..189 -> thin(9) 191..192
data 189..192 -> thin(10) 0..3
data 192..208 -> thin(10) 8..24
data 208..209 -> thin(10) 128..129
data 209..210 -> thin(10) 191..192

Version-Release number of selected component (if applicable):
0.7.0-0.1.rc6.el7

How reproducible:
100%

Steps to Reproduce:
1.thin_rmap /dev/mapper/vgtest-swapvol
2.echo $?

Actual results:
Nothing printed and command succeeds
[root@storageqe-18 thin]# thin_rmap /dev/mapper/vgtest-swapvol
[root@storageqe-18 thin]# echo $?
0
 

Expected results:
Either this error or the whole reverse map data
[root@storageqe-18 thin]# thin_rmap /dev/mapper/vgtest-swapvol
No region provided.
Usage: thin_rmap [options] {device|file}
Options:
  {-h|--help}
  {-V|--version}
  {--region <block range>}*
Where:
  <block range> is of the form <begin>..<one-past-the-end>
  for example 5..45 denotes blocks 5 to 44 inclusive, but not block 45


Additional info:

Comment 2 Joe Thornber 2017-09-19 10:21:04 UTC
https://github.com/jthornber/thin-provisioning-tools/commit/3790f2e79c4f3e20a41834f1d1138b80342963c2

The above commit checks for zero regions.

Release to follow.

Comment 4 Jakub Krysl 2017-09-22 13:37:18 UTC
Fixed in device-mapper-persistent-data-0.7.2-1.el7.

# thin_rmap /dev/mapper/vgtest-swapvol
No regions provided.
Usage: thin_rmap [options] {device|file}
Options:
  {-h|--help}
  {-V|--version}
  {--region <block range>}*
Where:
  <block range> is of the form <begin>..<one-past-the-end>
  for example 5..45 denotes blocks 5 to 44 inclusive, but not block 45
# echo $?
1

Comment 7 errata-xmlrpc 2018-04-10 13:17:29 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.

https://access.redhat.com/errata/RHEA-2018:0776


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