Building a NAS for home storage


I always wanted to have some storage at home. I liked the idea of easy access to my files while not having to plug in my USB-HDD into my computer all the time. Some years ago I thought some kind of prebuild system like some Synology NAS would be perfect. But these systems are very expensive for what they actually do. And besides that, running custom software on them is not always that easy.

How to start?

My first solution was to go with some SAAS-solution. I was getting 1TB of storage and a managed Nextcloud instance for just about 5€/month. While this was quite nice and cool to use for having people drop their pictures after some camps and events, it was a bit slow and I could not access it any other way than through Nextcloud.

Some time later a friend of mine showed me how he was doing it. He used multiple ODROID-HC4 and CEPH to store his data. At the time, I was still new to the data storage world, so I decided to go with one of these ODROID-HC4 and one 18TB drive. And I have to say, it worked quite well! I did not really have problems with it and had used it for over a year. Over the time, I „deployed“ services like Nextcloud, Jellyfin etc. and I did not really had issues with it.

Where did it go?

Now a couple months ago, I decided it was time for an upgrade! So I bought some components and build the thing. I decided to try AMD because I never used Linux with it (and Intel on my laptop is just pain) and I have to say, it works really well!

In general, new system with nothing on means trying new things, so I also tried systemd-boot. This also worked really well!

Now, the question is, how do I store data?

How to store data?

Now was the time to decide for which filesystem to use. For me only two filesystems came to mind: BTRFS and ZFS. Question was, which one will it be?

On my initial single-disk NAS, I used BTRFS. It was simple to setup and worked very well. The new system however was intended to hold up to eight drives. With 18TB drives, this would be 144TB of raw storage! However, raw storage is not usable storage. Some storage is used for redundancy. Both BTRFS and ZFS support using multiple devices together in a RAID configuration.

At the end, I have chosen BTRFS. I had four drives, so I used dm-crypt / luks2 to encrypt them and then, against all the advice from the whole internet, create a BTRFS RAID6 (with RAID1C3 for metadata) with the four drives. I have this setup now since two months and it is still working.

However, I am still a little nervous about how long it will keep working. As the motherboard and case have enough connectors / space for 8 drives, I am thinking about testing out ZFS and use RAID-Z2 for those drives. However, I still have to test some things if it would actually work. The idea would be to buy four more drives so that in total I have 8 drives, create a RAID-Z2 on the four new drives, move the stuff over, and then wipe the old drives, but that is something for future me.

Starting to use the NAS

Once I finished building it and setting up the storage, I moved the NAS to its final location.

Last problem now: Ethernet cable not long enough…

Couple weeks later, I moved most of the applications like Nextcloud, Homeassistant, but also new ones like Immich to the NAS. While this seems like it is doing plenty of stuff now, the average CPU usage is just 1.5%.

I think for the future I will just see how good BTRFS works. I am thinking about migrating to ZFS, but I am not entirely sure of that. If I do, everything has to work. I need to check that before I start on the migration.

And remember, RAID is not a backup!


Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert