hardware @ catallenya-sev

hardware @ catallenya-sev

This is a series of posts about my self-hosting experience. You are reading this post from this server!

This a lil walkthrough on my hardware selection for my self-hosted server. This server acts as my personal cloud in my journey to reduce my reliance on centralized third-party services. Peek the self-hosted tag to read more!

Notably, this is the second iteration of my initial setup, which was a smol Beelink SER5 mini PC. This fantastic tiny machine chugged along pretty well for very little upfront cost. Armed with an NVMe drive and gigabit Ethernet with Wi-Fi support, it has all the doodads needed for a self-hosting starter project.

Beelink SER5 Pro

The overarching objective of this project is to regain some data sovereignty over my data. This includes moving my photos, archives, and services to this server. My criteria for parts selection are as follows:

  • Maximize data integrity - Corrupted files are bad.
  • Portable - I should be able to take it in a car or plane when moving around.
  • Reasonable availability - We aren't competing with Google, and we don't need five nines here, but the server should be contactable while sitting unattended.
  • Minimal scalability - I don't foresee supporting additional users in the near future, and my current data needs are small.
  • Cost - I'm unemployed at this time of writing 🥲

Storage

The most substantial piece of this upgrade! We now wield a pair of Lenovo 5210 ION enterprise drives. These come with some niceties that just aren't available in consumer drivers. As far as I can tell, these are simply rebadged Micron MTFDDAK3T8QDE drives and are reasonably priced. Enterprise drives like these often come with much higher endurance ratings than consumer-spec drives, and features like power loss protection further help protect our data.

Curiously, these are manufactured in my hometown of Singapore as well. I'm happy to say I have helped contribute to the local economy now :) The move away from the previous paltry SSD we had before tackles my biggest concern from my previous build: bit rot.

Bit rot is the gradual degradation of data over time due to physical drives succumbing to entropy or the universe scrambling your bits with cosmic rays. With the previous setup, a malicious bit flip could corrupt a file on the system and silently propagate that change to my backups too. The file is now irredeemably damaged, and once the old backups are pruned, the corrupted file is now the source of truth 😱

Crucially, I copped two drives instead of an individual, larger drive. This is key in our quest for data integrity. We now employ a spanking new filesystem, ZFS, migrating away from our previously naive ext4 setup. ZFS as a filesystem comes with self-healing properties, and by having our drives mirror each other, we have a carbon copy of each individual file! This is handy as the filesystem can generate a checksum for every file, and by comparing any deviation, determine if it needs to ameliorate any bit errors that have sprung up.

In setting up mirror configurations, it is actually recommended to procure drives from different manufacturers. This helps mitigate edge cases such as a manufacturing defect, like a faulty controller, from impacting both drives.

This configuration is gratefully picked up from this blog post by JRS System. The mirrored configuration makes it easy to add redundancy by slipping in additional disks or increasing the usable capacity by re-silvering each drive one by one.

Finally, the inquisitive among you might wonder why I didn't just opt for spinning rust - a regular hard drive would certainly be cheaper and less susceptible to data loss when left unpowered. Modern flash drives, if left sitting unpowered for a long time, will tend to lose their voltage level and subsequently forget a bit state. But since these drives are intended to be powered on 24/7, this is of little concern.

What is important, however, when self-hosting, is to consider your own personal real world constrains. This might manifest as having an unsteady power supply or spotty network connectivity where you live. Your setup should take into consideration such limitations. For me, the server was being built in a rented apartment, and as such, I might have to shuttle it between places. Having it be of a portable size and using static, non-mechanical parts means fewer parts get rattled about.

The more ambitious of you might consider a network-attached storage, further decentralizing your compute from your data. Again, I couldn't possibly lug a Dell blade server stuffed with hard drives so I shied away from this option.

Enclosure

Inspired by the Beelink's small form factor, I sought after a new chassis that was diminutive in size, yet able to cram the new components. Unsurprisingly, many of these mini-PCs weren't able to accommodate multiple full size 3.5- or 2.5-inch drives, often only supporting the smaller, gum-like M.2. form factor.

Annoyingly, it turns out that even under the M.2. specifications, the drives come in varying lengths. Most typical SSDs here spot a 22mm width and a length of 80mm (abbreviated as 2280). Enterprise M.2. SSDs are often 110mm in length instead (22110). I struggled, both to find a cost-effective 2280 enterprise SSD or a small motherboard would support the longer form factor.

With some digging, I landed on the DeskMini. Although nearly double the size of the Beelink, it is still mighty small with a 1.9L footprint. Vitally, the product page made it clear that the frame mounts two 2.5-inch drives! Alongside a bevy of nice quality of life upgrades, 2.5 Gigabit Ethernet, DDR5 support, and a modern AM5 socket, the DeskMini was a good enough fit for my use case. Despite its size pressing dangerously close to a conventional mini-ITX machine, power is supplied through a power brick, meaning no full-fat power supply unit needed!

Boot

Some random Phison SSD

Since all my important media will live in the Lenovo drives, the OS boot drive doesn't need any cutting-edge features. I simply nicked an old Phison M.2. SSD from my closet.

Processor

AMD Ryzen 5 8500G

No particularly strong requirements here, except I wanted something less power hungry. Since we aren't running any compute intensive programs like encoding, I opted for the lower-end Ryzen 5 8500G, which was more than adequate.

Memory

Crucial RAM, 32GB Kit (2x16GB) DDR5 5600MHz

Again, no hard requirements here. This RAM kit doubles the capacity of my previous setup. There is an interesting argument about using ECC RAM for ZFS setups (that a stuck bit in RAM during a scrub might murder your data), but since the motherboard of the DeskMini doesn't have support for it, it is something we had to forgo. Otherwise, more RAM is always appreciated!

All together now!

Components USD
2 x Lenovo 5210 ION 440
ASRock DeskMini X600 190
Phison SSD Free!
AMD Ryzen 5 8500G 160
Crucial RAM 95
Total 885