I think there is an easier way to do this. I have a OPNsense router on a ESXi VM and needed to expand the disk. First, I powered off the system and added space, for me, I added 4 GB
Powered it back on entered the following commands:
# zpool set autoexpand=yes zroot
# gpart resize -i 4 da0
I didn't need to do anything with the swap file because it there was free
Powered it back on entered the following commands:
# zpool set autoexpand=yes zroot
# gpart resize -i 4 da0
I didn't need to do anything with the swap file because it there was free
"