7

I was wondering how I can extend Metadata size in a lvm thin provisioning (on latest Kernel / LVM2).

[root@srv ~]# lvs -a
LV                VG        Attr       LSize   Pool Origin Data%  Meta%  
lv1               volgroup1 twi-aotz-- 125.00g             25.80   23.32
[lv1_tdata]       volgroup1 Twi-ao---- 125.00g
[lv1_tmeta]       volgroup1 ewi-ao----  96.00m
lvol0             volgroup1 -wi-a-----  96.00m
[lvol1_pmspare]   volgroup1 ewi-------  96.00m

I have few questions:

  1. In above 'lvs' command 23.32% is Meta%, this means 23.32% of 96M is used for META (or of total 125G) ?
  2. lvol1_pmspare is a spare copy of meta. Should i need to extend lvol1_pmspare separately to extend lv1_tmeta.
  3. Any performance impact by changing thin_pool_chunk_size or setting poolmetadatasize to higher value.
  4. How to identify ideal metadata size.

Can someone please share your insight and help me on how to extend metadata size.

2 Answers 2

6

I am answering to my question to document the knowledge in public.

You can use lvs -a to view details of metadata and pmspare as in question.

To extend metadata:

lvextend -L+128M volgroup1/lv1_tmeta

You will see lvol1_pmspare (metadata spare) remains original size even after above command is successful. "lvconvert --repair" process will re-create the spare metadata LV. ( Or you can also remove lvol1_pmspare and re-create using lvconvert --repair)

Metadata size can be somewhere between 2M to 16G. An ideal value always depends on the total volume and type of operations.

5

This will do the trick without any --repair.

lvextend --poolmetadatasize +2G vg0/lv0

1
  • The correct command is lvextend --poolmetadatasize +2G volgroup1/lv1 as the thin volume in the question above is lv1 (see the t attribute). Actually, the questioner/Jay has no thin LVM created (see empty Pool column). Mar 20, 2019 at 19:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .