Following this tutorial assumes that you have followed along with the other two parts in this series. However, if you already have some familiarity with Linux you should be able to follow along.
Working with logical volumes (part 1)
Working with logical volumes (part 2)
Add a disk to the volume group
One of the great things about lvm is that you can add and remove physical volumes on the fly without data loss and without interrupting services.
If you haven’t already done so, add a new hard disk to your virtual machine. I created an additional 10 GB disk but you can make the disk any size you want. It doesn’t have to match the previous disk that we created.
Continue reading “Working with logical Volumes (part 3)”
In this post I want to cover one of the most commonly used features of lvm, extending a logical volume. If you were following along with the last post, “Working with logical volumes part 1”, then you should already have a volume group with a couple of live volumes attached.
With lvm you can quickly and easily extend a Linux file system on the fly without interrupting any services.
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
Continue reading “Working with logical volumes (part 1)”