Creating a NAS on VMware ESXi with Nexenta

Nexenta NexentaStor is an enterprise grade NAS appliance that provides block (iSCSI) and file (SMB, NFS) services. It’s also great for homelabbers as a restricted ‘community’ edition is available, which makes for a great alternative to FreeNAS. Being a VMware partner, deployment on ESXi is pretty smooth, too.

I’m going to run through deployment of Nexentastor version 4. I have played with 5- and it’s worth noting that’s it’s vCenter integration is pretty awesome, but it seems to be more geared towards presenting NexentaStor with virtual disks (VMDKs) stored on an ESXi datastore(s); version 4 is much more open to the idea of being presented with an HBA and letting the OS work it’s ZFS magic directly on physical disks.

How to Get NexentaStor

NexentaStor is available in three variations- community, trial and enterprise

Enterprise
Fully featured with plugins, varying levels of support, licensed per raw TB. I asked for a quote for a homelab- definitely not a toy.

Trial
As above but with 45 day time limit.

Community
No plugins, support from community forums only and restricted to 18TB raw capacity. Note that a community edition of v5 is also available but is limited to 10TB raw capacity.

Download the 4.0.4 community edition here.

Setup NexentaStore as an ESXi VM

HBA Passthrough

The first task is to make an HBA available for virtual machine use. In vCenter, select the host with physical HBA and disks available, select the configure tab, then PCI Devices. Finally select the desired HBA, then reboot the host to apply changes. You could present NexentaStore with VMDKs but performance will likely take a hit.

VM Creation

Now we can create our virtual machine and prepare for NexentaStore installation.

blah

blah blah

Note- consider dependencies here. Will this NAS be used as VM storage? Will NexentaStore in turn have dependencies on VMs which are stored on itself?

Remeber to select the host with the physical HBA and disks. vMotion will not be possible with PCI passthrough

Add a PCI-Device then select your HBA. Don’t forget to upload and connect the NexentaStor installation ISO

OS family should be Other and Guest OS Version is Oracle Solaris 11 (64-bit)

NexentaStor Installation

Installation is straightforward but in the interests of being thorough, here’s a few screenshots depicting the beautiful GUI you can expect during installation. Note- use ‘space’ to select an option and ‘enter’ to accept and move to the next page

Disconnect the installation media and reboot then accept another licence agreement (you did read it all, right?)

At this point, head to the site mentioned here and enter the machine code. Make sure you use a real email as that’s how the registration key is delivered

Run through the network setup then either head to the address you set in a browser or run the following to do basic setup via NMC

setup appliance init

Create an iSCSI Share

Log in to the GUI at the network address set earlier. Login as ‘admin’, then head to Data Management -> Datasets -> Create Volume. At this point, it really pays to do a bit of reading on ZFS. For a seriously light TL;DR- Raid Z is roughly equivilant to RAID 5, RAID Z2 is RAID 6 and mirror is RAID 1. How ZFS implements this and how to get the most performance from it is worth diving a little more deeply into, but that’s beyond the scope of this article.

I’ve created a RAIDZ2 volume with 6 HDDs and a dedicated SSD for both SLOG and cache

Head to Data Management -> Datasets -> Create ZVOL

Data Management -> Datasets -> Create Target Portal Group. You may utilise the single IP address set during configuration or add additional NICs / IPs if required

Data Management -> Datasets -> Targets, to create an iSCSI target

and finally, Data Management -> Datasets -> Mappings, to tie everything together

Connect to an iSCSI Share from ESXi

Nearly there! It’s time to present storage to ESXi. I’m going to demonstrate this on the vCenter web client, but the process is essentially the same for individual hosts and on the C# client

Select a host, Configure -> Storage Adapters -> Add New Storage Adapter

Under Targets, add the IP address of the NexentaStor appliance- Dynamic Discovery or Static Discovery are both fine. Then click Rescans the host’s storage adapter to discover newly added storage devices. Once this completes you should see the NexentaStore appliance under the Devices tab

Finally, head to the Datastores and add a VMFS datastore on the new device

And that’s it! From here, consider adding dedicated NICs for iSCSI traffic, implementing CHAP or mutual CHAP for a bit of security and tweaking storage parameters to suit your use case.

Leave a Reply

Your email address will not be published. Required fields are marked *