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 1967744 - Unable to activate snapshots of external origin thin volumes
Summary: Unable to activate snapshots of external origin thin volumes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: lvm2
Version: 8.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: beta
: ---
Assignee: Zdenek Kabelac
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-03 18:52 UTC by Chris Mackowski
Modified: 2021-11-10 08:57 UTC (History)
8 users (show)

Fixed In Version: lvm2-2.03.12-6.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-09 19:45:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4431 0 None None None 2021-11-09 19:46:18 UTC

Description Chris Mackowski 2021-06-03 18:52:59 UTC
While attempting to create snapshot from thin vol, lvcreate fails when --setactivationskip set to no.

# snapshot attempt with activation skip set to no
	[root@hayes-01 ~]# lvcreate --yes -k n -s /dev/snapper_thinp/origin -n manipulation2
	 WARNING: Sum of all thin volume sizes (2.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB).
	 WARNING: You have not turned on protection against thin pools running out of space.
	 WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full.
	 Activation of logical volume snapper_thinp/manipulation2 is prohibited while logical volume snapper_thinp/CPOOL_cpool_cmeta is active.
	 Failed to activate thin manipulation2.

# snapshot attempt with activation skip set to yes
	[root@hayes-01 ~]# lvcreate --yes -k y -s /dev/snapper_thinp/origin -n manipulation2
	 WARNING: Sum of all thin volume sizes (2.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB).
	 WARNING: You have not turned on protection against thin pools running out of space.
	 WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full.
	 Logical volume "manipulation2" created.

Comment 2 Zdenek Kabelac 2021-06-16 17:18:41 UTC
(In reply to Chris Mackowski from comment #0)
> While attempting to create snapshot from thin vol, lvcreate fails when
> --setactivationskip set to no.
> 
> # snapshot attempt with activation skip set to no
> 	[root@hayes-01 ~]# lvcreate --yes -k n -s /dev/snapper_thinp/origin -n
> manipulation2
> 	 WARNING: Sum of all thin volume sizes (2.00 GiB) exceeds the size of thin
> pool snapper_thinp/POOL (1.00 GiB).
> 	 WARNING: You have not turned on protection against thin pools running out
> of space.
> 	 WARNING: Set activation/thin_pool_autoextend_threshold below 100 to
> trigger automatic extension of thin pools before they get full.
> 	 Activation of logical volume snapper_thinp/manipulation2 is prohibited
> while logical volume snapper_thinp/CPOOL_cpool_cmeta is active.


Normally you should have thin-pool either active or inactive - but in this
case lvm2 notices there is active _cmeta device - so it looks like left-over from
some failing activation?

Normally the setskipactivation should work - unless I'm missing some detail.

So please provide full -vvvv trace of your failure.

Also the check your 'dmsetup table' if there aren't some dangling devices from some failure.
Eventually remove these devices with  'dmsetup remove_all'  (before - it removes ALL devices that are not open!)
and retry your lvm2 command.

Comment 9 Zdenek Kabelac 2021-07-14 10:58:24 UTC
Fixed upstream with this fix for active external origin component:

https://listman.redhat.com/archives/lvm-devel/2021-July/msg00005.html

Comment 10 Zdenek Kabelac 2021-07-16 12:40:39 UTC
Seems I've got wrong buffer into mouse cut&paste:


https://listman.redhat.com/archives/lvm-devel/2021-July/msg00017.html


Also provides testing example.

Comment 18 Corey Marthaler 2021-08-30 17:45:14 UTC
kernel-4.18.0-339.el8    BUILT: Fri Aug 27 09:59:28 CDT 2021
lvm2-2.03.12-8.el8    BUILT: Thu Aug 26 15:49:15 CDT 2021
lvm2-libs-2.03.12-8.el8    BUILT: Thu Aug 26 15:49:15 CDT 2021


[root@hayes-01 ~]# lvs -a -o +devices,segtype
  LV                  VG            Attr       LSize Pool          Origin            Data%  Meta%  Move Log Cpy%Sync Convert Devices              Type      
  [CPOOL_cpool]       snapper_thinp Cwi---C--- 1.00g                                 0.00   2.93            0.00             CPOOL_cpool_cdata(0) cache-pool
  [CPOOL_cpool_cdata] snapper_thinp Cwi-ao---- 1.00g                                                                         /dev/sdc1(0)         linear    
  [CPOOL_cpool_cmeta] snapper_thinp ewi-ao---- 8.00m                                                                         /dev/sdd1(0)         linear    
  POOL                snapper_thinp twi-aot--- 1.00g                                 0.00   11.04                            POOL_tdata(0)        thin-pool 
  [POOL_tdata]        snapper_thinp Twi-ao---- 1.00g                                                                         /dev/sdb1(1)         linear    
  [POOL_tmeta]        snapper_thinp ewi-ao---- 4.00m                                                                         /dev/sdk1(0)         linear    
  extorigin           snapper_thinp ori---C--- 1.00g [CPOOL_cpool] [extorigin_corig] 0.00   2.93            0.00             extorigin_corig(0)   cache     
  [extorigin_corig]   snapper_thinp owi-aoC--- 1.00g                                                                         /dev/sdb1(258)       linear    
  [lvol0_pmspare]     snapper_thinp ewi------- 8.00m                                                                         /dev/sdb1(0)         linear    
  [lvol0_pmspare]     snapper_thinp ewi------- 8.00m                                                                         /dev/sdb1(257)       linear    
  origin              snapper_thinp Vwi-a-t--- 1.00g POOL          extorigin         0.00                                                         thin      

[root@hayes-01 ~]# lvcreate --yes -k n -s /dev/snapper_thinp/origin -n manipulation2
  WARNING: Sum of all thin volume sizes (2.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB).
  WARNING: You have not turned on protection against thin pools running out of space.
  WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full.
  Logical volume "manipulation2" created.
[root@hayes-01 ~]# lvcreate --yes -k y -s /dev/snapper_thinp/origin -n manipulation3
  WARNING: Sum of all thin volume sizes (3.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB).
  WARNING: You have not turned on protection against thin pools running out of space.
  WARNING: Set activation/thin_pool_autoextend_threshold below 100 to trigger automatic extension of thin pools before they get full.
  Logical volume "manipulation3" created.
[root@hayes-01 ~]# lvchange -ay -kn snapper_thinp/manipulation2
  Logical volume snapper_thinp/manipulation2 changed.
  WARNING: Combining activation change with other commands is not advised.
[root@hayes-01 ~]# lvchange -ay -kn snapper_thinp/manipulation3
  Logical volume snapper_thinp/manipulation3 changed.
  WARNING: Combining activation change with other commands is not advised.

Comment 21 errata-xmlrpc 2021-11-09 19:45:54 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 (lvm2 bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2021:4431


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