Bug 1189215

Summary: LVM Thin: Handle out of space conditions better
Product: Red Hat Enterprise Linux 7 Reporter: Jonathan Earl Brassow <jbrassow>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: Thin Provisioning QA Contact: cluster-qe <cluster-qe>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, cmarthal, heinzm, jbrassow, msnitzer, nperic, prajnoha, prockai, thornber, zkabelac
Version: 7.1   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.125-1.el7 Doc Type: Enhancement
Doc Text:
Feature: Improve handling of thin-pool better when pool is over provisioning available space. Reason: Thin-pool is always going to cause some troubles when user hits end of available free space and there is no more to add. So lvm2 should inform user about possible problems. Result: Lvm2 has code to check free space in thin-pool and warn in the case autoresize is not configured, or the total space in VG might not be enough to satisfy space requirements. Thin pools with used space over threshold do not allow creation of any new thin volumes
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 12:46:06 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 Jonathan Earl Brassow 2015-02-04 17:10:04 UTC
Several ideas were discussed for handling issues surrounding out-of-space conditions in thin-p, like:
1) change the default "resize thin-p at 100%" setting in lvm.conf
2) warn users that they have insufficient space in a pool to cover a fully used thinLV
3) change default wait time from 60sec after an out-of-space condition to something longer
4) etc...

This bug is not dictating a particular action, but there should be some improvement.

Comment 3 Zdenek Kabelac 2015-07-08 14:36:45 UTC
Tool now detects overprovisioning of thin-pool and if the space in thin-pool is not enough and the threshold for thin-pool resize is still having 'default' 100% value - tool will issue WARNING to a user.

https://www.redhat.com/archives/lvm-devel/2015-July/msg00013.html

(patch includes tests for warning messaging in numerous conditions)

Comment 5 Corey Marthaler 2015-10-08 16:56:42 UTC
Many items were discussed in comment #0 of this RFE, however according to comment #3 only one (item number 2) was actually implemented. Marking this verified for that *one* item only.


[root@host-116 ~]# lvs -a -o +devices
  LV              VG            Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert Devices       
  root            rhel_host-116 -wi-ao----   6.67g                                                     /dev/vda2(205)
  swap            rhel_host-116 -wi-ao---- 820.00m                                                     /dev/vda2(0)  
  POOL            snapper_thinp twi-aot---   1.00g             0.04   1.66                             POOL_tdata(0) 
  [POOL_tdata]    snapper_thinp Twi-ao----   1.00g                                                     /dev/sdh1(1)  
  [POOL_tmeta]    snapper_thinp ewi-ao----   4.00m                                                     /dev/sdf1(0)  
  display_snap    snapper_thinp Vwi-a-t---   1.00g POOL origin 0.01                                                  
  [lvol0_pmspare] snapper_thinp ewi-------   4.00m                                                     /dev/sdh1(0)  
  origin          snapper_thinp Vwi-a-t---   1.00g POOL        0.01                                                  
  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@host-116 ~]# lvcreate  --virtualsize 1G -T snapper_thinp/POOL -n other6
  WARNING: Sum of all thin volume sizes (8.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.
  Logical volume "other6" created.

Comment 6 errata-xmlrpc 2015-11-19 12:46:06 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-2147.html