This script expands ZFS pool after increasing the size of a virtual disk.
When running FreeNAS as a virtual machine with virtual disks when you run out of space, you can increase the size of the virtual disks and then run this script in the FreeNAS shell to expand the associated ZFS pool.
-
In VMware ESXi, increase the virtual disk size. It can be done while the FreeNAS vm is running.
-
Go the the FreeNAS shell and run:
vdisk-expand.sh /dev/da1
-
Power off the FreeNAS vm because VirtualBox does not support online modification of virtual disks.
-
Increase the virtual disk size to 16 GB with VBoxManage.
VBoxManage modifyhd freenas-disk1.vdi --resize 16384
-
Power on the FreeNAS virtual machine.
-
Go the the FreeNAS shell and run:
vdisk-expand.sh /dev/ada1
This script is compatible with FreeNAS 11.1 and 11.2