Optimal DIY NAS with Rockstor Linux

Tailor Made

Article from Issue 195/2017
Author(s):

Rockstor Linux turns a microserver into a fully functional NAS.

To help cope with fast-growing volumes of data, more and more users are installing network-attached storage (NAS) systems on their own networks. Several hardware vendors would love to sell you a dedicated NAS device, but if you don't have the budget for expensive, proprietary NAS hardware, you can still get in the game. A compact PC with state-of-the-art hardware is ideally suited for network data storage, assuming it meets a handful of conditions. I will show you how to configure a home-built NAS system with a compact computer running Linux.

Requirements

For your custom NAS, you don't need a fast processor, and you can even use an older system that is no longer suitable as a desktop system. However, other considerations, like the mass storage subsystem and the performance of the power supply play an important role in NAS.

Thus, you should make an investment in your DIY project: Old computer systems that still rely on IDE interfaces using the parallel ATA standard only support two hard disk drives or SSDs per connection. Years ago, the parallel ATA interface was replaced because of poor performance with the more modern serial ATA (SATA) standard.

The SATA specification not only provides for far higher data transfer rates, it also allows far larger media; therefore, the cumbersome, error-prone master/slave configuration does not apply. If you do intend to use an older computer system for building your NAS, make sure it at least provides the SATA 2.0 (3Gbps) standard interfaces.

One problem in building a NAS system from existing components is rooted in the power supply. Legacy models usually have a relatively high power consumption and are designed for the CPUs of that time, which were not exactly economical. Because a NAS is usually intended for continuous operation, you can expect significantly higher costs if you use such components. Therefore, it is not advisable to use power systems designed for Pentium 4 processors or the first generation Dual-Core-branded processors. Newer power supplies, designed for 80 Plus certification, will ensure greatly increased efficiency.

Finally you should look for hardware that lets you access storage slots easily from the outside. Commercial systems have replaceable bays with corresponding mechanisms, so a defective disk can be replaced within a few minutes. Conventional cases generally do not have slots that let you exchange components, but you might be able to add them retroactively.

When using more than two hard drives, the use of a RAID controller offers better data integrity in the case of hard disk failure – if you select an appropriate RAID level. A RAID controller can be quite expensive, so you need to calculate precisely before the project to see if it is actually still worthwhile upgrading existing hardware for the desired purpose or if purchasing a compact system will be cheaper.

Because the configuration of software RAID without dedicated controllers can now be managed easily, especially with regard to the mass storage devices, precise planning of the kind of data security you want to achieve is advisable. The simple software solution might already meet your needs.

ProLiant MicroServer

The Hewlett Packard Enterprise (HPE) ProLiant MicroServer Gen8 [1] is optimally designed for use as a NAS and comes standard with all the necessary components in place from the factory. You can purchase the device in various configurations, with processors from a Celeron running at 2.3GHz clock frequency up to an identically clocked Xeon.

A smart array controller with four bays for hard drives or SSDs is common. The configuration lets you run various RAID levels with hardware support. The bays with the drive cages are fitted vertically at the front of the unit behind a cover, but are not designed for hot-swapping, although they can hold at least 16TB of mass storage. You need an adapter if you want to install 2.5-inch drives. The first two slots use the current SATA 3.0 standard with maximum speeds of 6Gbps, whereas the other two only support the older SATA 2.0 specification.

The device also has four external USB ports that support the current USB 3.0 standard and three RJ45 LAN connectors, one of which is designed as an integrated lights-out (iLO) connector, which, in case of a problem, allows remote management of the server. The LAN interfaces all support Gigabit Ethernet.

Inside the server on the motherboard is a slot for SD/SDHC memory cards and a USB port. The internal connections are bootable, which means you can use media inserted there to boot operating systems. (See the "Bootable USB Sticks" box for more information.)

Bootable USB Sticks

More and more motherboards have internal USB ports; SD/microSD slots can occasionally be found on the motherboard, as well. These ports are marked in the BIOS as bootable, so you can connect a boot drive in the form of a USB stick or a memory card. Rockstor Linux also supports USB media as boot drives, but it is advisable not to use conventional USB flash drives. Many writes to the devices take place, especially with system logging, and because the memory cells of commercially available USB sticks support only a limited number of write cycles, you should choose a USB flash drive for the boot drive that relies on single-level cell (SLC) technology. Compared with the usual multi-level cell (MLC) or even triple-level cell (TLC) flash memory, SLC can handle many more write cycles, it is significantly faster, and it has a service life similar to SSDs.

Another slot for an optical drive with a slim form factor is accessible from the outside. On the main circuit board of the computer are two slots for standard DDR3 memory modules and one free PCIe slot for additional cards, which you can access without tools. The graphics card is a Matrox G200, which sends signals via VGA output with resolutions up to 1920x1200 pixels and a color depth of 16 bits/pixel.

Rockstor Linux

As the operating system for the home-built NAS, I will use Rockstor Linux, which the developers optimized for use as a NAS. You can get the free system – based on CentOS and Fedora – from the project page in the form of an approximately 730MB ISO image [2].

Compared with a dedicated NAS system based Linux, Rockstor comes with Btrfs as the default filesystem and implements many advantages of the ZFS filesystem [3] already used by some distributions. The system is also suitable for use in heterogeneous IT environments because it supports SMB/CIFS.

The distribution also uses Docker containers, called "Rock-ons" in this context, that let you integrate cloud services into the system. You can configure and manage the system in a customized JavaScript interface, which means you can access it at any time from any computer on the LAN.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • PCIe SSDs

    A PCIe SSD can accelerate your system considerably, but you need to do your homework and choose the right product for your computer.

  • EasyNAS

    EasyNAS lets you set up network-attached storage in next to no time – even on old hardware.

  • Hard Disk Sentinel

    Hard Disk Sentinel helps you monitor mass storage devices with a fully automated process minus the bells and whistles.

  • Desktop RAID

    Linux offers several options for fulfilling the RAID promise of fast hard disk access and data security.

  • CeBIT 2010: RaidSonic Shows Icy Boxes

    The NAS 5220 and its brothers NAS 6210 and 6220 provide Linux-based network-attached storage into the home for under $275.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News