Configuring FreeNAS 8.3 – iSCSI and NFS Storage for VMware vSphere

14th May 2013 6 By Simon

This post will guide you through the configuration of FreeNAS 8.3 for use on VMware vSphere.

It is assumed at this stage that only the installation has been completed, we still need to create and configure the storage.

Log in to the web console of the FreeNAS server and browse to the Storage tab.

image

image

Expand the Volumes and click on View Disks

image

Here we can see that we have 4 drives attached to the HP Microserver that can be used for storage purposes. Now click on Volume Manager.

image

Choose the required disks (in my case I am going to use all four.

image

Choose your volume name, remember that this name is case sensitive so I would stick with lower case. Choose the file system (I used ZFS in this case because it allows for future expandability should it be required). Choose whether you want to mirror, stripe or raid (RAID-Z is essentially RAID 5 and RAID-Z2 is essentially RAID 6), click Add Volume.

image

We can see now that we have a volume of 2.7TB available for use Smile

iSCSI Configuration

Now we are going to configure FreeNAS for iSCSI. Click on the Services and Control Services tab.

image

Click the little wrench next to iSCSI.

image

You can change the Base Name if you want but unless there is a specific reason leave it alone. Click on the Portals Tab.

image

If you want enter a comment (it doesn’t matter if it’s left blank). Then use the drop down button to choose your Portal IP address, in this case I have left it as 0.0.0.0 but the other choice would be the actual IP address of the server, if you have multiple NICs present you would choose the IP address you need.

Next we need to choose the extent, this can be either a Device Extent or a File Extent. A device extent allows a raw partition (volume) to be exported via iSCSI whilst a file extent allows you to export a portion of a volume for use. In practice, a file extent outperforms in reads/writes but this is only noticeable at 10 GB Ethernet speeds or higher. For high performance, file extents are recommended at this time.

In my case I went for a file extent because I don’t have any unused RAW disks in my NAS box.

image

Because it’s a file extent that means creating a file (called extent1) and placing it on the volume.

image

Now we are going to add the initiator (in our case it would be the ESXi servers). Because this is a small home lab I don’t need to worry about security but in a production environment you would want to ensure that you’re using limiting access to only authorised devices and networks.

image

The next step is to create the Target, choose the correct Portal and Initiator groups, again because I am not worried about security I am not using any authentication but you may well need to use CHAP in your environment.

image

Now that we have the target and extents created we are going to map them together. If you had multiple extents you could also map them to the single target providing multiple present LUNS to the ESXi servers.

image

Now go back to the Services tab and enable the iSCSI service.

You are now presenting an iSCSI share.

NFS Configuration

Now it’s the turn of configuring FreeNAS for NFS shares, this time it’s relatively quick and painful.

image

Go to the Sharing tab and click Add Unix (NFS) Share

image

Now add the Authorised Network and Hosts (in this case I have said that the entire class C address is allowed), set root as the Maproot user and define the share path (/mnt/vol1).

You are now presenting an NFS share.

Conclusion

Now log on to the vSphere client and configure the storage for either NFS or iSCSI depending on what you set up.