Bug 1839153

Summary: [RFE] add thin_check support for checking a thinp metadata snapshot
Product: Red Hat Enterprise Linux 8 Reporter: Mike Snitzer <msnitzer>
Component: device-mapper-persistent-dataAssignee: Joe Thornber <thornber>
Status: CLOSED MIGRATED QA Contact: Filip Suba <fsuba>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.3CC: agk, cbradsha, cwei, heinzm, jbrassow, jmagrini, jpittman, loberman, lvm-team, msnitzer, thornber
Target Milestone: rcKeywords: FutureFeature, MigratedToJIRA, Triaged
Target Release: ---Flags: pm-rhel: mirror+
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: 2023-09-23 15:55:18 UTC Type: Story
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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

Comment 7 RHEL Program Management 2023-09-23 15:53:25 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 8 RHEL Program Management 2023-09-23 15:55:18 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.