RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1000604 - allow user to switch thin-pool to read-only mode at a configurable low space threshold
Summary: allow user to switch thin-pool to read-only mode at a configurable low space ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: lvm2
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: LVM and device-mapper development team
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 1000611 1049591
Blocks: 1119323
TreeView+ depends on / blocked
 
Reported: 2013-08-23 19:58 UTC by Mike Snitzer
Modified: 2021-09-03 12:39 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1000611 (view as bug list)
Environment:
Last Closed: 2020-08-19 21:16:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mike Snitzer 2013-08-23 19:58:30 UTC
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 Program Management 2014-03-22 06:40:54 UTC
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 21:02:02 UTC
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.