Configure FreeNAS 9.10 NFS VMware ESXi 6 datastore
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.
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.
Now, let’s setup our storage we are going to use for NFS. ย Go toย Storage and click theย Volume Manager button.
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.
Next, we go toย Sharing which is where we actually setup our NFS share. ย Go toย Sharing >> UNIX (NFS) >> Add Unix (NFS) Share.
Click theย Browse button.
When we click the Browse button, we can browse to our volume mount. ย Click theย Advanced Mode button.
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.
Now we see ourย path specified in the NFS share.
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.
Here we name the VMkernel port group.
Next, we need to assign an IP address that has connectivity to the NFS server and share.
Finally, we finish out of the add network wizard.
Now, we simply need toย Add Storage to our server. ย Click theย Add Storage button in theย Storage configuration.
Next, we selectย Network File System.
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.
Finally, we finish out of theย Add Storage wizard.
Alas, if we check our storage configuration, we should see our new NFS datastore mounted.
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.