Arch Linux Tutorial – Configure LVM on Arch Linux 2017

how to configure lvm on arch linux

Arch Linux Tutorial – On this tutorial, we will show you how to configure LVM on Arch Linux 2017. LVM stands for Logical Volume Manager that utilize device-mapper feature to provide a system partitions independent of underlying disk layout. There are many benefits of using LVM on Arch Linux and also other Linux system. We can add any number of disks as one big disk. Source.

how to configure lvm on arch linux
Figure 1. LVM Layout illustration

We will show you how to create new physical volume, volume group and also logical volume. There are few steps to configure LVM on Arch Linux. To complete the steps to configure LVM on Arch Linux, we will learn the following:

  • Create new Physical Volume (PV)
  • Create new Volume Group (VG)
  • Create new Logical Volume (LV)

On this tutorial, we have three disks connected to our Arch Linux. The following are output from fdisk command. We have three physical disks attached on the system.

As you can see, we have three disks (vda, vdb and vdc). The vda is used by Arch filesystem and now we will create a LVM layout using vdb and vdc.

Step 1. Create new Physical Volume

As a part of configure LVM on Arch Linux, we need to create physical volume. The following command will create a new physical volume on /dev/vdb. Change /dev/vdb with your disk.

Repeat the steps to the rest disks.

Now we can check our new physical volume. Use pvdisplay command as follow:

Step 2. Create new Volume Group (VG)

After we create new physical volumes, we need to create new volume group with the physical volumes we have. For example, we will create new VG called archVG.

Now display the volume group with vgdisplay command.

Now we have new VG called archVG with size of around 30 GB (consist of 20 GB and 10 GB physical volumes).

Step 3. Logical Volume

After we have Volume Group, we can create new Logical Volume (LV) inside our Volume Group. This LV, can then be formatted and mounted for further use.

Example, Create 5 GB Logical Volume called archLV01 on archVG:

We can create multiple LVs on a single VG with the similar command/syntax as above.

Display Logical Volumes

Display the disk layout

Now we can see our new disk layout with lsblk command

Format the new volume

Now we can format our new logical volumes.

Now mount it

So now we have completed configure LVM on Arch Linux 2017. In the future, I will show you how to extend existing Volume Group and Logical Volume. Stay tuned on this blog.

Be the first to comment

Leave a Reply

Your email address will not be published.


*