When it comes to creating volume groups from multiple hard disk drives, Volume Group (VG) is the key to that process. VG is the architecture that allows you to combine multiple physical volumes to create a single storage structure, that is equal to the storage capacity of the combined physical devices. The physical volume devices are initialized using LVM. For example, if you take two physical 1GB hard drive disks and combine them to create a volume, you’ll end up with 2GB storage capacity, representing the two disks. To get started with creating logical volumes on Ubuntu, follow the steps below:

Install LVM2 Package

To create logical volume groups by combining multiple disks, you must first install the LVM2 package. By default, it doesn’t come installed in Ubuntu. To install, run the commands below: That should install the LVM2 package on Ubuntu

Create a Logical Volume Group

Now that you’ve installed the LVM2 package, continue below to create your first logical volume group. First list the physical drives on the machine. You can do that by running the commands below: The command above will list all the disks available on the system. A similar screen below should appear on your console. For this tutorial, we’re going to be combing /dev/sdb and /dev/sdc and we’re going to call our logical volume group LVMSDBSDCBlk using the vgcreate command. To do that, run the commands below: After running the commands above, you should get a success message similar to the one below: After creating the volume group, you can list it using the command below: It should then list the newly created volume group similar to the one below: That’s it! Conclusion: You have learned how to create a logical volume group on Ubuntu using the LVM2 command. To create logical volumes, you’ll need to use the lvcreate command. We’ll explore how to create new volumes from the group we created above using the lvcreate command. Until then, enjoy! You may also like the post below: