[linux-lvm] [dm-devel] fix corrupted thin pool
Zdenek Kabelac
zdenek.kabelac at gmail.com
Mon Oct 27 09:15:47 UTC 2014
Dne 26.10.2014 v 20:46 Vasiliy Tolstov napsal(a):
> 2014-10-26 2:47 GMT+04:00 Zdenek Kabelac <zkabelac at redhat.com>:
>> From the metadata something bad was going one:
>>
>> Fri Oct 24 17:03:04 2014
>>
>> transaction_id = 120 - create = "3695"
>>
>> And suddenly on Fri Oct 24 18:07:23 2014
>> pool is back on older transaction_id
>>
>> transaction_id = 114
>>
>>
>> Is that the time of your vgcfgrestore?
>>
>> I'm attaching those metadata which you likely should put back to get in sync
>> with your kernel metadata (assuming you have not modified those in any way)
>
>
> Hm yes, i miss that one vg created in this time, thanks. As i
> understand transaction id needs to be changed? Or something other?
> But i have error:
>
> lvchange -ay vg1/2735
> Check of thin pool vg1/tp1 failed (status:1). Manual repair required
> (thin_dump --repair /dev/mapper/vg1-tp1_tmeta)!
>
If you would have latest lvm2 tools - you could have tried:
lvconvert --repair vg/pool
With older tools - you need to go in these manual step:
1. create temporary small LV
# lvcreate -an -Zn -L10 --name temp vg
2. replace pool's metadata volume with this tempLV
# lvconvert --thinpool vg/pool --poolmetadata temp
(say 'y' to swap)
3. activate & repair metadata from 'temp' volume - you will likely need
another volume where to store repaire metadata -
so create:
# lvcreate -Lat_least_as_big_as_temp --name repaired vg
# lvchage -ay vg/temp
# thin_repair -i /dev/vg/temp /dev/vg/repaired
if everything when fine - compare visualy 'transaction_id' of repaired
metadata (thin_dump /dev/vg/repaired)
4. swap deactivated repaired volume back to your thin-pool
# lvchange -an vg/repaired
# lvconvert --thinpool vg/pool --poolmetadata repaired
try to activate pool - if it doesn't work report more problems.
Zdenek
More information about the linux-lvm
mailing list