Bug 1839153 - [RFE] add thin_check support for checking a thinp metadata snapshot
Summary: [RFE] add thin_check support for checking a thinp metadata snapshot
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: device-mapper-persistent-data
Version: 8.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Joe Thornber
QA Contact: Filip Suba
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-22 15:13 UTC by Mike Snitzer
Modified: 2023-08-02 02:20 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Mike Snitzer 2020-05-22 15:13:19 UTC
Description of problem:

This comes as an RFE from a customer through support.  Customer dislikes being surprised by the fact that on thin-pool activation thin-check determines some thinp metadata corruption that requires manual thin_repair.  They would like to periodically thin_check the thinp metadata during normal usage (without requiring thin-pool deactivation).

Determined way forward on this is to enhance thin_check to support checking the thinp metadata in terms of the thinp metadata snapshot.  But thinp metadata snapshots do _not_ cover the space maps, so checking them must be skipped.

Related work items:
1) add thin_check commandline support to accommodate checking an existing thinp metadata snapshot
2) read different superblock that is associated with thinp metadata snapshot
3) perform all existing thin_check work _except_ checking the metadata spacemaps
4) update Documentation and/or manpage to include new commandline support and also add a new examples sequence that shows how to:
   - create thinp metadata snapshot
   - run thin_check against the metadata snapshot
   - delete the thinp metadata snapshot

Optional extra lvm2 work -- likely best to clone this BZ for lvm2 work:
 - "optional" _but_ ideal to have in place ASAP given it allows us to control the workflow, whereby saving customers from themselves by properly managing the lifetime of the thinp metadata snapshot
 - we don't want customers to leave thinp metadata snapshots dangling for longer than necessary because they do impact thinp performance while they exist.

1) add lvm.conf knob to perform periodic thinp metadata snapshot based checks of all thin-pool metadata (likely expressed in terms of time, 0 is disabled, non-zero is time interval between checks)
2) allow lvm.conf knob to be disabled but provide lvcreate and/or lvchange override to enable periodic thinp metadata snapshot based checking for specific thin-pools
3) enhance lvm2's monitor (that is currently used to monitor thin-pool space usage) to also perform periodic thinp metadata snapshot based checks
   - create thinp metadata snapshot
   - run thin_check against the metadata snapshot
   - delete the thinp metadata snapshot


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