Saturday, 4 May 2013

Home NAS build DIY using HP N40L

I am running a home lab with 3 systems which I use for exploring new technologies. I was looking for a NAS server which can be used as shared storage. I was thinking to buy a Ready made NAS appliance or assemble one myself.
I saw a deal for HP N40L  which included 250G Drive + Postal for 219$ which was really a good deal. I have heard about this Micro Server which is decent hardware for NAS kind of setup. That time HP n54L was launched hence the price difference was more than 80$. So I thought of buying a known hardware which was tested by lot of people for their NAS build and ordered the HP N40L. I was very much exited about this new addition to my lab. 

I have done following changes before modifying the box into a NAS server.

Hardware Preparation: 
  • Removed the stock 2GB + 250GB Hard drive which was shipped with the server
  • Added 3x500GB WD Drives in Hdd Slot 1, 2 and 3
  • Added 1 x 1TB WD Red drives in Hdd Slot 4.
  • Added 2x4GB Transcend DDR3 Memory. 
  • Added Intel Gigabit CT Desktop Adapter. 
  • Using 4GB Sandisk Cruizer as NAS OS boot drive. 
Since the onboard NIC card does not support Jumbo frames we require a PCIe NIC which can support jumbo frames, WOL, etc. Also Intel NICs are known for their reliability, Open Source Driver support, etc.. this card worth the money. This NIC comes with standard profile + low profile bracket. I removed the standard profile bracket and replaced it with the low profile to fit inside this tiny server.

I was using the onboard NIC for management purpose to logon to this server using web interface. The intel NIC was configured with MTU, WOL, etc and used for iSCSI mapping and wireless UPNP streaming purpose.

OS Preparation:
I was using Openfiler when I started the home lab. However there was no progress in their release after 2.99 (due to the base fork unavailable, etc) I was looking for alternative opensource product which can be used. I learnt about Freenas and NAS4Free. These FreeBSDs variants support ZFS as the file system, I wanted to give a try. Though I am not keeping any business critical data in the drives, I would like to have better IO and throughput, I would like to go with the ZFS apporach.

NAS4Free is really a good product which is very simple to implement and comes with multiple Add-ons like upnp, nfs, iscsi, afs, etc. So I installed in USB stick as explained here.  Importing/Adding new drives, creating new ZFS volumes, datasets, etc are very much simple with this NAS OS.

I was really happy to use this as my NAS + upnp server for connecting my ipad to listen to music, do wireless movie streaming, etc.
While observing the performance of the server using the limited options available within this NAS4Free OS, I found the CPU and Memory utilization were not much high. From processing perspective the AMD processor configured in this server is good enough for running the NAS OS kind of load. Still the utilization was not that much high. One of the reason behind this low utilization is iSCSI. Generally CPU, Memory utilization are handled by the hyper visor which is configured with iscsi target and not by the NAS OS which is running from our magic NAS server.

So I thought of taking full benefit of the CPU and memory of N40L server by configuring the server with NFS. I know iSCSI was not performing very much bad to go to this. However improvisation and curiosity are two characters which will keep us motivated to learn new things/technologies.

I created couple of NFS shares from the drives I have added above. NAS4Free requires datasets to be created to share them as NFS. I did that and I started testing the File transfer rates between iSCSI and NFS mounts by transferring 3 GB of iso file. I was already aware that iSCSI was better than NFS in this custom build NAS envrionments, the results were really shocking. I have not used any complex IO tools for finding the difference which I am planning to explore in one of the weekend, I used simple transfer method by keeping a stop watch next to me.

I have not applied any performance tuning or modification to NAS4Free installation. It was installed in 4 GB USB stick and Autotunes were enabled while configuring the host name, IP Address, etc.

iSCSI based transfer took approx 1:50 minutes to transfer 3GB of data. However NFS based transfer took more than 10 minutes!!! which is more than 5 times slower than iSCSI.

To be continued...

Friday, 3 May 2013

Sharing my Experiences

I am starting up my first blog which I was planning for quite some time..quite some years infact.

Here I will be sharing my everyday experiences related to technology, readings, photography, etc.

Stay tuned.