Expanding the Disk on FileWave VM - centOS 7.x

This article provides steps for extending the root partition residing in a logical volume created with Logical Volume Manager (LVM) in a virtual machine running CentOS.

This has been tested on FileWave Server version 14.7.2 and CentOS Linux release 7.9 (Core).
Resources: https://kb.vmware.com/s/article/1006371

Step-by-step guide


Caution: Take a complete backup/snapshot of the VM prior to making these changes.


sda3 is the new Partition.

centos is the physical volume.

root is the logical volume.


1. Edit the virtual machine settings and extend the virtual disk size. This varies for each VM but can be configured in the VM settings for most environments.


2. Identify the device name, which is by default /dev/sda, and confirm the new size by running the command as root:

fdisk -l
3. Create a new primary partition:
  • Run the command as root:
    fdisk /dev/sda
  • Press p to print the partition table to identify the number of partitions. By default, there are 2: sda1 and sda2.
  • Press n to create a new primary partition.
  • Press p for primary.
  • Press 3 for the partition number, depending on the output of the partition table print.
  • Press Enter two times.
  • Press t to change the system's partition ID.
  • Press 3 to select the newly created partition.
  • Type 8e to change the Hex Code of the partition for Linux LVM.
  • Press w to write the changes to the partition table.

4. Restart the virtual machine.

After the machine is started login to the VM as root and run this command to verify that the changes were saved to the partition table and that the new partition has an 8e type:

fdisk -l

5. Run this command to convert the new partition to a physical volume:

pvcreate /dev/sda3


6. Run this command to extend the physical volume:

vgextend centos /dev/sda3

Note: To determine which volume group to extend, use the command vgdisplay.

7. Run this command to verify how many physical extents are available to the Volume Group:


vgdisplay centos | grep "Free"


8. Run the following command to extend the Logical Volume to the Maximum amount available:

lvextend -l +100%FREE /dev/centos/root

9. Run the following command to expand the ext3 filesystem online, inside of the Logical Volume:

resize2fs /dev/centos/root

If you receive an error regarding a "Bad Magic Number', you have a different file system type. Try using this command instead:

xfs_growfs /dev/centos/root

10. Run the following command to verify that the / filesystem has the new space available:

df -h /

There is no content with the specified labels