This is a short resume about my do it yourself (DIY) NAS. I do not spend much time building or maintaining my NAS. The main purposes of my NAS are:

  • storing backup of my files
  • and share out disk (by SMB/CIFS and AFP)

My knowledge about computer hardware is very limited. The most important objective is to get hardware which is supported by the OS or NAS software. The form factor of the motherboard also narrows the possibilities. I want a small NAS and decided to go for a mini-ITX motherboard.

To choose the correct HW as NAS is not an easy task. I have spend some time googling, reading HW-guides and checking for availability of HW. My advise is use some time before buying HW. My local supplier used about four weeks to get the HW I ordered. And it seems like most HW pushers are more focused on desktop computers and MS Windows than dedicated server HW. Not much help to get in other words. Server HW is also more expensive than desktop HW.

My current NAS

The FreeNAS OS on my NAS is for the moment replaced due to very slow rsync transfer rate. My experience is that the rsync transfer rate in FreeNAS is only about 1/10 of what it is in FreeBSD. FreeBSD 11.2 is installed and zpools created on FreeNAS are imported in FreeBSD. My NAS is build by the following components. The server components in my NAS are a bit more expensive than desktop components.

NAS is setup by using ECC memory. Total disk in NAS is 6 Terabyte setup as mirror, sharing out 3 TB.

Nerd Monkey wrote an article utilizing the ASRock E3C226D2I MB and Kingston KVR16E11/8 ValueRAM, equal MB and memory as my new NAS HW. And here another interesting story about FreeNAS 11.

I am using Netdata to monitor the status of my NAS. It is easy to install on FreeBSD.

Setup of NAS - ZFS filesystem

The server has 3 Terabyte (TB) of storage. The storage is setup as a ZFS filesystem and all disks (four disks altogether, two disks of 2TB each and two disks of 1TB each) are all setup as a ZFS mirror. That is the two 2TB disks are mirroring each other as well as the two 1TB disks. If one disk fails ZFS is automatically restoring (by ZFS scrub) the failing disk. If one disk fails (by HW) and must be replaced ZFS has functionality for unmounting failed disk, mount a new one and put the new one into mirrored pool again.

It is easy and cheap to setup a backup server based on Linux or other server OS and rsync. There is an open source project Netatalk Apple Filing Protocol (AFP) fileserver. Some years ago I tested Apple Time Machine and Netatalk on a Solaris 11 server. It worked for some time, but also failed. I don’t know how stable Netatalk and Apple Time Machine is now. But for me rsync is the best solution. And for backups to remote servers outside my house (by Internet connection) rsync is most likely the best tool to use. By using rsync I backup all data on my Macs. A complete reinstallation of a MacBook is done by a fresh install of OS X and then restore all data by rsync. Safe and reliable.

Why backup

For me, backup is very important. Do backup to several locations and keep the backups in the different locations synchronized. There are several ways to lose data. HW or disk crash is one. Highjacking by ransomware another. A restore of data is a cheap solution if either of the them occurs.

Backup by using rsync

The rsync utility is available on most OS platforms. It has been around for some time and it is rock solid and very effective. See also How to Use RsyncOSX about rsync and RsyncOSX.

Encrypt sensitive information

I am also observant of not storing personal and sensitive information not encrypted at remote locations. There are several solutions to encrypt data. One is creating a secure folder or volume. Almost all OS supports encrypted file systems today. Another solution is to encrypt files containing personal and sensitive information (as tax reports). I am encrypting files by using GPG. I also encrypt files containing sensitive information in case my MacBook is compromised (hopefully not likely to happen due to precautions).

I have not tested rsync on encrypted folders or volumes. I am sure it works, but I do not know how effective rsync is when there are changes within the encrypted folder or volume.

Which NAS SW to use

There are several options for installing NAS by using free and open sourced based solutions. There are two options:

  • either use stock OS (e.g. Solaris, FreeBSD or Ubuntu)
  • or go for a special NAS SW (e.g. NAS4Free, FreeNAS or Openmediavolt)

ZFS is an important part of my NAS. ZFS was developed by Sun Microsystems as part of OpenSolaris. OpenZFS is now the main developer of the open source ZFS used in FreeBSD and Linux (and other OS as well). The following OS supports ZFS. Linux by a kernel module, the other as the default filesystem.

Written on April 10, 2018