It is that time once again where I feel the need to redo my home infrastructure.
The current main server is (and always has been) overkill in terms of performance and power consumption. It is a now 6-year-old 8700k in a high-end motherboard using something like 100W just idling. It does have all the connectivity I could ever want in terms of SATA, NVMe, amount of memory and networking built in, but I think I have an alternative that will serve me just as well, if not better, but at a fraction of the power consumption.
My idea is to replace the old server with a Mac mini (2024) that will also serve as my desktop. That machine will sip power at an idle power consumption of around 4W. Coincidentally, it will also have somewhere between 2 and 10x the performance, even if that will remain mostly untouched by my use-case. The one real downgrade over the old system is the lack of 10gig networking in the base-model, but I have a thunderbolt to SFP+ adapter under my desk, which will make up for that downside.
I will also only have 16GB of memory, limiting the amount of virtualization I can do. This was a fairly big focus in the old system, but has fallen into disuse in the last months and years, replaced by containers with a much smaller memory footprint. Therefore, I think 16GB will be plenty.
Of course, it's running macOS and not a Linux distro optimized for NAS operation, so I'll have to see how well ZFS works, as I would still like my data to be protected by a redundant filesystem. The macOS implementation of ZFS is OpenZFSonOSX, for which there is a nice UI with some common functionality and info. Currently, you need to disable sip, but luckily, that's not too hard. There is an issue to use FSKit instead of a kernel extension, but that seems to be in its infancy.
I will also need to plug in the hard drives for storage externally. For this I have bought a USB-C jbod with 4 3.5" and 4 NVMe spaces. This will house the existing 3x 8TB HDDs and 2x 4TB NVMe drives. It does "only" have 10gbit USB 3.2 Gen 2, but that should be fast enough, especially considering that that's the same speed I am currently connected to the NAS at.
The hard drives and SSDs will remain in two separate ZFS pools - one for bulk data, like backups and one for faster storage, like for containers or games, the less demanding of which will likely run just fine, although many only through emulation tools like Whisky.
The networking setup will remain the same, with a DrayTek Vigor modem supplying internet into a mikrotik 2x10gig+16 1gig PoE switch. The networking to my desk will remain a 20m glass fiber cable running through my apartment.
Before ordering the new Mac, I wanted to make sure the software stack would work, so I used an old Mac mini I had lying around to test it all out. When the jbod came in the mai, I immediately grabbed a spare NVMe drive and tried to make a new ZFS pool on it, only to be greeted with cannot create 'test': I/O error
and seemingly no way of finding out what caused that. Not to worry, the old server was still running and very able to create a ZFS pool, which I could then import successfully on the Mac mini.
The first service was quickly up and running: The dendrite matrix server running in docker-compose. With the rest following quickly and without any issues.
Especially, Vaultwarden and Gitea moving over without any issue surprised me. I literally just copied the files, configured the reverse proxy, and they immediately worked. So the downtime was measured in minutes, without any additional effort spent to minimize it. The total memory consumption is about 600MB, which will have no problem fitting in the 16GB on the M4 base model.
When the M4 mini arrived, the first thing I did was to copy over the configuration from the old one. I intentionally did not copy most of the data or applications because the new model doesn't have a lot of storage and a different architecture (aarch64 instead of amd64). So the second step was to reinstall all needed applications. The most complicated of which was OpenZFS, which required me to disable the system integrity protection once again.
As I already saved all of the data for the Docker containers on the external ZFS volumes, migrating that was a breeze. It basically boiled down to cd container1
, docker compose up -d
, repeat 5 times.
And with that, the migration is complete. The old server is shut off and all locally hosted services are running on the Mac mini.