Even though ISCSI/SAN protocols are used for storage traffic in most datacenters, NFS could as well be a good solution at times. Tintri SAN uses NFS as the default datastore, so let’s see how to set up an NFS datastore onto a host.
The first step in preparing an esx host for accepting NAS datastore is setting up a VMKernel adapter.
Here in this series, we will do all the SAN/NAS configurations on the Distributed switch and our storage array will be an OpenmediaVault.
High-level Overview:
In the high-level overview, we first prepare the host to receive NFS traffic by binding a network adapter on the esx host to a network on the storage array.
-
- Log in to your VMware ESXi via vSphere Client
- Go to the DV Switch Section
- Create a new port group as DPortGroup-vmk-SAN. In my lab, my NAS server is on VLAN50.
- MTU value depends on your network environment. Typically MTU of 1500 is set for a 1GbE/ management and 9000 is set for a 10-25GbE/ storage network.
- The next step will be to bind a VMkernel adapter to the port group
- Set a Static IP on the Storage VMkernel Adapter
- Now you will have a VMkernel adapter ready for connecting to our NAS or ISCSI storage
- Mount the NAS storage to the esx host
- Create a new datastore
- Remember that esx supports NAS 3.X and NAS 4.1, there are fundamentally major differences between these two versions and as we hit the troubleshooting section, we will discuss the common pitfalls.
Summary of the High-level
Virtual Switch layout
DV Switch | NAS Portgroup | VLAN | MTU | IP Address |
sfo-m01-cl01-vds01 | DPortGroup-vmk-SAN | 50 | 9000 | 172.16.50.105 |
Storage layout
Storage Array | IP Address | VLAN | MTU |
Mediafiler | 172.16.50.50 | 50 | 9000 |
Attach new host to the DV Switch Section
Go to the distributed switch
Add VMkernel Adapter
Connect the VMKernel adapter to esx host
Click Next
Configure VMkernel adapter
Add IP address for the VMkernel adapter
Click Next to continue
ESX host view showing vmkernel adapter is bound
Map the storage from host
In this case i am using mediavault as my NAS storage but the concept of mapping NFS to esx remains the same.
In my storage mappings I’ve allowed all clients from my VLAN 50 to have access to NAS array and I’ve also added rw,no_root_squash as the attribute for connection
If you had chosen the Windows route to create a NFS share, this wil be the permissions required for the share.
I’ve created a 1TB RAID on my Mediavault and we will be using this to carve out our NFS datastore.
On the mediavault, i’ve created an interface on vlan50 which is the adapter we will using for NAS traffic
With everything now in place, all thats now left is mount the NFS datastore to the esx host