Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

0

Many choose to use NFS as opposed to iSCSI in their VMware vSphere environments.  NFS has a lot of benefits and use cases particularly when we look at the efficiency of NFS.  With NFS there is no encapsulation that needs to take place as there is with iSCSI.  Like iSCSI, NFS can use an existing IP network as well.  So, starting off simple here, let’s take a look at how to configure FreeNAS 9.10 NFS VMware ESXi 6 datastore.

Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

The specific version of FreeNAS I am using is 9.10.2 U3 and is the most recent GA version on the FreeNAS site at the time of this writing.  I am not covering here the setup of FreeNAS in general.  You will want to provision your storage and your network connectivity on the appliance itself.  For the purposes of the post, I am running FreeNAS as a VM which is a great way to play around with iSCSI and NFS in a lab.  I have setup a management IP as well as another interface that I have bound for NFS connectivity.

To turn on NFS, you need to go to Services and toggle the switch to ON for NFS.  Also, once you flag on the switch, click on the “wrench” icon to configure the NFS service.

freenas_nfs01 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Once we click on the wrench icon, we get another box with more we can configure.  Really, for basic NFS setup, all we really need to set here is select which IP address we want to bind to the service.  So we check the IP under the Bind IP Addresses.

freenas_nfs02 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Now, let’s setup our storage we are going to use for NFS.  Go to Storage and click the Volume Manager button.

freenas_nfs03 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Here we name our volume. Then add the available disks we want to use by clicking the “plus” sign next to the drive.  Click the Add Volume button.  ***Note*** this will erase any existing data.

freenas_nfs04 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Next, we go to Sharing which is where we actually setup our NFS share.  Go to Sharing >> UNIX (NFS) >> Add Unix (NFS) Share.
freenas_nfs06 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Click the Browse button.

freenas_nfs07 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

When we click the Browse button, we can browse to our volume mount.  Click the Advanced Mode button.

freenas_nfs08 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Under the Advanced Mode view, we can specify the Authorized networks as well as Maproot User which is the credentials of the specified user used for remote access.  I have root selected here.

freenas_nfs09 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Now we see our path specified in the NFS share.

freenas_nfs09a Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

VMware Setup

Next, let’s take a look at setting up our VMware configuration to connect to the NFS share.  We need to create a vmkernel port IP address which will be used to connect to the NFS server and share.  I am simply using the existing standard vSwitch on which I have iSCSI vmkernel port groups already provisioned on for the purposes of the lab.  So we create a new network and select VMkernel as the connection type.

freenas_nfs10-300x222 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Here we name the VMkernel port group.

freenas_nfs11-300x221 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Next, we need to assign an IP address that has connectivity to the NFS server and share.

freenas_nfs12-300x222 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Finally, we finish out of the add network wizard.

freenas_nfs13-300x221 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Now, we simply need to Add Storage to our server.  Click the Add Storage button in the Storage configuration.

freenas_nfs16-300x112 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Next, we select Network File System.

freenas_nfs17-300x234 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Next, we point our VMware ESXi host to the NFS server IP and also the folder which we want to point to.  The folder should look familiar as this is the path in the Add Unix (NFS) share configuration.

freenas_nfs18-300x234 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Finally, we finish out of the Add Storage wizard.

freenas_nfs19-300x234 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Alas, if we check our storage configuration, we should see our new NFS datastore mounted.

freenas_nfs20 Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore

Thoughts

NFS is a great lightweight protocol that can be effectively used for creating VMware NFS datastores.  As shown here, to configure FreeNAS 9.10 NFS VMware ESXi 6 datastore only requires a few steps on both sides and is simple and quick to complete.  FreeNAS is a great piece of software to run and test real storage protocols and applications in a lab environment and otherwise.  So, grab a copy of FreeNAS and start playing around in your home lab with NFS and iSCSI.