Setting up a NAS - HP micro server gen8 (Debian 9.3)
I used a NAS system (Synology) for some years. Its type was DS218J.
It's cheap, worked very well and met my purposes. Nevertheless I wished to have more flexibility regarding used hardware, software and network protocols.
I ought to say, that there are reasons for me to learn a few new things, too.
That's why I bought a small micro server, in particular the HP ProLiant MicroServer Gen8.
I know that today there are some newer models available to buy. I guess they are called Gen9 and Gen10 - but presently that's very trivial to me ;-)
Here are the technical characteristics of my Gen8:
|Type||Server, ultra micro tower
|Internal Bays Qty||4
|CPU||Intel Pentium G2020T / 2.5 GHz Dual Core
|RAM||16 GB, 1333 Mhz, DIMM 240-pin, PC3-12800, unbuffered, 2 Slots Qty
|Storage Controller Name||HP Dynamic Smart Array B120i
|Networking||2 x Gigabit Ethernet, Wake on LAN, PXE support
I increased RAM memory to a maximum of 16 GB and I've installed four hard drives of brand Western Digital with 1 TB each.
I chose the "RED" series of hard disks, which is specially designed for use in NAS systems. Also its specification allows a usage of 24 hours, 7 days a week.
This is how the server looks like:
According to my current knowledge, the linux kernel doesn't support the RAID functionality of that particular HP controller.
If you have newer information about that, please write to raphael at raphael-muench dot de.
That's why I decided to disable the hardware RAID functionality and switched to software raid instead.
Therefore you have to press the F9 key during the boot process and then go into system bios and select Enable SATA AHCI Support.
Next I installed Debian 9.3 on the first hard disk. The remaining 3 disks are used for a RAID-5 configuration.
RAID-5 offers advantages, for example data availibility as well as performance and data throughput.
You can get an introduction about the different RAID levels here -> Wikipedia
For accessing my files, I have choosen to use the NFS protocol. I'm primarily using gnu+linux machines at home,
so I don't necessarily need the typical Samba/CIFS protocol.
The HP server does not have an internal DVD drive installed by default, although this is possible and there's a plastic cover at the front of the HP-server.
That's why I connected an external DVD drive via USB cable to the HP server. Now you can boot from DVD-ROM and start the Debian installer.
On the first hard disk I created two partitions. The first partition is used for the native linux OS and the second partition is used for SWAP.
I don't think so that 17 GBs SWAP is a realistic requirement for a NAS device. But at his stage I just relied on the Debian Installer standards.
The installation of Debian isn't complicated and there's not much to say about.
I deselcted the graphical environment for installation, but instead marked SSH services for installation.
Then I assigned a static IP address to the NAS system in /etc/network/interfaces :
iface eno1 inet static
After that I executed the next commands. They are extensive self-explanatory, some parameters are preset values :
apt-get install mdadm parted
parted /dev/sdb mklabel msdos
parted /dev/sdc mklabel msdos
parted /dev/sdd mklabel msdos
parted -a optimal -- /dev/sdb mkpart primary 0% 100%
parted -a optimal -- /dev/sdc mkpart primary 0% 100%
parted -a optimal -- /dev/sdd mkpart primary 0% 100%
mdadm --create /dev/md0 --auto md --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1
mkfs.ext4 -b 4096 -E stride=128,stripe-width=384 /dev/md0
apt-get install nfs-kernel-server nfs-common portmap
You can get a status of the RAID by typing in:
To get the UUID for the new /dev/md0 device I executed that command :
After that I added a new entry to /etc/fstab
/dev/md0 /media/daten ext4 defaults 0 2
This is needed for mounting that new RAID device at startup process.
Then I added a new entry into /etc/exports
With this entry I want to make the storage available to my clients.
After this step, you have to restart your fs server:
At last you have to do some modifications at the clients :
apt-get install nfs-common
Also a new entry within the /etc/fstab
192.168.0.20:/media/daten /home/raphael/daten nfs rw,hard,intr 0 0
Copyright (c) 2017, 2018 Raphael Münch, last change: 2018-08-06