Data recovery -- thin provisioned LVM metadata (?) problem after hardware failure

Ming Hung Tsai <[email protected]> Mon, 22 May 2023 15:40:50 +0800
Newsgroups dev.linux.lists.lvm-devel
Message-ID <CALjSBEsSC4X7aeZuNRuTjhY9OZ6d_z=PymBycQ+sBh0ftzmrGQ@mail.gmail.com>
Hi,

There's a debug option `-v` for thin_dump/thin_repair to show verbose logs
including repairing details. In your case, you should see one compatible
root pair found in your metadata:

```
compatible roots (1):
(1150, 7643)
```

Once you had thin_repair'ed the metadata, you could swap the repaired one
into the pool by using lvconvert:

`lvconvert qubes_dom0/pool00 --swapmetadata --poolmetadata qubes_dom0/newlv`

The two volumes "pool00_tmeta" and "newlv" then will have their names
swapped, i.e., "newlv" becomes "pool00_tmeta" and the original
"pool00_tmeta" becomes "newlv", so you have the backup.


On Mon, May 22, 2023 at 2:57?PM haaber <[email protected]> wrote:

> Hi Ming
>
> thank you so much. I compiled it, and did make install, but lvconvert is
> still the old one. It should be possible to do the job with   pdata_tools
> directly, right !?  I had formerly created a
> "newlv" inside my qubes_dom0 pool, so I did   run
>
> ./pdata_tools  thin_repair -i /dev/qubes_dom0/pool00_tmeta   -o
> /dev/qubes_dom0/newlv
>
> that command worked 5 seconds, and came back without any notice, which
> usually is good sign. I did not run it with a verbose flag, stupid me.
>
> Can I now run some command that activates the pool with "newlv" as
> metadata ? Or backup the old metadata file, and then copy "newlv" metadata
> into the pool00_tmeta ? I am, of course,  afraid of destroying it all, so
> close to  the end, so I better ask once more  :-)
>
> best, Bernhard
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20230522/3f4a66ed/attachment.htm>