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
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:
Keywords:
Depends On: 1083590
Blocks: 1119323
TreeView+ depends on / blocked
 
Reported: 2014-04-02 15:31 UTC by Heinz Mauelshagen
Modified: 2015-03-05 13:07 UTC (History)
11 users (show)

(edit)
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:
(edit)
Last Closed: 2015-03-05 13:07:55 UTC


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0513 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 Product and 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.