Red Hat Bugzilla – Bug 1083633
LVM tools need to deal properly with thin provisioning needs_check flag
Last modified: 2015-03-05 08:07:55 EST
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:
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.
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
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