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 1069364

Summary: Lvm2 allowed to start thin pool with smaller transaction_id by 1
Product: Red Hat Enterprise Linux 7 Reporter: Zdenek Kabelac <zkabelac>
Component: lvm2Assignee: LVM and device-mapper development team <lvm-team>
lvm2 sub component: Default / Unclassified QA Contact: cluster-qe <cluster-qe>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, cmarthal, heinzm, jbrassow, msnitzer, nperic, prajnoha, prockai, thornber, zkabelac
Version: 7.0   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.105-8.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-13 12:07:42 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:

Description Zdenek Kabelac 2014-02-24 20:29:59 UTC
Description of problem:

When thin pool is activated, lvm2 metadata transaction_id is validated with kernel's transaction_id.  There is allowed difference of 1, since the machine might have crashed after lvm2 metadata update, but before kernel metadata update. However this difference should be ONLY allowed, when there is some 'unfinished' transaction in lvm2 metadata. In every other case this should also mean error. Current version of lvm2 fails in the moment, there is request for new operation (i.e. adding new thin volume) where the lvm2 will spot transaction_id mismatch.

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

How reproducible:


Steps to Reproduce:
1. create thin pool and some thin volumes
2. swap metadata and dump metadata to file and lower its transaction by 1
3. thin_restore this modified metadata and swap back to thin pool
4. try to activate such thin pool

Actual results:
volumes are activated

Expected results:
activation fails since there is mismatch of kernel and lvm version.


Additional info:

Comment 3 Peter Rajnoha 2014-02-28 11:26:45 UTC
Actually, the patch for this is already in current lvm2-2.02.105-8.el7.

Comment 5 Corey Marthaler 2014-03-24 20:15:42 UTC
Fix verified in the latest rpms.

3.10.0-113.el7.x86_64
lvm2-2.02.105-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014
lvm2-libs-2.02.105-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014
lvm2-cluster-2.02.105-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014
device-mapper-1.02.84-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014
device-mapper-libs-1.02.84-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014
device-mapper-event-1.02.84-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014
device-mapper-event-libs-1.02.84-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014
device-mapper-persistent-data-0.2.8-5.el7    BUILT: Fri Feb 28 19:15:56 CST 2014
cmirror-2.02.105-13.el7    BUILT: Wed Mar 19 05:38:19 CDT 2014




# edited /tmp/snapper_thinp_dump.3588.10731 and dropped id by one.

[root@host-031 ~]# thin_restore -i /tmp/snapper_thinp_dump.3588.10731 -o /dev/snapper_thinp/newtmeta

[root@host-031 ~]# vgchange -an snapper_thinp
  0 logical volume(s) in volume group "snapper_thinp" now active

[root@host-031 ~]# lvconvert --yes --poolmetadata snapper_thinp/newtmeta --thinpool snapper_thinp/POOL
  Converted snapper_thinp/POOL to thin pool.

[root@host-031 ~]# vgchange -ay snapper_thinp
  Thin pool transaction_id=6, while expected: 7.
  Thin pool transaction_id=6, while expected: 7.
  Thin pool transaction_id=6, while expected: 7.
  Thin pool transaction_id=6, while expected: 7.
  Thin pool transaction_id=6, while expected: 7.
  Thin pool transaction_id=6, while expected: 7.
  Thin pool transaction_id=6, while expected: 7.
  1 logical volume(s) in volume group "snapper_thinp" now active

# none of the thin volumes were activated:
[root@host-031 ~]# lvs -a -o +devices
  LV              Attr       LSize   Pool Origin  Devices       
  POOL            twi---tz--   1.00g              POOL_tdata(0) 
  [POOL_tdata]    Twi-------   1.00g              /dev/sdc1(1)  
  [POOL_tmeta]    ewi-------   8.00m              /dev/sdc1(257)
  [lvol0_pmspare] ewi-------   4.00m              /dev/sdc1(0)  
  newtmeta        -wi-a-----   4.00m              /dev/sdb1(0)  
  origin          Vwi---tz--   1.00g POOL                       
  other1          Vwi---tz--   1.00g POOL                       
  other2          Vwi---tz--   1.00g POOL                       
  other3          Vwi---tz--   1.00g POOL                       
  other4          Vwi---tz--   1.00g POOL                       
  other5          Vwi---tz--   1.00g POOL                       
  snap            Vwi---tz-k   1.00g POOL origin

Comment 6 Ludek Smid 2014-06-13 12:07:42 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.