Steps to create Logical Volume on Manjaro Linux
Step 2. Create Volume Group
Step 3. Create Logical Volume
Step 1. Create Physical VolumePhysical volume can consist of many hard disks or partitions. We can add or remove disks from the physical volume. To create a new physical volume you will need one or more hard disks connected to Manjaro. Check the disk using fdisk -l or lsblk command.
pvcreate /dev/sdb /dev/sdcOutput
Verify the new Physical Volume
Step 2. Create Volume GroupNow we can create a new volume group. Volume group contains one or more physical volume. For example, we will create a new volume group called VGTest. I will add /dev/sdb to this VGTest.
vgcreate VGTest /dev/sdbOutput
In some cases we need to extend or increase the size of a volume group by adding more physical volumes. Here I will extend my previously created VGTest with /dev/sdc. We use vgextend command as follow.
vgextend VGTest /dev/sdcOutput
Step 3. Create Logical VolumeNow we can start to create a new Logical volume. For example, I want to create a logical volume with 7 GB in size. I would use the following command:
lvcreate -L 7G -n project VGTestThe command will create a new logical volume called project inside VGTest Volume Group with 7 GB in size. You can adjust the parameter to meet your own needs.
After created a new logical volume, we can then mount and format this logical volume.
Thanks for reading, please follow this blog to get more articles like this. Cheers.