Shrink UFS and ZFS to their bare minimum

Started by verfluchten, May 15, 2025, 04:40:07 PM

Previous topic - Next topic
By default, OS installs to full disk, which is sub-optimal.
Is there a way to do the opposite of https://forum.opnsense.org/index.php?topic=19250.0 and shrink all of the partitions to their bare minimum?

I have this currently and no faintest idea how to shrink it:


2% / [zfs] (1.1G/64G)
0% /var/log [zfs] (1.8M/63G)
0% /zroot [zfs] (88K/63G)
0% /tmp [tmpfs] (408K/10G)
0% /var/crash [zfs] (88K/63G)
0% /usr/home [zfs] (88K/63G)
0% /var/audit [zfs] (88K/63G)
0% /usr/ports [zfs] (104M/63G)
0% /var/mail [zfs] (112K/63G)
0% /var/tmp [zfs] (88K/63G)
0% /usr/src [zfs] (88K/63G)
0% /tmp [tmpfs] (408K/10G)

What should the procedure be?

Most filesystems support growing at best, I know that ZFS does not support shrinking.

You could backup your configuration, reinstall using advanced options and partition to your own liking.

Restore your configuration afterwards and you should be set.
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

You can actually grab/restore the full content of the /conf directory if you use the importer during install.
This said, configuration for other plugins is another matter... I just moved from virtualized to bare metal.