My ZFS NAS on Ubuntu
Martin van Wingerden
Blog OwnerSince 2014 I have a small Mini-ITX case which I use as a NAS. After some upgrades, it currently contains two SSDs, three HDDs, and 16GB RAM. In this article, I will introduce 'elbrus' and give some background and specs on her.
History
Since 2007 I owned a Conceptronic CH3SNAS, which I used with fun_plug. However, it became too slow and did no longer suffice. While reading more about the alternatives, I became interested in building one by myself. While investigating, I also learned more about ZFS. I liked that combination. However, I felt unsure about switching to BSD and saw a use case to use it as a full-blown home server, so solutions like FreeNAS also did not attract me.
So after a quick test ride with Ubuntu and ZFS on Linux (ZOL) I was convinced, I would build my own NAS with some Ubuntu LTS and run ZOL on it.
Specification
I choose a small and silent solution:
- Case: Cooler Master Elite 110
- CPU: initially a Celeron G1820 but later it was upgraded to a i3-4150
- RAM: 2x 8GB Crucial Ballistix Sport DDR3L (SODIMM)
- HDD: 3x Toshiba MQ01ABB 2TB (2.5")
- SSD 1: Crucial M500 mSata 120GB
- SSD 2: Crucial BX200 240GB
Setup
I'm not sure, but most likely, I started on Ubuntu 14 LTS. I ran every LTS since then, and currently, I'm running 'Ubuntu 20.04.1 LTS'.
I used some of the software upgrades to migrate my pool. At first, I started with 2 HDDs running as a mirror. Later, I added an extra HDD and switched to a RAID-Z1 setup. At that same time, I added my second SSD and configured ZIL and a cache. Some of the remaining disk space is used as an independent zpool, I use it for non-critical data and make backups of most of it to the Z1 zpool.
Secondly, I automatically create a lot of snapshots, of which most will be cleaned up automatically. Sanoiddoes this for me. In the long run, this means that for periods more than one year ago, I keep a single snapshot per month.
Currently, I still have enough space free of my approximately 3.8 TB space.
Offsite Backup
Initially, I used my old CH3SNAS as an offsite backup by placing it at my parents-in-law. Later, when I started as a freelancer, it became time for a more professional continuity solution. I ended with a VPC with 2 TB of storage. More about this solution in a later post.