pfSense Freebsd Increase Disk Partition Size
Jake G October 30, 2022 #pfSense #SysAdmin #Partitions #Filesystem #FreeBSDI recently increased the size of a disk for a pfSense proxmox VM, this outlines how.
Increasing the disk size in promox is simple
- Select the VM
- click Hardware
- click on the disk you want to increase
- click disk action
- select resize
- enter the amount of GiB you want to increase the disk size by.
To make use of the newly allocated space in the pfsense/freebsd VM here are the steps:
Disable and Delete Existing Swap Partition
Find the existing swap entry in /etc/fstab
, then turn the swap off and delete the partition.
In this example my disks are identified by gptid, but the procedure is the same if it is by label.
Find the correct swap partition and delete it. vtbd0 is the disk name and 3 is the partition index.
=> 40 )
)
)
)
)
Resize root partition
My disk was 16gb in size and I increased it to 32gb. I will allocate 31gb to the root file system and leave the remaining 1gb for the swap.
-i 2 (index partition 2) -a 4k (block size) -s 31G (size) vtbd0 (device)
Recreate Swap
This command will add a swap partition with a 4k block size to the vtbd0 disk device.
Now enable the swap, first identify the gptid of the swap, I use glabel list
and find the gptid
with the correct size (my new swap)
Now correct /etc/fstab
to remove the old swap entry and enter the new swap entry.
After a reboot you should see the proper root file system and swap size in pfsense.