Disk usage help needed

This worked for version 16 of FreePBX, has not been tested on ver 17 yet.

How to EXPAND a Drive in Linux - FreePBX

This is similar to Windows and using Partition Wizard, but some extra steps.

FreePBX is installed as a virtual machine. It is a Linux based installation.

Linux Structure is :
“Volume Group” (which could span more than 1 drive.)
— “Logical Volume”
------- “FileSystem”

  1. Shut down FreePBX

  2. Find the VM Drive in the NAS POOL - Expand the drive to the desired size. (This is the equivalence of re-imaging and going from maybe a 30 Gig Drive to now having a 100Gig Drive)

  3. Expand the Drive Partition to access the entire space

— Note : This may be able to be done with just the VG commands from Linux, to expand the volume group by size. But I could not figure it out. This was the easiest way I got it done so far was with gParted.

Download the GParted Live-CD - http://gparted.sourceforge.net
Go to the VM and add Gparted Live CD as a CD ROM drive and set it to boot first.
Boot the VM to Gparted Live
Find the proper partition and expand it
Apply the change and shut down
Remove the CD ROM drive from the VM

  1. Boot the VM and log into the “root”

  2. Identify the Volume Group - type : vgs
    This should NOW show you have the extra drive space in the VM
    VG - VSize - VFree (The VFree space should be the difference now)

  3. Identify the Logical Volume- type : lvs
    – On FreePBX 16 it looks like /dev/SangomaVG/root

  4. Extend the Logical Volume- type : lvextend -l +100%FREE /dev/SangomaVG/root

  5. Extend the filesystem- type : xfs_growfs /dev/SangomaVG/root

  6. Verify the size of your extended partition.- type : df -h
    You will see the “available” space, and the “used” space.

  7. Done, Exit the root.

Reference Links :

How to resize a logical volume with 5 simple LVM commands