Re: LVM cachepool inconsistency after power event

Zdenek Kabelac <[email protected]>
Newsgroups gmane.linux.lvm.general
Message-ID <[email protected]>
Dne 05. 10. 21 v 13:34 Krzysztof Chojnowski napsal(a):
> On Tue, Oct 5, 2021 at 06:35 AM Ming-Hung Tsai <[email protected]> wrote:
>> Could you help run cache_check independently, to see the error messages? Thanks.
>>
>> # sudo lvchange -ay -f vg0/wdata_cachepool_cpool_cmeta
>> # sudo cache_check /dev/mapper/vg0-wdata_cachepool_cpool_cmeta
>> # sudo lvchange -an -f vg0/wdata_cachepool_cpool_cmeta
> 
> Thanks for your help, this is what I get:
> $ sudo lvchange -ay -f vg0/wdata_cachepool_cpool_cmeta
> Do you want to activate component LV in read-only mode? [y/n]: y
>    Allowing activation of component LV.
> $ sudo cache_check /dev/mapper/vg0-wdata_cachepool_cpool_cmeta
> examining superblock
> examining mapping array
>    missing mappings [1, 0]:
>      missing blocks
> examining hint array
>    missing mappings [1, 0]:
>      missing blocks
> examining discard bitset
> $ echo $?
> 1
> $ sudo lvchange -an -f vg0/wdata_cachepool_cpool_cmeta
> $ sudo lvchange -ay   vg0/tpg1-wdata
>    Check of pool vg0/wdata_cachepool_cpool failed (status:1). Manual
> repair required!

Hello Krzystof

You need to repair your cache-pool metadata.

But before continuing with advices - what is the version of kernel lvm2 & your
device-mapper-persistent-data package (aka  'cache_check -V)

Component activation allows activation of your _cmeta LV - but only in 
read-only mode - so repair must go into a new LV.

Since cache_check reported  '1' exist code (as an error) - your metadata do 
require a fix.

lvconvert --repair should be able to handle this case - although likely 
without 'smart' placement' of fixed metadata (pvmove needed after metadata fix)

You can allocated your new metadata and easily cache_repair them.


Regards

Zdenek

_______________________________________________
linux-lvm mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.