Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
Single byte corruption in metadata which is even reported by thin_check is not giving correct 'failing' exit code - so thin-pool gets activated with lots of kernel error messages.
Here is an example:
Commands used to create setting:
lvcreate -T -L20 -V10 -n LV1 vg/pool
lvcreate -T -V10 -n LV2 vg/pool
mkfs.ext2 /dev/vg/LV1
mkfs.ext2 /dev/vg/LV2
lvs looklike:
LV VG Attr LSize Pool Data%
LV1 vg Vwi---tz-- 10.00m pool 5.62
LV2 vg Vwi---tz-- 10.00m pool 5.62
[lvol0_pmspare] vg ewi------- 2.00m
pool vg twi---tz-- 20.00m 5.62
[pool_tdata] vg Twi------- 20.00m
[pool_tmeta] vg ewi------- 2.00m
Corruption is made by:
dd if=/dev/zero of=/dev/vg/repair bs=1 seek=40960 count=1
(thin-pool has been deactivated and metadata device swapped out of thin-pool)
Thin check on such metadata gives this:
# thin_check @TESTDIR@/dev/@PREFIX@vg/repair
examining superblock
examining devices tree
examining mapping tree
thin device 1 is missing mappings [160, -]
bad checksum in btree node
And instead of 'fail' - it returns '0' as OK.
# thin_dump gives this:
<superblock uuid="" time="0" transaction="2" data_block_size="128" nr_data_blocks="320">
<device dev_id="1" mapped_blocks="9" transaction="0" creation_time="0" snap_time="0">
<range_mapping origin_begin="0" data_begin="0" length="4" time="0"/>
<range_mapping origin_begin="128" data_begin="4" length="4" time="0"/>
thin_repair (assuming confused as other with bad checksum):
# thin_repair -i /dev/vg/repair -o /dev/vg/fixed
bad checksum in btree node
Version-Release number of selected component (if applicable):
<= device-mapper-persistent-data-0.2.7
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
thin_check returns 0 for bad metadata
thin_repair is not fixing them
Expected results:
Additional info:
Yes, this is a serious bug. A new upstream package has been released (v0.2.8).
https://github.com/jthornber/thin-provisioning-tools
The patches relevant to this bug are:
9dc4a97cb784930ecb316022c6d1134c6964fa02
a06139ef9fa71bc46c4bd86364b5d23a6155851e
b87742ccff3624f4fba121e51cf55da6c0e52b12
05effffdf9376d061c4ee5391bdd24b441a6907e
All other changes in the release are to do with the cache tools, and don't effect the thin tools binaries.
RHEL packages will be built today.
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.
http://rhn.redhat.com/errata/RHEA-2013-1696.html
Description of problem: Single byte corruption in metadata which is even reported by thin_check is not giving correct 'failing' exit code - so thin-pool gets activated with lots of kernel error messages. Here is an example: Commands used to create setting: lvcreate -T -L20 -V10 -n LV1 vg/pool lvcreate -T -V10 -n LV2 vg/pool mkfs.ext2 /dev/vg/LV1 mkfs.ext2 /dev/vg/LV2 lvs looklike: LV VG Attr LSize Pool Data% LV1 vg Vwi---tz-- 10.00m pool 5.62 LV2 vg Vwi---tz-- 10.00m pool 5.62 [lvol0_pmspare] vg ewi------- 2.00m pool vg twi---tz-- 20.00m 5.62 [pool_tdata] vg Twi------- 20.00m [pool_tmeta] vg ewi------- 2.00m Corruption is made by: dd if=/dev/zero of=/dev/vg/repair bs=1 seek=40960 count=1 (thin-pool has been deactivated and metadata device swapped out of thin-pool) Thin check on such metadata gives this: # thin_check @TESTDIR@/dev/@PREFIX@vg/repair examining superblock examining devices tree examining mapping tree thin device 1 is missing mappings [160, -] bad checksum in btree node And instead of 'fail' - it returns '0' as OK. # thin_dump gives this: <superblock uuid="" time="0" transaction="2" data_block_size="128" nr_data_blocks="320"> <device dev_id="1" mapped_blocks="9" transaction="0" creation_time="0" snap_time="0"> <range_mapping origin_begin="0" data_begin="0" length="4" time="0"/> <range_mapping origin_begin="128" data_begin="4" length="4" time="0"/> thin_repair (assuming confused as other with bad checksum): # thin_repair -i /dev/vg/repair -o /dev/vg/fixed bad checksum in btree node Version-Release number of selected component (if applicable): <= device-mapper-persistent-data-0.2.7 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: thin_check returns 0 for bad metadata thin_repair is not fixing them Expected results: Additional info: