Hi everybody,
I’d like to show my new NAS/Home Server build. I’m an amateur photographer and I need reliable storage for my photos. I also host my own photopage (using duckdns.org for DDNS). Before I was using an ACER REVO RL80 running ubuntu which is great, but has only one drive. I used also a Zyxel NSA 325 NAS for storage (it is one of the faster stock NAS), but lacks in proper cold backup software.
So I decided to build a NAS which can handle both. I came up with the following requirements:
- It should be small
- It should be fast
- It should be silent
- It should safe energy
- It should be able to handle 4 disks
- It should give great freedom regarding the software
- It should have to possibility to do fast cold backups
- It should cost about 200 Euros
With that I was looking for hardware and found a board with a Baytrail Celeron and a small nice case, which can handle 4 disks. (see list of parts)
It was hard to find a PSU with good efficiency that can handle 4 disks and can deal with low Power. I decided to go for an ATX based PSU because it gives better security than these PicoPSU. As I found OMV I realized that I will need a separate disk or I will have to mess around with raid partitions on data drives. As I wanted to keep the 4 SATA ports for disks I came up the a USB3 plugged SSD which is very cheap by the way. It connects on the 19 pin socket where you usually add your USB3 connector for case ports.
As RAM I used some SODIMMs which I had left since my last notebook memory upgrade (total 4gb).
The disk setup should contain 2 disks for RAID1 and 1 disk for backups (e.g., Timemachine backups or other things that do not need to be on the RAID). I use WD RED.
UEFI configuration and Installing OMV
The ASROCK mainboard I was using has a option for switching all lights off that is really nice when you have the NAS located in your livingroom or so and do not what to see the LEDs of the LAN interface.
I configured the FANs for the lowest speeds and switched off all internal devices which I didn’t want to use (e.g., soundcard). It is so silent that when no disks are running you cannot really hear it. The main sound comes from the Harddisks, which are mounted on rubber mounts.
I installed Debian as the 1.0 version of OMV was not ready and I needed a new distribution that supported the Baytrail processor. After installing OMV via the packages I configured the disks.
RAID verify
Current Harddisks have the problem that when you write a lot of data but never read it the data may get damaged by demagnetization. When harddisk finds out (while reading the data) that the magnetization is getting low it rewrites the sector. That is keeping you data save when you are not reading it often (e.g., by backing it up).
I solved this by adding the following line to a cron job that is executed once a month in the night. It ready over the complete array, so these sectors are rewritten.
SFTP server
I wanted to access my data over the Internet in a secure way. As I was using VPN over TCP to deal with firewalls I decided to set up an SFTP server (SSH File Transfer), because of security reasons of FTP (mostly because of passives ports needed to be opened on my home router). I added the following config in the extra config field of the FTP (proftpd) service.
<IfModule mod_sftp.c>
SFTPEngine on
Port 21
SFTPLog /var/log/proftpd/sftp.log
# Configure both the RSA and DSA host keys, using the same host key
# files that OpenSSH uses.
SFTPHostKey /etc/ssh/ssh_host_rsa_key
SFTPHostKey /etc/ssh/ssh_host_dsa_key
SFTPAuthMethods publickey password
SFTPAuthorizedUserKeys file:/etc/proftpd/authorized_keys/%u
# Enable compression
SFTPCompression delayed
</IfModule>
<Limit LOGIN>
AllowGroup ftpuser
DenyAll
</Limit>
Alles anzeigen
I added a group called “ftpuser“ that is used to verify if a user is allowed to login to the SFTP server. I added shares as usual and everything worked.
Besides the described services I use also:
- openvpn server
- samba
- AFP (only for timemachine backups)
- rsync for photo backup
- phpvirtualbox for managing VMs (I have currently 2, my webpage and a GitLab server)
- a native setup for updating duckdns.org
- a native teamspeak server
Performance
The quad core Baytrail (passive cooled) runs at 2GHz, it is fast and can handle the drives with full speed with ease. I used also rsync with checksums without a problem. The running VMs are running also fast and you cannot sense any performance impact.
The power consumption is about 25 Watt with 3 Harddisks running (not spun down) in idle which is most of the time.
Things to be done better the next time / improvements
ASROCK released also a DC powered version of my board. This would avoid extra costs for the ATX PSU and would give extra space. I’m not sure if the power consumption would improve by this.
Another PSU with removable cabled would be extremely helpful because the lack of space in the case.
Other improvements would be a PCIe SATA card for ESATAp access. Just to enable the attachment of additional external drives/JBOD if more space is needed.
I hope this gives you an idea of my own NAS/Home Server build. It costs about the same of a Synology NAS for 2 disks but can handle 4, is faster, looks good, is silent, can be maintained and is open. Thanks to all behind OMV for this great piece of Software!
List of parts
http://www.cooltek.de/en/powered-by-jonsbo/v6/97/v6
http://www.asrock.com/mb/Intel/Q1900-ITX/
http://www.bequiet.com/en/powersupply/278
http://www.supertalent.com/pro…hers&category=FDM&type=79 (not recommanded anymore)
SODIMM (Corsair, you can use any 1333Mhz)