How can I expand the size of my LVM partition?
Finally we want to change the type to LVM (8E) You will now need to reboot. After the reboot we use the pvresize command to fill out the extra space. As fair as I can tell, this resizes the amount of space that a LVM volume group can use on a partition and needs to be run if you resize its partition.
How to tell LVM to extend logical volume?
Tell LVM to extend the logical volume to use all of the new partition size: sudo lvextend -l +100%FREE /dev/COMPbase-vg/root – Using the LV Path from above That’s it! Now, when you run sudo fdisk -l, it will show the LVM is using all of the space of the physical disk!
How much space is allocated to the LVM?
So in this case, the Physical disk is 32 GB, but only 8 GB are currently allocated to the LVM and no other partitions are using the rest of the space for anything else. So we can extend it!
How to decrease the size of a Linux LVM?
How to Decrease the size of a Linux LVM – In this article the file system is shrunk followed by the LVM, allowing you to reclaim space in the volume group. Update 18/04/2015: I have created a video guide of this post in CentOS 7 shown below.
How can I tell if my partition is Linux or LVM?
As this method focuses on working with LVM, we will first confirm that our partition type is actually Linux LVM by running the below command. As you can see in the above image /dev/sda5 is listed as “Linux LVM” and it has the ID of 8e. The 8e hex code shows that it is a Linux LVM, while 83 shows a Linux native partition.
How to fill up the remaining drive space?
We want to delete partition 2 and re-add it again so we can fill up the remaining space. Press d and then select partition 2. Now we will re-create the partition. Set the partition number to 2, for the starting cylinder, set to whatever was the starting cylinder before. The default should be set as this anyway.