# Logical Volume Management
- Note of Caution: not the said as a RAID array, instead it is JBOD (just a bunch of disks)
- Extends logical volume over multiple disks/partitions
- No redundancy
- `lsblk | grep -v loop` to list block devices and ignore lines with “loop” in them, which may be associated with, for example, snap in Ubuntu
- `blkid | grep -v loop` to list UUIDs for partitions and ignore lines with “loop” in them, which may be associated with, for example, snap in Ubuntu
- Sequence of Steps
- Assign physical volumes (PVs)
- `pvcreate /dev/drive1 /dev/drive2 /dev/drive3`
- `pvdisplay` to display physical volumes
- can be drives, partitions, or RAID arrays
- `pvscan` to identity pv issues
- `pvck` to check integrity of pv
- Create volume group (VG) from PVs
- `vgcreate [vg_name] /dev/drive1 /dev/drive`
- `vgdisplay` to display volume groups
- `vgextend [vg_name] /dev/drive3` to add physical volume to volume group
- no protection, no speed increase, JBOD
- `vgscan` to recover from volume group issues
- `pvck` to check integrity of pv
- Create logical volume (LV)
- `lvcreate -L 25G -n [lv_name] [vg_name]` to create LV that’s 25GB in size
- `lvdisplay` to display logical volumes and associated info
- `lvextend -L +5G /dev/[vg_name]/[lv_name]` to increase size of LV by 5GB
- `lvextend -L +5G -r /dev/[vg_name]/[lv_name]` to increase size of LV by 5GB and extend FS (recursive flag)
- `lvchange -an dev/[vg_name]/[lv_name]` to make lv_name unavailable
- `lvchange -au dev/[vg_name]/[lv_name]` to make lv_name available
- other `lvchange` commands are available
- `lvscan` to recover from volume group issues