The LVM is something of an optional master control panel for Linux storage devices. It can combine several devices into one, allows arbitrary storage grouping, which is 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. So, what do we gain by insulating DRBD from the raw storage device? Take a look at the following:
- 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...