Re: LVM Thin - bad checksum in superblock - cannot perform operations on metadata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Could you try using thin_repair v0.9.0 please? The metadata could be
repaired if only the superblock was affected.

1. Check the pool configurations (transaction id, chunk size, pool size, etc.)

# lvs -o lv_name,transaction_id,chunk_size,size --units k

Taking the following output as an example, the tid is 13, and there
are 519936 data blocks (33275904/64).
```
  LV           TransId Chunk  LSize
  tp1               13 64.00k 33275904.00k
```

2. Create a blank LV for restoration. Here I use 16192 MB to keep
backward compatibility.

# lvcreate data1 --size 16192m --name tmeta_bak

3. Activate the metadata in read-only mode

# lvchange data1/thin_tmeta -ay -y

4. Repair the metadata, in which the tid, bs, and nr_blocks are values
from the first step.

# thin_repair -i /dev/mapper/data1-thin_meta -o
/dev/mapper/data1-tmeta_bak --transaction-id <tid> --data-block-size
<bs> --nr-data-blocks <nr_blocks>

5. Verify the repaired metadata

# thin_dump /dev/mapper/data1-tmeta_bak --skip-mappings
(10 devices should be listed if thin_repair runs successfully)

6. Swap the pool metadata with the repaired one

# lvchange -an data1/thin_meta
# lvconvert data1/thin --swapmetadata --poolmetadata data1/tmeta_bak

Step 2-6 above could be substituted by a single lvconvert command
below, but I would prefer doing these step-by-step.

# lvconvert --repair data1/thin --config
'global/thin_repair_options=["--transaction_id", "<tid>",
"--data-block-size", "<bs>", "--nr-data-blocks", "<nr_blocks>"]'


Ming-Hung Tsai

On Tue, Nov 23, 2021 at 3:33 PM pavel olenev <pavel.olenev@xxxxxxxxx> wrote:
>
> Hello.
> I am looking for advice on how to act in such a situation. Perhaps anyone has gone through something similar?
> We used lvm thin provisioning on one of our arrays. But after raid controller failure we got problem with activation of all thin volumes:
>
> # lvchange -a y data/thin
>   Check of pool data/thin failed (status:1). Manual repair required!
>
> I tried to use lvconvert --repair data/thin, but have this:
>
> # lvconvert --repair data/thin
> truncating metadata device to 4161600 4k blocks
> bad checksum in superblock, wanted 1494954599
>   Repair of thin metadata volume of thin pool data/thin failed (status:1). Manual repair required!

_______________________________________________
linux-lvm mailing list
linux-lvm@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/




[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux