vSphere Lab-in-a-Box 12: Set up NFS

In this post we will configure the OpenFiler server for NFS and connect the virtual ESXi servers to it.

Configure OpenFiler

Open the web interface and go to Services.  Click Enable next to NFSv3 server.

Lab-in-a-Box-12-nfs-setup-01

Go to Volumes.  Click on Block Devices on the right, then click on /dev/sdc.

Lab-in-a-Box-12-nfs-setup-02

Scroll down and click on the Create button, to create a partition using the whole of the /dev/sdc disk.

Lab-in-a-Box-12-nfs-setup-03

Click on Volume Groups on the right.  Give the volume group a name, tick the box next to /dev/sdc1 and click the Add volume group button to create the volume group.

Lab-in-a-Box-12-nfs-setup-04

Next click on Add Volume on the right.  From the drop down list, select vg_nfs and click Change.

Lab-in-a-Box-12-nfs-setup-05

Scroll down and give the volume a name and descriptionMove the slider all the way to the right to use all the space, and leave the Filesystem Type on XFS.  Click Create to set up the volume.

Lab-in-a-Box-12-nfs-setup-06

Go to Shares, then click on NFS Volume.

Lab-in-a-Box-12-nfs-setup-07

In the pop-up window, enter a name for the new sub-folder and click Create Sub-Folder.

Lab-in-a-Box-12-nfs-setup-08

Now click on that sub-folder name and click the Make Share button.

Lab-in-a-Box-12-nfs-setup-09

Scroll down to Share Access Control Mode and select Public guest access.  Click Update.

Lab-in-a-Box-12-nfs-setup-10

Scroll down further to Host access configuration and under the NFS section, click RW for the Storage Network.  Click Update to finish.

Lab-in-a-Box-12-nfs-setup-11

Make a note of the share name (/mnt/vg_nfs/vol_nfs/shared_nfs/ in my environment).

 

Configure Virtual ESXi Servers

Open the vSphere Client, select your first virtual ESXi server and click ConfigurationStorageAdd Storage…

Lab-in-a-Box-12-esx-setup-01

Choose Network File System and click Next.

Lab-in-a-Box-12-esx-setup-02

Enter the IP address of the OpenFiler server, the folder you made a note of above, and give the datastore a name, before clicking Next.

Lab-in-a-Box-12-esx-setup-03

Click Finish to complete and wait for the datastore to appear in the list of datastores attached to the virtual ESXi server.

Perform the same steps for the second virtual ESXi server.

 

This concludes the setup of NFS in our lab environment.  In the next post, we will set up a server on the virtual ESXi host and make use of both shared datastores.

 

Lab-in-a-Box Series:
01 Introduction
02 ESXi Installation on Physical Hardware
03 Installation of vSphere Client
04 Lab Host Configuration
05 Domain Controller Setup
06 Domain and Related Services
07 Configuration of Virtual ESXi Servers
08 vCenter Server Setup
09 vCenter Server Configuration
10 Set up OpenFiler NAS
11 Set up iSCSI
12 Set up NFS
13 Set up Secondary Domain Controller
14 vMotion Tests