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.

Bug 1241951

Summary: cache_check fails, but no concrete error reported. Commands which should manipulate the VG/LV fail afterwards requiring a manual intervention.
Product: Red Hat Enterprise Linux 7 Reporter: Nenad Peric <nperic>
Component: device-mapper-persistent-dataAssignee: Joe Thornber <thornber>
Status: CLOSED ERRATA QA Contact: Bruno Goncalves <bgoncalv>
Severity: high Docs Contact:
Priority: medium    
Version: 7.2CC: agk, bgoncalv, cmarthal, heinzm, jbrassow, lvm-team, msnitzer, prajnoha, thornber, tlavigne, zkabelac
Target Milestone: rcKeywords: Regression, TestBlocker, Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: device-mapper-persistent-data-0.5.4-1.el7 Doc Type: Bug Fix
Doc Text:
Intra-release bug, no documentation needed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 09:39:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Attaching -vvvv output from vgchange
none
Attaching -vvvv output from lvconvert none

Description Nenad Peric 2015-07-10 13:31:50 UTC
Description of problem:

When trying to remove an inactive, the cache_check fails and causes subsequent commands to fail.

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


How reproducible:
70% of the time 

Steps to Reproduce:

Create cache volumes and then remove the *inactive* pool out from under the origin
Create origin (slow) volume
lvcreate -L 4G -n corigin cache_sanity /dev/sda1

Create cache data and cache metadata (fast) volumes
lvcreate -L 2G -n remove_inactive_pool cache_sanity /dev/sdb1
lvcreate -L 12M -n remove_inactive_pool_meta cache_sanity /dev/sdb1

Create cache pool volume by combining the cache data and cache metadata (fast) volumes
lvconvert --yes --type cache-pool --cachemode writeback -c 64 --poolmetadata cache_sanity/remove_inactive_pool_meta cache_sanity/remove_inactive_pool
  WARNING: Converting logical volume cache_sanity/remove_inactive_pool and cache_sanity/remove_inactive_pool_meta to pool's data and metadata volumes.
  THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.)
Create cached volume by combining the cache pool (fast) and origin (slow) volumes
[1] lvconvert -vvvv --yes --type cache --cachepool cache_sanity/remove_inactive_pool cache_sanity/corigin

[2] vgchange -vvvv -an cache_sanity

DEBUG:
  LV                           VG            Attr       LSize   Pool                   Origin          Data%  Meta%  Move Log Cpy%Sync Convert
  corigin                      cache_sanity  Cwi-a-C---   4.00g [remove_inactive_pool] [corigin_corig] 0.00   2.31            100.00
  [corigin_corig]              cache_sanity  owi-aoC---   4.00g
  [lvol0_pmspare]              cache_sanity  ewi-------  12.00m
  [remove_inactive_pool]       cache_sanity  Cwi---C---   2.00g                                        0.00   2.31            100.00
  [remove_inactive_pool_cdata] cache_sanity  Cwi-ao----   2.00g
  [remove_inactive_pool_cmeta] cache_sanity  ewi-ao----  12.00m
  root                         rhel_virt-074 -wi-ao----   6.71g
  swap                         rhel_virt-074 -wi-ao---- 824.00m
rhel_virt--074-swap     (253:1)
rhel_virt--074-root     (253:0)
cache_sanity-remove_inactive_pool_cdata (253:3)
cache_sanity-remove_inactive_pool_cmeta (253:4)
cache_sanity-corigin    (253:2)
cache_sanity-corigin_corig      (253:5)
rhel_virt--074-swap: 0 1687552 linear
rhel_virt--074-root: 0 14065664 linear
cache_sanity-remove_inactive_pool_cdata: 0 4194304 linear
cache_sanity-remove_inactive_pool_cmeta: 0 24576 linear
cache_sanity-corigin: 0 8388608 cache 8 71/3072 128 0/32768 0 61 0 0 0 0 0 1 writeback 2 migration_threshold 2048 mq 10 random_threshold 4 sequential_threshold 512 discard_promote_adjustment 1 read_promote_adjustment 4 write_promote_adjustment 8 rw
cache_sanity-corigin_corig: 0 8388608 linear

Separating cache pool (--splitcache) cache_sanity/remove_inactive_pool from cache origin

DEBUG: dmsetup and dmsetup status:
rhel_virt--074-swap     (253:1)
rhel_virt--074-root     (253:0)
rhel_virt--074-swap: 0 1687552 linear
rhel_virt--074-root: 0 14065664 linear

[3] lvconvert -vvvv --splitcache /dev/cache_sanity/remove_inactive_pool
couldn't remove cache pool volume


Actual results:


Expected results:

The check_cache should return more information, or complete successfully as it does in the rest of the test cases. 

Additional info:

Will add -vvvv attachments of the last 2 commands.

Comment 1 Nenad Peric 2015-07-10 13:34:06 UTC
Created attachment 1050681 [details]
Attaching -vvvv output from vgchange

Comment 2 Nenad Peric 2015-07-10 13:35:02 UTC
Created attachment 1050682 [details]
Attaching -vvvv output from lvconvert

Comment 3 Nenad Peric 2015-07-10 13:36:07 UTC
Forgot to put the package names...

kernel: 3.10.0-292.el7.x86_64

lvm2-2.02.125-1.el7    BUILT: Tue Jul  7 16:24:54 CEST 2015
lvm2-libs-2.02.125-1.el7    BUILT: Tue Jul  7 16:24:54 CEST 2015

device-mapper-1.02.102-1.el7    BUILT: Tue Jul  7 16:24:54 CEST 2015
device-mapper-libs-1.02.102-1.el7    BUILT: Tue Jul  7 16:24:54 CEST 2015
device-mapper-event-1.02.102-1.el7    BUILT: Tue Jul  7 16:24:54 CEST 2015
device-mapper-event-libs-1.02.102-1.el7    BUILT: Tue Jul  7 16:24:54 CEST 2015
device-mapper-persistent-data-0.5.3-1.el7    BUILT: Tue Jul  7 15:41:42 CEST 2015

Comment 5 Corey Marthaler 2015-07-16 20:55:25 UTC
This affects multiple cache test cases.

Here's another spot:

vgchange --sysinit -ay cache_sanity
  Check of pool cache_sanity/pool failed (status:1). Manual repair required!

#misc/lvm-exec.c:105     /usr/sbin/cache_check failed: 1
#activate/dev_manager.c:2005   Check of pool cache_sanity/pool failed (status:1). Manual repair required!
#libdm-deptree.c:2764         Reverting cache_sanity-corigin_corig.

Comment 6 Zdenek Kabelac 2015-07-17 20:15:58 UTC
Cache_check tool needs update:

Proposed this upstream patch:
https://github.com/jthornber/thin-provisioning-tools/pull/30/files

Comment 10 Bruno Goncalves 2015-07-28 07:33:50 UTC
The problem has been fixed using device-mapper-persistent-data-0.5.4-1.el7.

Test on a server with: 
device-mapper-1.02.102-2.el7
kernel 3.10.0-297.el7

Comment 12 errata-xmlrpc 2015-11-19 09:39:31 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-2170.html