Skip to content

LVM

Metadata

By default, LVM metadata is stored as two copies on each PV, one at the beginning and one at the end. The default metadata size of 1 MiB thus provides ~510 KiB (excluding checksums) of available space for the actual metadata. Most operations that change the metadata will save a backup of it under /etc/lvm/backup/<vg> so you can inspect it without reading the PV. The metadata is in a textual format, including the on-disk copy.

The size of the metadata area (MDA) can only be set at PV creation time, and the default available space of 510 KiB can hold around 1,500 LVs. If you plan to have a large number of LVs, use --metadatasize to increase the MDA size. If, unfortunately, you're running out of space in the MDA, you can add another PV with sufficient MDA size to the VG, and set --metadataignore y on the old PVs to prevent them from being used for metadata.