LVM metadata

From PrgmrWiki

In lvm the number of lvs that can be created is limited by the amount of available metadata set when the pv is initialized with pvcreate. With the default 192k for the --metadatasize option of pvcreate one metadata area per pv the metadata was full with about 120 lvs. When it was mostly full each additional lv using -m 1 lvm mirrors took 1.5k of metadata, so there is some overhead also. The amount of free metadata can be viewed with the -o +pv_mda_free option to pvs. With pvcreate --metadatasize 2048k --metadatacopies 2, 3389 lvs were able to be created before hitting the "metadata too large for circular buffer" error. In this case each lv seems to take much less metadata, at least due to using a mirrored pv with md raid instead of lvm mirrors.