Bug 1443438

Summary: lvm: warning of thin pool capacity not working well
Product: Red Hat Enterprise Linux 7 Reporter: Bruno Goncalves <bgoncalv>
Component: lvm2Assignee: Zdenek Kabelac <zkabelac>
lvm2 sub component: Thin Provisioning QA Contact: Bruno Goncalves <bgoncalv>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, heinzm, jbrassow, mcsontos, msnitzer, prajnoha, prockai, thornber, zkabelac
Version: 7.4   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: lvm2-2.02.171-2.el7 Doc Type: If docs needed, set a value
Doc Text:
In release regression bugfix, no doc needed
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-31 13:52:56 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 Bruno Goncalves 2017-04-19 09:23:05 UTC
Description of problem:
When a thin pool reaches some usage levels (80%, 85%, 90% and 95%) a warning message should be provided, but it does not happen.


Version-Release number of selected component (if applicable):
lvm2-2.02.169-1.el7.x86_64
kernel-3.10.0-632.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Create a thin pool and thin device
fallocate -l 128M /tmp/loop0.img
losetup /dev/loop0 /tmp/loop0.img
vgcreate --force testvg /dev/loop0
lvcreate -V100m -L100m -T testvg/pool1 -n lv1

2.Make thin pool 80% full
dd if=/dev/zero of=/dev/testvg/lv1 bs=1M count=80
sleep 30

3.Check if warning shows on log
tail /var/log/messages

Actual results:
No warning message is shown

Expected results:
Warning message

Additional info:
If then 81% is used the warning message is shown:
dd if=/dev/zero of=/dev/testvg/lv1 bs=1M count=81; sleep 30; tail /var/log/messages
<snip>
Apr 19 05:17:59 localhost lvm[14037]: WARNING: Thin pool testvg-pool1-tpool data is now 81.00% full.


Further increase such to 85% or 90% does not give more warnings
# lvs testvg/pool1
  LV    VG     Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  pool1 testvg twi-aotz-- 100.00m             85.00  1.95

Comment 1 Zdenek Kabelac 2017-04-19 11:09:45 UTC
Yep - we print only warning on the crossing of 80% threshold but not for later once - this will need further thinking as we on the other hand gained option
to correctly work with thin-pool which has decreased its usage and crossed 80% again.

But it should be possible to restore warning also for 85% and more percent again.

Comment 2 Zdenek Kabelac 2017-05-24 13:22:04 UTC
Should be addressed by commit: 455a4de090f10f98ac2932a2540a30b7fdc34f61

https://www.redhat.com/archives/lvm-devel/2017-May/msg00031.html


Warning is printed with 80, 85, 90, 95, 100%

Comment 3 Marian Csontos 2017-05-24 14:48:05 UTC
In release bugfix - moving to ON_QA.

Comment 4 Bruno Goncalves 2017-05-29 09:38:38 UTC
Tested with lvm2-2.02.171-2.el7 and it works well.

I can see the messages below as the pool is being used.

WARNING: Thin pool testvg-pool3-tpool data is now 81.00% full.

WARNING: Thin pool testvg-pool3-tpool data is now 91.00% full.

WARNING: Thin pool testvg-pool3-tpool data is now 96.00% full.

Comment 5 Marian Csontos 2017-05-31 13:52:56 UTC
In release bug. Closing as fixed.