Bug 1370490

Summary: LVM Thin: Call fstrim when thin-pool high water mark is reached
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 CURRENTRELEASE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: agk, heinzm, jbrassow, msnitzer, prajnoha, prockai, thornber, zkabelac
Version: 7.3   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-27 21:52:47 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:
Bug Depends On: 1410768, 1442992    
Bug Blocks:    

Description Jonathan Earl Brassow 2016-08-26 13:13:39 UTC
When a thin-pool's high water mark is reached, it raises an event that is responded to by dmeventd.  'dmeventd' is charged with growing the thin-pool if possible.  Another way to free up space in the thin-pool is to call 'fstrim' on file systems associated with that pool.  It may be desirable to make this call configurable if it takes considerable time or I/O bandwidth to issue all the discard calls.

Comment 1 Zdenek Kabelac 2017-01-22 20:46:43 UTC
We will handle such 'policy' logic via external command.

The bug 1410768 will allow to write 'smart' userland handling - as running tools like 'fstrim' is way beyond lvm2 internal logic.

Comment 2 Jonathan Earl Brassow 2017-07-27 21:52:47 UTC
It is now possible to do whatever you want by defining a "thin_command" in lvm.conf and running what you want as things get full.