Part one of working with logical volumes will cover the basic’s involved in creating logical volumes.
For those of you who just want the order of the commands.
sudo pvcreate </path/to/device> sudo vgcreate <vgname> </path/to/device> sudo lvcreate -n <lvname> -L <size> <vgname> sudo mkfs.<filesystem> </path/to/lv>
What you need to follow this guide
- A free disk (I used an empty virtual machine disk)
- Any Linux distribution (In this example I’ll be using Fedora 26, but the commands are the same across the entire Linux spectrum)
- LVM packages (lvm2 – usually pre-installed)
What is LVM?
Logical Volume Management (LVM) offers a way to abstract a disk, multiple disks, or disk partitions into one logical volume. LVM filesystems can be rearranged, resized, moved, removed, created, and deleted on the fly. They offer incredible flexibility when setting up a new system or when rethinking the storage layout of an existing system.
Logical Volume Management filesystems are made up of 4 major parts