LVM2 Labels And UUID-s
Originally written by
- In order to identify that a physical device is managed by LVM, an LVM2
label is written on one of its first 4 sectors.
- This label is used, during LVM scans, to find its devices.
- In order to identify physical volumes belonging to volume groups, a UUID
is assigned to each of them, and stored on them.
- The UUID of a physical device is stored as part of the volume-group
meta-data area on the device: at the start (beginning with 5th sector),
at the end, or on both sides (for redundancy).
- By default, the UUID is generated randomally.
- We can force a specific UUID when marking a physical volume, in case we
are intending to load an LVM setup from backup.