The Linux Volume Manager (LVM) is something of an optional master control panel for Linux storage devices. It can combine several devices into one, allows arbitrary storage grouping far more granular than simple partitions, and provides functionality such as data snapshots and reorganization. It's very powerful, and in the right hands greatly improves potential server uptime.
It is also the first layer above the raw storage device in our stack. We start with LVM instead of DRBD, because DRBD at the device level is extremely messy. What do we gain by insulating DRBD from the raw storage device?
- We can easily add storage to the LVM device group assigned to DRBD
- DRBD can be resized while in an online state
- We can perform storage migrations without taking PostgreSQL offline
None of this is possible unless LVM is the first layer. For a high-availability server, this...