Working With Vgextend Linux Command


Working with Logical Volume Management (LVM) in Linux offers the customers the versatility to create and paintings with walls. You can simply create, alter, resize, and delete quite a lot of garage volumes.

You can simply resize a quantity workforce by way of extending it with a bodily quantity the usage of the vgextend command. The command is understated, and also you most effective wish to upload the bodily quantity as an issue when the usage of the vgextend command.

If you haven’t labored with quantity teams or are in search of a protected manner of extending your quantity workforce, we will be able to duvet a realistic instance on this information. Let’s get began.

What Is LVM?

LVM is a Linux machine chargeable for managing report techniques and logical volumes in a Linux machine. Although there are different quantity control gear in Linux, the usage of LVM is really useful for its complex options. As we will be able to see on this information, there may be such a lot that you’ll be able to reach the usage of this command line instrument.

To higher know how to make use of the vgextend command, we will be able to create two bodily volumes and a quantity workforce. Once finished, we will be able to use the vgextend so as to add one bodily quantity to the quantity workforce of the opposite bodily quantity.

Creating Physical Volumes

Start by way of checking if any bodily volumes are already created the usage of the next command:

We recently don’t have any bodily quantity. We want a block software to initialize the bodily quantity. We can checklist the block units the usage of the next command:

Since we wish to create two bodily volumes, we will be able to use the /dev/sda1 and /dev/sdb1. But prior to that, we will have to unmount the block units.

To unmount a block software, use the next instructions and exchange the block software to compare your case:

$ sudo umount /dev/sda1

$ sudo umount /dev/sdb1

With our block units unmounted, we will be able to continue to make use of the pvcreate command to initialize the bodily volumes.

To create two bodily volumes, the next command can be:

$ sudo pvcreate /dev/sda1

$ sudo pvcreate /dev/sdb1

We effectively created our bodily volumes and will verify by way of the usage of the pvs command.

Creating Volume Groups

We want a bodily quantity to create a quantity workforce. Let’s get started by way of verifying that we haven’t any quantity workforce in both of the bodily volumes the usage of the next command:

We can now continue to create a quantity workforce for one of the crucial bodily volumes, which we will be able to lengthen its dimension by way of including the opposite bodily quantity to it. So, to create a quantity workforce for /dev/sdb1, the next command can be:

$ sudo vgcreate volgroup1 /dev/sdb1

We named our quantity workforce volgroup. We can test it the usage of the vgs command.

To get extra information about the created quantity workforce, use the next command:

What we wish to center of attention on is the Free PE dimension for the quantity workforce. We recently have 1919 Free PE. To lengthen this dimension, we will be able to use the vgextend command and upload the title of our different bodily quantity, /dev/sda1, as an issue.

The following command could be:

$ vgextend volgroup1 /dev/sda1

You must get a good fortune message like the only within the earlier representation confirming that the quantity workforce is effectively prolonged. We can test the brand new dimension as proven within the following:

Bingo! You can word our new unfastened PE dimension prolonged from 1919 to 2046. That’s how you’ll be able to simply use the vgextend Linux command to make bigger the scale of your quantity teams by way of including a bodily quantity.


Working with LVM means that you can create walls and logical volumes and lengthen them every time wanted. Various Linux instructions come in useful when operating with LVM. In this information, we mentioned lots of the instructions for developing bodily volumes and quantity teams. Our primary center of attention is extending the scale of quantity teams the usage of the vgextend command. You now know how to make use of the vgextend command in Linux.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More