Building a NAS with oDroid-HC2
Making the Case for Network Attached Storage.
Editor’s Note: This post has been in draft since 2019, as I lacked the energy to finish it until now.
My computing strategy has always been as simple as possible - I firmly believe that “Less is More.” When I purchased my first MacBook in 2012, I downsized significantly, moving from a 1TB HDD to a 128GB SSD for better reliability and speed. In my backpack, I carry two external drives for Time Machine backups and important files. For items that are rarely accessed, I use various free cloud services, as it seemed like a practical solution. It may not have been perfect, but it worked well, especially given my on-the-move lifestyle and frequent flying.
A few years later, I upgraded to a newer machine with more storage capacity. With each upgrade, my data grew in size. I also began retaining important data and backups. As a hobbyist photographer, I consistently shot in RAW and recorded in 4k60 since I got my iPhone X.
I could have chosen to delete some unimportant files and older backups, but it was actually more cost-effective to store them and forget, rather than delete and potentially regret. At this point, I could have shifted everything to the cloud, but the thought of added monthly commitments, especially with unfavorable exchange rates for my currency, bothered me. So, I decided to make a significant upfront investment by purchasing a NAS unit.
My NAS had to meet four key requirements:
1. Cost-effectiveness in terms of running costs.
2. Capability for Plex transcoding.
3. No separate storage unit required.
4. Ability to run Linux, or at least support Linux.
Building a NAS from a Raspberry Pi was out of the question, as it would require an external storage unit. Used Small Form Factor (SFF) CPUs were both affordable and powerful, but they consumed too much power. Most off-the-shelf 2-bay NAS units were based on energy-efficient ARM architecture, but almost none of them would run Linux once they reached the end of their lifespan. This would not only create electronic waste but also pose security risks. In the end, I had to stick with Single Board Computing (SBC) as it was the only platform that met most of my requirements.
It didn’t take long for me to find a solution that fit the bill - a single-bay SBC NAS Unit from oDroid called Home Cloud (HC).
Made in Korea: A Truly Unique Brand.
From left : Micro SD slot, Power Jack, USB 2.0 and Gigabit LAN
But A Single Bay?!
While I would have preferred at least a 2-bay NAS for a mirrored setup, a single bay would suffice. Most of my crucial data was still backed up to the cloud, providing an extra layer of safety. I allowed this NAS to operate with a sense of freedom, knowing that it could fail at any time, but not too soon. The specifications were more than satisfactory, featuring a 32-bit 8-core Exynos 5422 SoC with 2GB of RAM. Interestingly, this is the same SoC that powered 3G version of the Galaxy S5 back in 2014. In theory, it should be capable of handling at least one transcoding task to Google Chromecast without dropping frames.
I chose the HC2 over the HC1. Both had identical specs, but the HC1 bay was designed for 2.5-inch drives, while the HC2 could accommodate 3.5-inch drives. The entire unit also functioned as a heatsink for both the drive and SoC, ensuring that overheating wouldn’t be a concern for 24/7 operation.
Editor’s Note: I’d recommend avoiding 7200RPM drives, as they generate more heat than 5400RPM drives.
My HC2 unit cost me $86 USD shipped with all the necessary accessories. This was almost the same price as a 1-bay NAS from Synology, but it offered everything Linux had to offer. I wouldn’t recommend taking this route unless you’re comfortable with the idea of being entirely on your own. Since my daily life revolved around Linux in data centers and the cloud, this was just another addition to my collection, a delightful plaything.
Openmediavault Web Interface.
Regarding the operating system, there were plenty of downloadable prebuilt images that could be written to an SD Card for the SBC. Initially, I tried the prebuilt Openmediavault, a distribution designed for network-attached storage setups. Unfortunately, I encountered unfixable issues with system updates, so I opted for a minimal Debian setup and installed Openmediavault on top of it. It required a bit more effort but came with fewer issues.
Even standard off-the-shelf 2-bay NAS units lack BTRFS support.
After careful consideration, I decided to use BTRFS for the filesystem. This choice was primarily driven by the lower risk of data corruption. I set up a monthly cron job to scrub the data, ensuring its integrity. While it performed slightly slower, a few MB/s slower than EXT4, I deemed it acceptable. Additionally, the entire drive was encrypted, so it already offered better performance than expected, with a minor performance penalty.
Disk benchmark with encryption via Gigabit LAN - Left : BTRFS - Right : EXT4
Using Openmediavault was straightforward; I just had to follow the menu sequences from top to bottom. While I could configure everything via SSH, sometimes it was nice to have a user-friendly interface handle the heavy lifting.
Assessing System Load During Plex 720p Transcoding.
Plex transcoding worked as expected; it could handle one 720p transcode with embedded subtitles or 1080p without subtitles. Of course, this depended on the device to which I was streaming. If the target device was more capable than Chromecast, it might skip transcoding and offer direct playback.
No Time Capsule? No problem.
I allocated approximately 500GB for Time Machine backup. macOS detected it and initiated backups without any issues. I also ran several restore tests, and there were no problems. It’s essential to remember that backups are only as valuable as their ability to be restored. Always test your backups.
Is it still operational in 2023?
Nicely tucked in the cabinet.
Yes, with a nearly dead hard drive, I managed to retrieve all the data remotely from a distance of 400KM. The NAS now resides at my parent’s house, serving as offsite storage.
The HC2 now functions solely as network storage for my brother to use. I plan to replace the nearly dead hard drive with an SSD. Using a hard drive for storage makes little sense unless you’re dealing with exceptionally large files spanning several terabytes. However, for that level of storage, you’d typically need a minimum of a 4-bay NAS.
I’ve also replaced Plex with Jellyfin, which is open-source software and superior in every way. Yet, since Netflix covers most of my media consumption, and I only watch it for about 10 minutes during lunch, there’s no reason for me to consider purchasing another NAS unit.
It’s worth noting that the HC series has been discontinued. However, the successors and newer generation SBCs are far more powerful than they were a few years ago. So, if you’re thinking about making a purchase, it might be worth exploring newer options. I never expected a Raspberry Pi to cost RM400 on average today, thanks to COVID.