Description of problem: The lvmthin man page currently says Metadata check and repair If thin pool metadata is damaged, it may be repairable. Checking and repairing thin pool metadata is analagous to running fsck/repair on a file system. ... Command to repair a thin pool: lvconvert --repair VG/ThinPoolLV Repair performs the following steps: ... If the repair does not work, the thin pool LV and its thin LVs are lost. Can we change the wording to suggest that the meta0 will contain the original damaged metadata and that can be used for possible recovery, if the lvconvert --repair fails to automatically repair metadata? Customer read the line saying that if repair doesnt work, the thin pool is lost, and they are reluctant to run lvconvert --repair
Pushed this upstream change: https://www.redhat.com/archives/lvm-devel/2021-February/msg00000.html giving some more details about repair steps.
Marking Verified:Tested in the latest lvm rpms. kernel-4.18.0-305.7.el8.kpq1 BUILT: Mon May 17 12:55:07 CDT 2021 lvm2-2.03.12-2.el8 BUILT: Tue Jun 1 06:55:37 CDT 2021 lvm2-libs-2.03.12-2.el8 BUILT: Tue Jun 1 06:55:37 CDT 2021 device-mapper-1.02.177-2.el8 BUILT: Tue Jun 1 06:55:37 CDT 2021 device-mapper-libs-1.02.177-2.el8 BUILT: Tue Jun 1 06:55:37 CDT 2021 Manual page lvmthin(7) If the repair works, the thin pool LV and its thin LVs can be activated. User should manually check if repaired thin pool kernel metadata has all data for all lvm2 known LVs by individual activation of every thin LV. When all works, user should continue with fsck of all filesystems present on these volumes. Once the thin pool is considered fully functional user may remove ThinPoolLV_metaN (the LV containing the damaged thin pool metadata) for possible space reuse. For a better performance it may be useful to pvmove the new repaired metadata LV (written to previous pmspare volume) to a faster PV, e.g. SSD. If the repair operation fails, the thin pool LV and its thin LVs are not accessible and it may be necessary to restore their content from a backup. In such case the content of unmodified original damaged ThinPoolLV_metaN volume can be used by your support for more advanced recovery methods.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (lvm2 bug fix and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2021:4431