After starting with a fresh DVD installation of OPNsense, I noticed that the default partition setup is quite annoying to work with. See attached swap partition for details.
Out of 10 GB hard drive space, 8 GB is automatically allocated for swap and placed in front of the main ZFS partition while only 2 GB is allocated for it. Thus, I can't update my firmware without allocating more hard space to ZFS partition, which I can't unless I move the swap partition down and shrink it.
While I figure out how to remove the swap partition, I can't figure out how to move ZFS partition up.
You can only grow the partition if you add space at the end. 10 G is way too small for OPNsense unless you run the NanoBSD version. 40 G is recommended. You will have to save the config and reinstall with the NanoBSD installer.
See https://docs.opnsense.org/manual/hardware.html
Is this a VM? Use UFS install to disable swap. I think ZFS expects disk sizes that are relevant in the 21st century.
Or alternatively increase disk size to 16G and:
# touch /.probe.for.growfs
# opnsense-shell reboot
At least now your ZFS and swap are the same size. ;)
Besides the ZFS partition is at the end for exactly this reason...
Cheers,
Franco
@Ice_Drake1 if this is a hardware device and you insist on running with e.g. 2 G swap and 8 G ZFS, I can outline some command line magic for you to achieve the desired result.
Looking at the screenshot it's very likely a VM and the minimal-disk-space MO fits perfectly too :D
Also an indicator: 10 GB USB or CF card with ZFS?
Cheers,
Franco
It is a VM. I ran it on top of Proxmox VE. I can reserve a bit more memory and space, but I think I can live with 2 GB of memory, 4 GB of ZFS, and 6 GB of swap. I didn't check the hard drive requirement before installing OPNsense though. How does OPNsense even use that much space? So far, I have all my necessary router settings copied over to OPNsense. Currently, I only used 900 MB of memory, 900 MB hard drive space of ZFS and 0 MB of swap.
After struggling with shifting the ZFS partition upward with commands, I eventually boot it up with Magic Partition and shift the partition that way.
@Ice_Drake1 It seems that I am exactly in the same boat as you was. Can you elaborate on how to boot it up with "Magic Partition" and shift the partition that way?