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 1264972 - unable to resize thin meta volume residing on a shared VG
Summary: unable to resize thin meta volume residing on a shared VG
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.2
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: rc
: 7.3
Assignee: David Teigland
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks: 1295577 1313485 1364088
TreeView+ depends on / blocked
 
Reported: 2015-09-21 18:57 UTC by Corey Marthaler
Modified: 2021-09-03 12:50 UTC (History)
10 users (show)

Fixed In Version: lvm2-2.02.156-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 04:10:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
-vvvv of the lvextend attempt (26.56 KB, text/plain)
2015-09-21 18:59 UTC, Corey Marthaler
no flags Details
Test result (52.57 KB, text/plain)
2016-06-15 10:10 UTC, Roman Bednář
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1445 0 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2016-11-03 13:46:41 UTC

Description Corey Marthaler 2015-09-21 18:57:04 UTC
Description of problem:
[root@host-113 ~]# pvscan
  PV /dev/sdg2   VG global          lvm2 [12.49 GiB / 12.24 GiB free]
  PV /dev/sdg1   VG snapper_thinp   lvm2 [12.50 GiB / 12.25 GiB free]
  PV /dev/sda2   VG snapper_thinp   lvm2 [12.49 GiB / 12.49 GiB free]
  PV /dev/sda1   VG snapper_thinp   lvm2 [12.50 GiB / 12.50 GiB free]
  PV /dev/sdd2   VG snapper_thinp   lvm2 [12.49 GiB / 12.49 GiB free]
  PV /dev/sdd1   VG snapper_thinp   lvm2 [12.50 GiB / 12.50 GiB free]
  PV /dev/sdb2   VG snapper_thinp   lvm2 [12.49 GiB / 12.49 GiB free]
  PV /dev/sdb1   VG snapper_thinp   lvm2 [12.50 GiB / 12.50 GiB free]
  PV /dev/sdc2   VG snapper_thinp   lvm2 [12.49 GiB / 12.49 GiB free]

[root@host-113 ~]# lvcreate  --thinpool resize --profile thin-performance --zero y -L 4G --poolmetadatasize 4M snapper_thinp
  Logical volume "resize" created.
[root@host-113 ~]# lvcreate  --virtualsize 1G -T snapper_thinp/resize -n origin
  Logical volume "origin" created.

[root@host-113 ~]# lvs -a -o +devices
  LV              VG            Attr       LSize   Pool   Origin Data% Meta% Devices
  [lvmlock]       global        -wi-ao---- 256.00m                           /dev/sdg2(0)
  [lvmlock]       snapper_thinp -wi-ao---- 256.00m                           /dev/sdg1(0)
  [lvol0_pmspare] snapper_thinp ewi-------   4.00m                           /dev/sdg1(64)
  origin          snapper_thinp Vwi-a-tz--   1.00g resize        0.00
  resize          snapper_thinp twi-aotz--   4.00g               0.00  1.37  resize_tdata(0)
  [resize_tdata]  snapper_thinp Twi-ao----   4.00g                           /dev/sdg1(65)
  [resize_tmeta]  snapper_thinp ewi-ao----   4.00m                           /dev/sdc2(0)

[root@host-113 ~]# lvextend -L +100M snapper_thinp/resize_tmeta
  Lock on incorrect thin lv type snapper_thinp/resize_tmeta

[root@host-113 ~]# lvs -a -o +devices
  LV              VG            Attr       LSize   Pool   Origin Data% Meta% Devices
  [lvmlock]       global        -wi-ao---- 256.00m                           /dev/sdg2(0)
  [lvmlock]       snapper_thinp -wi-ao---- 256.00m                           /dev/sdg1(0)
  [lvol0_pmspare] snapper_thinp ewi-------   4.00m                           /dev/sdg1(64)
  origin          snapper_thinp Vwi-a-tz--   1.00g resize        0.00
  resize          snapper_thinp twi-aotz--   4.00g               0.00  1.37  resize_tdata(0)
  [resize_tdata]  snapper_thinp Twi-ao----   4.00g                           /dev/sdg1(65)
  [resize_tmeta]  snapper_thinp ewi-ao----   4.00m                           /dev/sdc2(0)


Version-Release number of selected component (if applicable):
3.10.0-306.el7.x86_64

lvm2-2.02.130-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
lvm2-libs-2.02.130-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
lvm2-cluster-2.02.130-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
device-mapper-1.02.107-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
device-mapper-libs-1.02.107-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
device-mapper-event-1.02.107-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
device-mapper-event-libs-1.02.107-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
device-mapper-persistent-data-0.5.5-1.el7    BUILT: Thu Aug 13 09:58:10 CDT 2015
cmirror-2.02.130-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015
sanlock-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
sanlock-lib-3.2.4-1.el7    BUILT: Fri Jun 19 12:48:49 CDT 2015
lvm2-lockd-2.02.130-2.el7    BUILT: Tue Sep 15 07:15:40 CDT 2015


How reproducible:
Everytime

Comment 1 Corey Marthaler 2015-09-21 18:59:43 UTC
Created attachment 1075566 [details]
-vvvv of the lvextend attempt

Comment 2 David Teigland 2015-09-22 16:09:24 UTC
It looks like there's an improved syntax for resizing the metadata device, which does work in a shared vg: lvextend --poolmetdatasize <size> vg/pool

Comment 3 Corey Marthaler 2015-09-24 16:18:23 UTC
Thanks, I'll update the tests to use the improved syntax.

[root@harding-03 ~]# lvextend --poolmetadatasize +100M snapper_thinp/resize
  Extending logical volume resize_tmeta to 104.00 MiB.
  Logical volume resize successfully resized.

Comment 4 Roman Bednář 2016-02-10 09:15:09 UTC
Adding QA ACK for 7.3.

Also it would be nice to have this added to manpages.

Comment 5 David Teigland 2016-06-10 20:14:57 UTC
works with --poolmetadatasize

Comment 7 Roman Bednář 2016-06-15 10:10:36 UTC
Created attachment 1168302 [details]
Test result

Comment 8 Roman Bednář 2016-06-15 10:12:34 UTC
Verified. Full test results in attachment.

[snapper_thinp_raid1_thin_pool_resize] SCENARIO - [thin_pool_resize]
...
[snapper_thinp_thin_pool_resize] Extending thin pool meta data volume...
[snapper_thinp_thin_pool_resize] lvextend --poolmetadatasize +100M snapper_thinp/resize
...
------------------- Summary ---------------------
Testcase                                  Result    
--------                                  ------    
snapper_thinp_raid10_thin_pool_resize      PASS      
snapper_thinp_thin_pool_resize             PASS      
snapper_thinp_raid1_thin_pool_resize       PASS      
snapper_thinp_raid10_thin_pool_resize      PASS      
snapper_thinp_thin_pool_resize             PASS      
snapper_thinp_raid1_thin_pool_resize       PASS      
=================================================

Tested with:

3.10.0-429.el7.x86_64

lvm2-2.02.156-1.el7    BUILT: Mon Jun 13 10:05:51 CEST 2016
lvm2-libs-2.02.156-1.el7    BUILT: Mon Jun 13 10:05:51 CEST 2016
lvm2-cluster-2.02.156-1.el7    BUILT: Mon Jun 13 10:05:51 CEST 2016
device-mapper-1.02.126-1.el7    BUILT: Mon Jun 13 10:05:51 CEST 2016
device-mapper-libs-1.02.126-1.el7    BUILT: Mon Jun 13 10:05:51 CEST 2016
device-mapper-event-1.02.126-1.el7    BUILT: Mon Jun 13 10:05:51 CEST 2016
device-mapper-event-libs-1.02.126-1.el7    BUILT: Mon Jun 13 10:05:51 CEST 2016
device-mapper-persistent-data-0.6.2-0.1.rc8.el7    BUILT: Wed May  4 09:56:34 CEST 2016
cmirror-2.02.156-1.el7    BUILT: Mon Jun 13 10:05:51 CEST 2016

Comment 9 David Teigland 2016-06-15 14:15:14 UTC
(In reply to Roman Bednář from comment #7)
> Created attachment 1168302 [details]
> Test result

That test does not appear to use a shared VG.

Comment 10 Corey Marthaler 2016-06-15 17:00:54 UTC
Here is a proper regression check on shared storage with the latest 7.3 rpms showing that 'lvresize --poolmetadatasize' continues to work and 'lvextend -L' continues to *not* work (as expected).



3.10.0-418.el7.x86_64
lvm2-2.02.152-2.el7    BUILT: Thu May  5 02:33:28 CDT 2016
lvm2-libs-2.02.152-2.el7    BUILT: Thu May  5 02:33:28 CDT 2016
lvm2-cluster-2.02.152-2.el7    BUILT: Thu May  5 02:33:28 CDT 2016
device-mapper-1.02.124-2.el7    BUILT: Thu May  5 02:33:28 CDT 2016
device-mapper-libs-1.02.124-2.el7    BUILT: Thu May  5 02:33:28 CDT 2016
device-mapper-event-1.02.124-2.el7    BUILT: Thu May  5 02:33:28 CDT 2016
device-mapper-event-libs-1.02.124-2.el7    BUILT: Thu May  5 02:33:28 CDT 2016
device-mapper-persistent-data-0.6.2-0.1.rc8.el7    BUILT: Wed May  4 02:56:34 CDT 2016
cmirror-2.02.152-2.el7    BUILT: Thu May  5 02:33:28 CDT 2016
sanlock-3.3.0-1.el7    BUILT: Wed Feb 24 09:52:30 CST 2016
sanlock-lib-3.3.0-1.el7    BUILT: Wed Feb 24 09:52:30 CST 2016
lvm2-lockd-2.02.152-2.el7    BUILT: Thu May  5 02:33:28 CDT 2016


Turning on lvmlockd in lvm.conf
        mckinley-01 mckinley-02 mckinley-03 mckinley-04

Starting sanlock on
        mckinley-01 mckinley-02 mckinley-03 mckinley-04

Starting lvmlockd on
        mckinley-01 mckinley-02 mckinley-03 mckinley-04

setting up first "global lock" dummy vg for lvmlockd...
vgcreate --shared global /dev/mapper/mpathh1
mckinley-01: vgchange --lock-start global
mckinley-02: vgchange --lock-start global
  Skipping global lock: lockspace not found or started
mckinley-03: vgchange --lock-start global
  Skipping global lock: lockspace not found or started
mckinley-04: vgchange --lock-start global
  Skipping global lock: lockspace not found or started

creating lvm devices...
mckinley-01: pvcreate /dev/mapper/mpatha1 /dev/mapper/mpathe1 /dev/mapper/mpathc1 /dev/mapper/mpathb1 /dev/mapper/mpathf1
mckinley-01: vgcreate --shared snapper_thinp /dev/mapper/mpatha1 /dev/mapper/mpathe1 /dev/mapper/mpathc1 /dev/mapper/mpathb1 /dev/mapper/mpathf1
mckinley-01: vgchange --lock-start snapper_thinp
mckinley-02: vgchange --lock-start snapper_thinp
mckinley-03: vgchange --lock-start snapper_thinp
mckinley-04: vgchange --lock-start snapper_thinp

============================================================
Iteration 1 of 1 started at Wed Jun 15 11:35:42 CDT 2016
============================================================
SCENARIO - [resize_pool_meta_device]
Create an XFS filesystem, mount it, snapshot it, and attempt to resize it's pool meta device while online
Making pool volume

lvcreate --activate ey --thinpool POOL -L 2G --profile thin-performance --zero n --poolmetadatasize 4M snapper_thinp

Making origin volume
lvcreate --activate ey --virtualsize 1G -T snapper_thinp/POOL -n origin
lvcreate --activate ey --virtualsize 1G -T snapper_thinp/POOL -n other1
lvcreate --activate ey -V 1G -T snapper_thinp/POOL -n other2
  WARNING: Sum of all thin volume sizes (3.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (2.00 GiB)!
lvcreate --activate ey -V 1G -T snapper_thinp/POOL -n other3
  WARNING: Sum of all thin volume sizes (4.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (2.00 GiB)!
lvcreate --activate ey -V 1G -T snapper_thinp/POOL -n other4
  WARNING: Sum of all thin volume sizes (5.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (2.00 GiB)!
lvcreate --activate ey -V 1G -T snapper_thinp/POOL -n other5
  WARNING: Sum of all thin volume sizes (6.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (2.00 GiB)!

Making snapshot of origin volume
lvcreate --activate ey -k n -s /dev/snapper_thinp/origin -n meta_resize

[root@mckinley-02 ~]# lvs -a -o +devices
  LV              VG             Attr       LSize   Pool Origin Data% Meta% Devices
  [lvmlock]       global         -wi-ao---- 256.00m                         /dev/mapper/mpathc1(0)
  POOL            snapper_thinp  twi-aot---   2.00g             0.21  1.76  POOL_tdata(0)         
  [POOL_tdata]    snapper_thinp  Twi-ao----   2.00g                         /dev/mapper/mpathe1(65)
  [POOL_tmeta]    snapper_thinp  ewi-ao----   4.00m                         /dev/mapper/mpathf1(0)
  [lvmlock]       snapper_thinp  -wi-ao---- 256.00m                         /dev/mapper/mpathe1(0)
  [lvol0_pmspare] snapper_thinp  ewi-------   4.00m                         /dev/mapper/mpathe1(64)
  meta_resize     snapper_thinp  Vwi-a-t---   1.00g POOL origin 0.37
  origin          snapper_thinp  Vwi-aot---   1.00g POOL        0.37
  other1          snapper_thinp  Vwi-a-t---   1.00g POOL        0.01
  other2          snapper_thinp  Vwi-a-t---   1.00g POOL        0.01
  other3          snapper_thinp  Vwi-a-t---   1.00g POOL        0.01
  other4          snapper_thinp  Vwi-a-t---   1.00g POOL        0.01
  other5          snapper_thinp  Vwi-a-t---   1.00g POOL        0.01

[root@mckinley-02 ~]# lvresize --poolmetadatasize +40M /dev/snapper_thinp/POOL
  Extending logical volume snapper_thinp/POOL_tmeta to 44.00 MiB.
  Logical volume POOL successfully resized.

[root@mckinley-02 ~]# lvextend -L +100M snapper_thinp/POOL_tmeta
  Lock on incorrect thin lv type snapper_thinp/POOL_tmeta

Comment 12 errata-xmlrpc 2016-11-04 04:10:43 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-2016-1445.html


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