Deep diving into Logical Volume Manager
Despite basic differences between Btrfs and LVM, they have a lot in common:
- They focus on protecting against filesystem corruption
- They support single - or multiple-device setup
- They can create quick snapshots
- Several tools exist to help manage them in graphic or command - line form
LVM sits on a layer before the filesystem, so it supports any filesystem. LVM converts any device or partition into a physical device (pv
) that is dynamically manageable. Physical devices get placed in volume groups (vg
), enabling the creation of logical volumes (lv
).
This is how an LVM structure gets created sequentially:
- It creates physical devices with the available devices, using the
pvcreate [device1] [device2] ...
command. - It joins the physical devices, creating the volume group, using the
vgcreate [vg_name] [pv1] [pv2] ...
command. - It creates the logical volume with the
lvcreate
command.
To remove each layer...