<div dir="ltr">2016-02-08 16:56 GMT+08:00 Joe Thornber <<a href="mailto:thornber@redhat.com" target="_blank">thornber@redhat.com</a>>:<br>> On Fri, Feb 05, 2016 at 07:44:46PM +0800, M.H. Tsai wrote:<br>>> I also wrote some extension to thin-provisioning-tools (not yet<br>>> published. the code still need some refinement...), maybe it could<br>>> help.<br>><br>> I'd definitely like to see what you changed please.<br>><br>> - Joe<br><br>I wrote some tools to do "semi-auto" repair, called thin_ll_dump and thin_ll_restore (low-level dump & restore), that can find orphan nodes and reconstruct the metadata using orphan nodes. It could cope the cases that the top-level data mapping tree or some higher-level nodes were broken, to complement the repairing feature of thin_repair.<br><br>Although that users are required to have knowledge about dm-thin metadata before using these tools (you need to specify which orphan node to use), I think that these tools are useful for system administrators. Most thin-pool corruption cases I experienced (caused by power lost, broken disks, RAID corruption, etc.) cannot be handled by the current thin-provisioning-tools --  thin_repair is fully automatic, but it just skips broken nodes. However, those missing mappings could be found in orphan nodes.<br><br>Also, I wrote another tool called thin_scan, to show the entire metadata layout and scan broken nodes. (which is an enhanced version of thin_show_block in branch low_level_examine_metadata -- I didn't notice that before... maybe the name thin_show_block sounds more clear?)<br><br>What do you think about these features? Are they worth to be merged to the upstream?<div><div><div><br><br>Thanks,<br>Ming-Hung Tsai<br></div></div></div></div>