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 1083633 - LVM tools need to deal properly with thin provisioning needs_check flag
Summary: LVM tools need to deal properly with thin provisioning needs_check flag
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.0
Hardware: Unspecified
OS: Unspecified
high
urgent
Target Milestone: rc
: ---
Assignee: Zdenek Kabelac
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On: 1083590
Blocks: 1119323
TreeView+ depends on / blocked
 
Reported: 2014-04-02 15:31 UTC by Heinz Mauelshagen
Modified: 2023-03-08 07:26 UTC (History)
11 users (show)

Fixed In Version: lvm2-2.02.111-1.el7
Doc Type: Known Issue
Doc Text:
If the kernel thin provisioning code detects a device failure or runs out of metadata space, it sets a flag on device to indicate that it needs to be checked. Currently, LVM tools do not perform this check automatically. To work around this problem, execute the thin_check --clear-needs-check-flag command to perform the check and remove the flag. Then run the thin_repair command if necessary. Alternatively, you can add --clear-needs-check-flag to thin_check_options in the global section of the /etc/lvm.conf configuration file to run the check automatically.
Clone Of:
Environment:
Last Closed: 2015-03-05 13:07:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0513 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2015-03-05 16:14:41 UTC

Description Heinz Mauelshagen 2014-04-02 15:31:31 UTC
Description of problem:

The LVM tools need to react appropriately to the new thin provisioning needs_check kernel flag which gets set on a device failure. If that flag is set
or state is failed, thin_check has to be run on the metadata device to confirm any errors and in case of those, a successful thin_repair run is mandatory before loading the table.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 RHEL Program Management 2014-04-16 05:48:28 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 Nenad Peric 2015-01-27 10:07:09 UTC
Default option in lvm.conf for thin_check is now set to 

thin_check_options = [ "-q", "--clear-needs-check-flag" ]

this ensures that the needs_check flag is removed upon thin_check/repair action. 


Functional and healthy POOL LV:

[root@tardis-03 mnt]# dmsetup status
rhel_tardis--03-home: 0 471474176 linear
vg-pool_lv-tpool: 0 4194304 thin-pool 3 23/1024 1348/32768 - rw no_discard_passdown error_if_no_space
vg-pool_lv_tdata: 0 4194304 linear
rhel_tardis--03-swap: 0 8388608 linear
rhel_tardis--03-root: 0 104857600 linear
vg-pool_lv_tmeta: 0 8192 linear
vg-thin_lv: 0 10485760 thin 172544 10485759
vg-pool_lv: 0 4194304 linear

Overfilled/corrupted POOL LV loses the 'rw' flag and gets 'out_of_data_space'.

[root@tardis-03 mnt]# dmsetup status
rhel_tardis--03-home: 0 471474176 linear
vg-pool_lv-tpool: 0 4194304 thin-pool 3 156/1024 32768/32768 - out_of_data_space no_discard_passdown error_if_no_space
vg-pool_lv_tdata: 0 4194304 linear
rhel_tardis--03-swap: 0 8388608 linear
rhel_tardis--03-root: 0 104857600 linear
vg-pool_lv_tmeta: 0 8192 linear
vg-thin_lv: 0 10485760 thin 2365824 10485759
vg-pool_lv: 0 4194304 linear
[root@tardis-03 mnt]#

Deactivating and reactivating the POOL LV.

The needs_check flag has been removed since activation of the LV has caused the thin_check to be executed. The 'rw'
in the dmsetup status below means that the POOL has been succesfully checked and activated (removing the thin_check flag).

[root@tardis-03 ~]# dmsetup status
rhel_tardis--03-home: 0 471474176 linear
vg-pool_lv-tpool: 0 4194304 thin-pool 3 270/1024 32768/32768 - rw no_discard_passdown error_if_no_space
vg-pool_lv_tdata: 0 4194304 linear
rhel_tardis--03-swap: 0 8388608 linear
rhel_tardis--03-root: 0 104857600 linear
vg-pool_lv_tmeta: 0 8192 linear
vg-pool_lv: 0 4194304 linear


Marking this VERIFIED with:

lvm2-2.02.115-2.el7.x86_64

Comment 8 errata-xmlrpc 2015-03-05 13:07:55 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://rhn.redhat.com/errata/RHBA-2015-0513.html


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