The HP Microserver N54L and its predecessors N40L and N36L are widely spread homeservers. I've written about using it as ESXi host in my Homelab about 2 years ago. Today it is still a great system to be used with ESXi but there are better alternatives, especially due to its limited memory and CPU power. That was the reason why I rededicated my N40L to be central storage and file server with FreeNAS. This post describes what you need to use the N40L as resilient storage and how to configure it properly for ESXi usage. I will talk about NFS sync writes or performance issues with NFS vs. iSCSI and how to workaround them.

Hardware Guide

HP Microserver: If you do not already have a Microserver, go for the N54L.

If you do not already have a Microserver, go for the N54L. Memory: FreeNAS requires 8GB of RAM to run properly: Kingston KVR1333D3E9SK2 or Corsair CT2KIT102464BA1339.

FreeNAS requires 8GB of RAM to run properly: Kingston KVR1333D3E9SK2 or Corsair CT2KIT102464BA1339. Hard Drives: I recommend the WD Red drives (2TB, 3TB or 4TB). The Red series was specially made for NAS usage. You can also use the WD Velociraptor model which is a little bit faster, but much more expensive. The system has 4 slots, but you can add a 5th drive to the cd/dvd slot.

I recommend the WD Red drives (2TB, 3TB or 4TB). The Red series was specially made for NAS usage. You can also use the WD Velociraptor model which is a little bit faster, but much more expensive. The system has 4 slots, but you can add a 5th drive to the cd/dvd slot. NIC: An additional NIC is recommended for performance and redundancy: Intel Gigabit PCI-E Network Adapter EXPI9301CTBLK

An additional NIC is recommended for performance and redundancy: Intel Gigabit PCI-E Network Adapter EXPI9301CTBLK USB Flash Drive: I recommend to install Freenas to a USB Flash Drive. The recommended boot device size for FreeNAS is 8GB: SanDisk Cruzer Fit 8GB

I recommend to install Freenas to a USB Flash Drive. The recommended boot device size for FreeNAS is 8GB: SanDisk Cruzer Fit 8GB HP MicroServer Remote Access Card: For out-of-band management.

Shopping Guide

Installation & Configuration

Installation

Installation is very simple. You can use the internal USB port for the USB Flash Drive. If you want to use a 5th hard disk, you can fit it into the cd/dvd slot.

Downlad the latest Release of FreeNAS Boot the installer (Burn it to a CD or mount it with the Remote Access Card) Select the 8GB flash drive as target Enter your root password Remove the CD and reboot

That's it. You FreeNAS will now reboot and come up with DHCP enabled. The configuration can be done with the web interface.



Initial Configuration



Open the Web Interface Login as root with the password you set during the installation. This will start the initial configuration wizard. Set your language and exit the wizard at the second step If you want to set a static IP address you have to add an interface in Network > Interface

Create a Volume

With 4 disks, you can build a RAID10. This will give you the best performance. If you have 3 or a 5th disk you can create a RaidZ. This will give you the most capacity.

Open Storage > Volumes > Volumes Manager Enter a Name Configure your volume layout. RaidZ (3 or 5 Disks required):



or Raid10 (4 disks required):

Press Add Volume

FreeNAS running on your N54L is now ready to be used. From that point you can create your shares to use it as Fileserver or shared storage for ESXi.

Create a NFS Share for ESXi

Open the Storage Tab Select the Volume Press the Create Dataset icon

Enter a Dataset Name and press Add Dataset Navigate to Sharing > UNIX (NFS) and press Add Unix (NFS) Share

Browse for the Path you want to share (/mnt/[volume]/[dataset]) Press Advanced Mode Change Maproot User: to root Press OK When it asks to enable services, press Yes

You can mount the share on your ESXi host with Configuration > Hardware > Storage > Add Storage > Network File System



Create a iSCSI Share for ESXi

Navigate to Sharing > Block (iSCSI) > Portals and click Add Portal Enter a Comment and press OK Navigate to Initiators and click Add Initiator Press OK Navigate to Targets and click Add Target Enter Target Name, Target Alias and set the Port/Initiator Group ID to 1 Navigate to Extends and click Add Extend An extend is a file that simulates the Block device. You have to set a fixed size. Select a Extent Name (same as Target Name possible), a Path and the Extent Size



Navigate to Associated Targets and click Add Target / Extent Map Target and Extent and press OK Open Services Tab and enable iSCSI

iSCSI vs NFS Performance

Without doing any further optimization like jumbo frames or multipathing, my N40L with 5 WD Red 3TB drives in RAIDZ could achieve the following results.

iSCSI

Write: 72 MB/s - 145 IOPS (I/O Analyzer 512k 100%Read 0%Random)

Read: 98 MB/s - 200 IOPS (I/O Analyzer 512k 0%Read 0%Random)

NFS

Write: 5 MB/s - 20 IOPS (I/O Analyzer 512k 100%Read 0%Random)

Read: 52 MB/s - 120 IOPS (I/O Analyzer 512k 0%Read 0%Random)

That's what I expected. But why is NFS performance so bad? ESXi does synchronous writes operations. The host requests an acknowledgement that the data is actually written to the physical disk before it starts another write. A sync write causes the ZFS filesystem to flush it's ZIL (ZFS Intent Log) to the disk. The ZIL is a log of sync writes that ZFS uses to write data more efficiently to the disk.

So, what can you do to speed NFS up?