[DIY] Build your own low power NAS: cheap and energy-efficient
If you are looking for a NAS (Network Attached Storage) for home use, you cannot avoid the manufacturers Synology and QNAP. Both manufacturers deliver small NAS complete solutions with the option to synchronize data locally or via the Internet, and both do not exactly charge little money for the hardware used.
A complete NAS solution doesn't offer me any advantages
When buying a dedicated NAS manufacturers provide OS and program updates, accordingly they also specify how long their hardware is provided with updates. The all-round carefree packages of the well-known NAS manufacturers certainly save some time during commissioning, but can then only be operated within the range of functions provided by the manufacturers and on their hardware. A proprietary Linux distribution is usually used as the operating system. Both the software and the hardware can only be adapted or expanded to a limited extent. More important for me than the manufacturer software is the ability to start Docker containers and sufficient RAM. The use of Docker containers can more than replace some additional software from the NAS manufacturers.
As an alternative file sharing and sync solution, the free software Nextcloud, formerly own Cloud, offers itself. Nextcloud can be operated on almost any current hardware and on various operating systems: In addition, Nextcloud offers sync clients for all common operating systems, including macOS, Windows, Linux, BSD, Android and iOS, among others, as well as the option to synchronize the calendar, contacts, and photos on the smartphone. Since Nextcloud is also available as a Docker version, the software can be run on any platform with Docker support, theoretically also on a complete NAS solution, which makes its sync programs obsolete. One potential advantage of NAS solutions is setting up the hard drives and their raid levels. Especially beginners need little to no background knowledge for this. At this point, I'm certainly a bit particular, but I don't want to leave the creation of the raid network to the manufacturer at all. One of the reasons is that I use BTRFS as filesystem, and it is possible to add additional hard disks and remove old hard disks during operation. I have used it several times to replace all the hard drives and hardware without ever having to reformat the file system.
Alternative low power hardware
Looking for a hardware with low power consumption, the first thing I came across was of course the Raspberry Pi, due to lack of power and SATA ports later on main boards without fans. Fanless mini PCs with a TDP of 10 watts offer relatively much performance with low power consumption. The only drawback is that a mini PC usually has only a few hard drive ports, which means that it only offers limited storage space. See also: Cheap and economical Docker Mini Server for home. Alternatively, there are small motherboards in Mini-ITX format with passively cooled CPU, up to 4 onboard SATA ports and the possibility to expand them to up to 8 SATA ports via PCI-EXPRESS.
Here is my shopping list:
- 1xAsrock J3455-ITX approx. 80$
- 1x8GB DDR3L SODIM 204-Pin approx.60$ (can optionally be upgraded to 16GB)
- 1xPicoPSU-90 approx.30$
- 1x12V 6A power supply approx. 15$
- 1xSSD HDD 250GB approx.40$ (operating system disk)
- Case from 3D printer about 5$ (True: This post is a bit unfair, but yes: I have a 3D printer and yes it's also true that I don't win any beauty contests with the design)
------------------------------------------------
total approx. 230$
additional components for the operation of up to 8 hard disks:
- 1x4Port SATA III PCI-EXPRESS 2.0 x1 controller card approx.30$ (so we have a total of 8 SATA ports and can run another 7 hard disks besides the operating system disk)
- additional SATA cable and power distributor for HDDs approx. 10$
- 1xFan approx. 10$ (For the HDDs, the board would not need a fan ...)
------------------------------------------------
Total approx. 280$
Wow: although there is actually no case included here: more expensive than expected, but still much cheaper than a comparable NAS complete solution. Hey: the hardware can drive 8 SATA hard disks, has 4 cores and 8GB RAM and an SSD hard disk for the OS. In addition, the J3455 board can be used to connect up to 3 monitors and run one of them at 4K resolution, more on that later ...
For running my Docker containers, the performance of the J3455-ITX board is more than sufficient, but I would still buy the more expensive successor J5040-ITX today. According to the specifications, J5040-ITX delivers more performance with the same power consumption.
If you can manage with 2 onboard SATA ports, you can alternatively use a board with the even newer N100 processor, as an example ASRock n100m. Or the N100DC-ITX board, which uses a 19V power supply instead of the PicoPSU: https://geizhals.at/asrock-n100dc-itx-90-mxblm0-a0uayz-a2989278.html.
Operating system and software
When choosing an operating system, I originally decided to use OpenMediaVault (OMV). OpenMediaVault is based on the Linux distribution Debian and comes very close to the software of a NAS manufacturer, regarding the comfortable creation of raid levels and the file system. OpenMediaVault offers the possibility to install Nextcloud directly as well as to run Docker containers. After installation via a USB stick or an ISO image, the drives and their RAID levels are managed via a convenient web interface, except for BTRFS. There are also numerous extensions and plugins for OMV.
- OMV (OpenMediaVault) www.openmediavault.org/
Since I don't use the features of OMV in the meantime, because I replaced all additional software with containers and I use BTRFS as filesystem, a simple Ubuntu server installation is enough. See: Ubuntu server installation.
Configuration details:
- Docker with Nextcloud, see: Docker Nextcloud ssl - letsencrypt https
- as filesystem for the data disks I used BTRFS, see ZFS vs BTRFS: filesystem deduplication and snapshots.
I also connected 2 monitors to the NAS and installed the desktop environment KDE. So I'm writing this article on the NAS ... Is this then actually still a NAS or already a desktop PC?
Freeze: intel_idle. max_cstate=1 (Asrock J3455-ITX)
After the NAS froze with certain kernel versions sporadically, I completely rebuilt the NAS with Ubuntu. The behavior with the almost daily freezing remained however whereupon I added the following parameter to Grub: intel_idle. max_cstate=1. The parameter obviously solved the problem. There is no measurable difference in power consumption on this hardware.
Power consumption
The idle power consumption of the hardware described here is a measured 8 watts. It is important to use a PicoPSU instead of a normal PC power supply, because a normal PC power supply burns about 10 watts in idle mode without a main board connected, and the power consumption would be unnecessarily high. A 3.5" SATA hard disk needs about 1 Watt in standby and about 5 Watt in operation. In operation with an SSD and 3 hard drives in standby mode, the NAS needs about 13 watts for me:
If all 4 hard drives are in operation, the NAS still needs under 30 watts:
The standby mode of the individual hard drives first worked not as expected, see: OMV HD Idle. In addition i set the fan control as follows: Fan control Debian
All in all, the NAS based on a Mini-ITX board requires about as much power as a comparable NAS complete solution.
Conclusion
Putting together one's own hardware for a NAS is certainly more time-consuming than buying a complete NAS solution from a well-known manufacturer. Nevertheless, using a hardware you put together yourself can not only save money, but also offer more features. If you don't rely on a specific manufacturer for either the hardware or the software, you remain much more flexible with the setup, making it much easier to swap, expand or customize both the hardware and the software.
{{percentage}} % positive
THANK YOU for your review!
Questions / Comments
(sorted by rating / date) [all comments(newest first)]
"1x4Port SATA III PCI-EXPRESS 2.0 x1 controller card" How is this working with multiple disks? One HDD disk max speed seems to be normally in category of 180M and PCI 2.0 x1 tops out in 500M. Any problems seen because of this? I am personally looking to buy asrock Mini ITX board and comparing J3455-ITX, J3355B-itx and some similar newer ones where B model seem to have x16 (in x2 mode) PCI connector which would have 1000M speed. B models have then only 2 sata ports on the board though.