How to set up LVM

Introduction

Storage is one of those cardinal components that your server cannot do without and thus demands resolute attention no matter what. This is a brief guide on how to implement LVM on your linux server or workstation. Thank you for visiting and we hope it will be of help to assist you in your quest/project.

“Failure is the condiment that gives success its flavor.” — Truman Capote

Setting up LVM Storage

I bet you have heard or even better used LVM before. Logical volume management (LVM) technology simplifies how storage management is done. LVM virtualizes storage and proffers system administrators with a more flexible fashion of managing disk storage compared to the old paradigm of partitioning. Logical volume management works by dividing the physical volumes (PVs) into physical extents (PEs) which are thereafter mapped onto logical extents (LEs). The Logical Extents are thereafter grouped into volume groups (VGs). As you can guess, these spawned Volume Groups are combined into logical volumes (LVs) that act as the aforesaid virtual disk partitions. LVM makeS it really simple to resize and move storage volumes whenever required. Having known that, let us now dive into setting up LVM. Am going to use a flash drive but the procedure is the same for any other drive or device(hard drive etc).

Step One

List available devices and partitions using fdisk. As you can see from the output, there is a physical device labelled /dev/sdb

Step Four

Step Five

Create a logical volume with a name and size of your choice using lvcreate with some options and switches as shown below. Option -n is used to specify the name of the logical volume Option -L specifies the size. It can be in MiB for Megabytes or GiB for Gigabytes.

The power of technology can be blatantly perceived by everyone in the world today and its sway did not spare me. John is a tech enthusiast, ComputingforGeeks writer and an ardent lover of knowledge and new skills that make the world brighter. His interests lie in Storage systems, High Availability, Routing and Switching, Automation, Monitoring, Android and Arts.