Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1348336 - full thin pool now allows additional virt volume creation
full thin pool now allows additional virt volume creation
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.3
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Zdenek Kabelac
cluster-qe@redhat.com
Milan Navratil
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-06-20 16:54 EDT by Corey Marthaler
Modified: 2016-11-04 00:21 EDT (History)
9 users (show)

See Also:
Fixed In Version: lvm2-2.02.165-3.el7
Doc Type: Release Note
Doc Text:
The thin pool is now always checked for sufficient space when creating a new thin volume Even when the user does not use autoresize with thin pool monitoring, the thin pool is now always checked for sufficient space when creating a new thin volume. A new thin volumes now cannot be created in the following situations: * The thin-pool has reached 100% of the data volume capacity. * There is less than 25% of thin pool metadata free space for metadata smaller than 16 MiB. * There is less than 4 MiB of free space in metadata.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-04 00:21:54 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1445 normal SHIPPED_LIVE lvm2 bug fix and enhancement update 2016-11-03 09:46:41 EDT

  None (edit)
Description Corey Marthaler 2016-06-20 16:54:51 EDT
Description of problem:
[root@host-083 ~]# lvs -a -o +devices
  LV              Attr       LSize Pool Origin Data%  Meta%  Devices
  POOL            twi-aot-D- 1.00g             100.00 14.65  POOL_tdata(0)
  [POOL_tdata]    Twi-ao---- 1.00g                           /dev/sdb1(1)
  [POOL_tmeta]    ewi-ao---- 4.00m                           /dev/sdf1(0)
  full_snap       Vwi-aot--- 2.00g POOL origin 49.98
  [lvol0_pmspare] ewi------- 4.00m                           /dev/sdb1(0)
  origin          Vwi-a-t--- 2.00g POOL        3.20
  other1          Vwi-a-t--- 2.00g POOL        0.00
  other2          Vwi-a-t--- 2.00g POOL        0.00
  other3          Vwi-a-t--- 2.00g POOL        0.00
  other4          Vwi-a-t--- 2.00g POOL        0.00
  other5          Vwi-a-t--- 2.00g POOL        0.00
  other6          Vwi-a-t--- 1.00g POOL        0.00
  other7          Vwi-a-t--- 1.00g POOL        0.00
  other8          Vwi-a-t--- 1.00g POOL        0.00


[root@host-083 ~]# lvcreate  -V 1G -T snapper_thinp/POOL -n other9
  WARNING: Sum of all thin volume sizes (18.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB)!
  For thin pool auto extension activation/thin_pool_autoextend_threshold should be below 100.
  /dev/snapper_thinp/other9: write failed after 0 of 4096 at 0: Input/output error
  Logical volume "other9" created.
[root@host-083 ~]# echo $?
0

# This is the expected behavior:
lvcreate  -V 1G -T snapper_thinp/POOL -n other9
  WARNING: Sum of all thin volume sizes (15.00 GiB) exceeds the size of thin pool snapper_thinp/POOL (1.00 GiB)!
  Free space in pool snapper_thinp/POOL is above threshold, new volumes are not allowed.


[root@host-083 ~]# lvs -a -o +devices
  LV              Attr       LSize Pool Origin Data%  Meta%  Devices
  POOL            twi-aot-D- 1.00g             100.00 14.75  POOL_tdata(0)
  [POOL_tdata]    Twi-ao---- 1.00g                           /dev/sdb1(1)
  [POOL_tmeta]    ewi-ao---- 4.00m                           /dev/sdf1(0)
  full_snap       Vwi-aot--- 2.00g POOL origin 49.98
  [lvol0_pmspare] ewi------- 4.00m                           /dev/sdb1(0)
  origin          Vwi-a-t--- 2.00g POOL        3.20
  other1          Vwi-a-t--- 2.00g POOL        0.00
  other2          Vwi-a-t--- 2.00g POOL        0.00
  other3          Vwi-a-t--- 2.00g POOL        0.00
  other4          Vwi-a-t--- 2.00g POOL        0.00
  other5          Vwi-a-t--- 2.00g POOL        0.00
  other6          Vwi-a-t--- 1.00g POOL        0.00
  other7          Vwi-a-t--- 1.00g POOL        0.00
  other8          Vwi-a-t--- 1.00g POOL        0.00
  other9          Vwi-a-t--- 1.00g POOL        0.00


[root@host-083 ~]# dmsetup status
snapper_thinp-origin: 0 4194304 thin 134400 4194303
snapper_thinp-other9: 0 2097152 thin 0 -
snapper_thinp-other8: 0 2097152 thin 0 -
snapper_thinp-POOL: 0 2097152 linear 
snapper_thinp-other7: 0 2097152 thin 0 -
snapper_thinp-other6: 0 2097152 thin 0 -
snapper_thinp-other5: 0 4194304 thin 128 127
snapper_thinp-other4: 0 4194304 thin 128 127
snapper_thinp-other3: 0 4194304 thin 128 127
snapper_thinp-POOL-tpool: 0 2097152 thin-pool 11 151/1024 16384/16384 - out_of_data_space no_discard_passdown error_if_no_space - 
snapper_thinp-POOL_tdata: 0 2097152 linear 
snapper_thinp-other2: 0 4194304 thin 128 127
snapper_thinp-full_snap: 0 4194304 thin 2096128 4194303
snapper_thinp-POOL_tmeta: 0 8192 linear 
snapper_thinp-other1: 0 4194304 thin 128 127


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

lvm2-2.02.156-1.el7    BUILT: Mon Jun 13 03:05:51 CDT 2016
lvm2-libs-2.02.156-1.el7    BUILT: Mon Jun 13 03:05:51 CDT 2016
lvm2-cluster-2.02.156-1.el7    BUILT: Mon Jun 13 03:05:51 CDT 2016
device-mapper-1.02.126-1.el7    BUILT: Mon Jun 13 03:05:51 CDT 2016
device-mapper-libs-1.02.126-1.el7    BUILT: Mon Jun 13 03:05:51 CDT 2016
device-mapper-event-1.02.126-1.el7    BUILT: Mon Jun 13 03:05:51 CDT 2016
device-mapper-event-libs-1.02.126-1.el7    BUILT: Mon Jun 13 03:05:51 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.156-1.el7    BUILT: Mon Jun 13 03:05:51 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.156-1.el7    BUILT: Mon Jun 13 03:05:51 CDT 2016


How reproducible:
Everytime
Comment 3 Zdenek Kabelac 2016-09-19 08:57:35 EDT
Through these upstream patches:

https://www.redhat.com/archives/lvm-devel/2016-September/msg00048.html
https://www.redhat.com/archives/lvm-devel/2016-September/msg00047.html


there was introduced new 'wanted' behavior - where lvm2 more protects users from ruining their thin-pools via lvm2 commands.

Now there is a strict 'rule' - either there is 25% of metadata volume free (for thin metadata volumes below 16MiB in size) or there is at least 4MiB of free space otherwise. This rule also 'out-rules' any user-threshold settings (i.e. user may preset 99% threshold value - yet this rule above has higher priority).

When thin pool metadata free space is not within this 'restricted' limit - new thin-volumes shell not possible to create.
Comment 5 Corey Marthaler 2016-09-21 17:02:15 EDT
New thin virt volumes no longer allowed to be created when pool is full.  Marking verified in the latest rpms.


3.10.0-501.el7.x86_64
lvm2-2.02.165-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
lvm2-libs-2.02.165-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
lvm2-cluster-2.02.165-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
device-mapper-1.02.134-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
device-mapper-libs-1.02.134-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
device-mapper-event-1.02.134-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
device-mapper-event-libs-1.02.134-3.el7    BUILT: Wed Sep 21 08:26:18 CDT 2016
device-mapper-persistent-data-0.6.3-1.el7    BUILT: Fri Jul 22 05:29:13 CDT 2016



[root@host-119 ~]# lvs -a -o +devices
  LV              Attr         LSize Pool Origin Data%  Meta% Devices
  POOL            twi-aot-D-   1.00g             100.00 14.45 POOL_tdata(0)
  [POOL_tdata]    Twi-ao----   1.00g                          /dev/sdc1(1)
  [POOL_tmeta]    ewi-ao----   4.00m                          /dev/sde1(0)
  full_snap       Vwi-aot---   2.00g POOL origin 49.97
  [lvol0_pmspare] ewi-------   4.00m                          /dev/sdc1(0)
  origin          Vwi-a-t---   2.00g POOL        3.20
  other1          Vwi-a-t---   2.00g POOL        0.00
  other2          Vwi-a-t---   2.00g POOL        0.00
  other3          Vwi-a-t---   2.00g POOL        0.00
  other4          Vwi-a-t---   2.00g POOL        0.00
  other5          Vwi-a-t---   2.00g POOL        0.00

[root@host-119 ~]# lvcreate  -V 1G -T snapper_thinp/POOL -n other6
  Using default stripesize 64.00 KiB.
  Cannot create new thin volume, free space in thin pool snapper_thinp/POOL reached threshold.
[root@host-119 ~]# lvcreate  -V 1G -T snapper_thinp/POOL -n other7
  Using default stripesize 64.00 KiB.
  Cannot create new thin volume, free space in thin pool snapper_thinp/POOL reached threshold.

[root@host-119 ~]# dmsetup status
snapper_thinp-origin: 0 4194304 thin 134400 4194303
snapper_thinp-POOL: 0 2097152 linear 
snapper_thinp-other5: 0 4194304 thin 128 127
snapper_thinp-other4: 0 4194304 thin 128 127
snapper_thinp-other3: 0 4194304 thin 128 127
snapper_thinp-POOL-tpool: 0 2097152 thin-pool 7 148/1024 16384/16384 - out_of_data_space no_discard_passdown error_if_no_space - 
snapper_thinp-POOL_tdata: 0 2097152 linear 
snapper_thinp-other2: 0 4194304 thin 128 127
snapper_thinp-full_snap: 0 4194304 thin 2096000 4194303
snapper_thinp-POOL_tmeta: 0 8192 linear 
snapper_thinp-other1: 0 4194304 thin 128 127
Comment 9 errata-xmlrpc 2016-11-04 00:21:54 EDT
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.