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.
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.
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.
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.