[linux-lvm] lvm limitations

Zdenek Kabelac zkabelac at redhat.com
Sun Aug 30 17:33:06 UTC 2020


Dne 30. 08. 20 v 1:25 Tomas Dalebjörk napsal(a):
> hi
> 
> I am trying to find out what limitations exists in LVM2
> 
> nr of logical volumes allowed to be created per volume group
> 

Hi

There is no 'strict' maximum in term of we would limit to i.e. 10000LV per VG.

It's rather limitation from overall practical usability and the space you
may need to allocate to store the metadata  (pv/vgcreate --metadatasize)

The bigger the metadata gets with more LVs - the slower the performance of 
processing gets (as there is rather slow code doing all sorts of validation).
You need much bigger metadata areas during 'pv/vgcreate' to be prepared AHEAD
of time (since lvm2 does not support expansion of metadata space).

For illustration  for 12.000 LVs you need ~4MiB just store Ascii metadata 
itself, and you need metadata space for keeping at least 2 of them.

Handling of operations like  'vgremove' with so many LVs requires 
signification amount of your CPU time.

Basically to stay within bounds - unless you have very good reasons
you should probably stay in range of low thousands to keep lvm2 performing
reasonably well.

If there would be some big reason to support 'more' - it's doable - but 
currently it's deep-down on the TODO list ;)

Zdenek




More information about the linux-lvm mailing list