Opnsense Expand Disk

Mindwatering Incorporated

Author: Tripp W Black

Created: 12/09 at 05:59 PM

 

Category:
Linux
Other

Task:
Disk has slowly increased and exceeding our desired percentage. Expand VM disk from 20 GB to 30 GB.


IMPORTANT:
- Confirm you have a good backup of the VM before proceeding.
- Confirm you have a COLD snapshot with the VM off before proceeding.
- Boot the VM and then follow the instructions below -- update the disk name and partition number to your environment.


1. Increase VM Settings:
vSphere --> VM --> Edit Settings --> Disk --> Size increase from 20 to 30 GB.

2. Increase Partition and File-System Size:
a. Login:
vSphere --> VM --> Remote Console
--> Login
(root and password)

b. Grow the partition:
# gpart show
<read output>
- Confirm disk size is now 30 GB and note it's name (e.g. da0). Then confirm the partition is still 20 GB and note the partition number (e.g. 3)

# gpart resize -i 3 da0
<read output - e.g. da0p3 resized>

# gpart show
<read output>
- Confirm that the total disk size (first line) matches the partition size now (e.g. both are 30 GB)

c. Grow the file-system:
# df -h
<read output>
- Note the dev path for the 3rd partition - e.g. /dev/gpt/rootfs>

# growfs /dev/gpt/rootfs
--> confirm by typing yes

# df -h
<read output>
- Verify the size of the partition is now 30G.



previous page