A cheap VPS or an SD card lack the storage capacity for running a usable
cwfs(4) setup with a big WORM partition and daily dumps.
The go-to solution is the
hjfs(4) file system, which doesn’t
use a dedicated WORM partition and doesn’t do daily dumps by default.
However, it has several performance problems and is not as well tested.
cwfs file system can be configured in lots of ways beyond the
default cache-worm + other configuration supported by the 9front
The desired configuration we’re going to cover is a single
file server tree backed by a simple disk file system - the same type
used by the
other tree in the default setup.
To do this we’re going to partition the disk appropriately and override
mountcwfs stage of the 9front installer with a replacement
script that will configure
appropriately. The rest of the installation and most of the
subsequent system operation remain unaffected.
Start by booting from the installation media. Configure networking
ip/ipconfig(8) and fetch the replacement
or put the script on a flash drive:
webfs ramfs hget http://a-b.xyz/23/666a >/tmp/mountcwfs chmod +x /tmp/mountcwfs
mountcwfs stage using
bind /tmp/mountcwfs /bin/inst/mountcwfs
inst/start and complete the stages up to
preppart as you would
preppart, delete the default partitions and create one
fsmain with a desired size:
d other d fscache d fsworm a fsmain 123456 .+100% w q
Make sure to “ream” the new partition at the next step.
Complete the rest of the installation, reboot. That is all.