Bug 1000604 - allow user to switch thin-pool to read-only mode at a configurable low space threshold
allow user to switch thin-pool to read-only mode at a configurable low space ...
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2 (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Zdenek Kabelac
cluster-qe@redhat.com
:
Depends On: 1000611 1049591
Blocks: 1119323
  Show dependency treegraph
 
Reported: 2013-08-23 15:58 EDT by Mike Snitzer
Modified: 2017-08-17 14:30 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1000611 (view as bug list)
Environment:
Last Closed:
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)

  None (edit)
Description Mike Snitzer 2013-08-23 15:58:30 EDT
Description of problem:
When a DM thin-pool runs out of space it will automatically start queuing all outstanding IO destined to a thin device backed by that thin-pool.  This is similar to the dm-multipath "queue_if_no_path" option.

However, many times it is not desirable for the system to start queuing IO (potentially) indefinitely.  We do suggest the admin always have configured 1) a sane low water mark 2) enough free space in the VG that should the low water mark be hit, lvm2 will resize the volume.

BUT admins may _never_ want to queue IO if it comes to the fact that the thin-pool has actually ran out of space.

I discussed having the kernel manage transitioning a thin-pool from read-write access to read-only based on a low space threshold (likely one that is below the low water mark).  But Joe pointed out that there is no reason for this policy to be in the kernel.

Proposal is for lvm2 to:
   expose something like "read_only_if_low_space_threshold" in lvm.conf
   - if 100, then read_only transition is disabled.
   - if < 100, then once the free space reaches this percentage, switch to read-only


Additional info:

The existing kernel mechanism for controlling read_only vs read_write access is to use the "read_only" feature flag on thin-pool table load.

SO lvm2 could selectively reload the thin-pool table either with or without the "read_only" feature based on the lvm.conf "read_only_if_low_space_threshold".

BUT.. there is a dm-thin kernel bug/limitation that disallows transitioning a thin-pool table from RO back to RW via table reload.  This would obviously need to be fixed.
Comment 2 RHEL Product and Program Management 2014-03-22 02:40:54 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 3 Mike Snitzer 2014-07-18 17:02:02 EDT
Even though kernel bug#1049591 that this bug depended on is fixed, I'm left wondering if this feature is desirable.

We now have the 'error_if_no_space' feature too...

So I'm open to whatever others think is best.  But no sense creating make work for ourselves (with this "read_only_if_low_space_threshold" feature) if no customers are asking for that functionality.

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