Configure NFS shares in Openfiler for your vSphere homelab

November 30, 2010 — 33 Comments

Even if you have access to the enterprise-class storage appliances, like the HP P4000 VSA or the EMC Celerra VSA, an Openfiler storage appliance can be a great asset to your homelab. Specially if you, like myself, run an “all virtual” homelab within VMware Workstation, since Openfiler is by far less resource hunger than its enterprise counterparts.

Simon Seagrave (@Kiwi_Si) from TechHead.co.uk wrote an excellent article explaining how to add iSCSI LUNs from an Openfiler instance to your ESX/ESXi servers, if iSCSI is your “thing” you should check it.

In this article I’ll explain how-to configure a NFS share in Openfiler and then add it as a datastore to your vSphere servers. I’ll take for granted that you already have an Openfiler server up and running.

1 – Enable NFS service

As always point your browser to https://<openfiler_address&gt;:446, login and from the main screen go to the Services tab and enable the NFSv3 service as shown below.

2 – Setup network access

From the System tab add the network of the ESX servers as authorized. I added the whole network segment but you can also create network access rules per host in order to setup a more secure and granular access policy.

3 – Create the volumes

The next step is to create the volumes we are going to use as the base for the NFS shares. If like me you’re a Unix/Linux Geek it is for sure that you understand perfectly the PV -> VG -> LV concepts if not I strongly recommend you to check the TechHead article mentioned above where Simon explained it very well or if you want to go a little deeper with volumes in Unix/Linux my article about volume and filesystem basics in Linux and HP-UX.

First we need to create the physical volumes; go to the Volumes tab, enter the Block Devices section and edit the disk to be used for the volumes.

Create a partition and set the type to Physical Volume.

Once the Physical Volume is created go to the Volume Groups section and create a new VG and use for it the new PV.

Finally click on Add Volume. In this section you will have to choose the new VG that will contain the new volume, the size, name descrption and more important the Filesystem/Volume Type. There are three type:

  • iSCSI
  • XFS
  • Ext3

The first is obviously intended for iSCSI volume and the other two for NFS, the criteria to follow here is the scalibility since esxt3 supports up to 8TB and XFS up to 10TB.

Click Create and the new volume will be created.

4 – Create the NFS share

Go to the Shares tab, there you will find the new volume as an available share.

Just to clarify concepts, this volume IS NOT the real NFS share. We are going to create a folder into the volume and share that folder through NFS to our ESX/ESXi servers.

Click into the volume name and in the pop-up enter the name of the folder and click Create folder.

Select the folder and in the pop-up click the Make Share button.

Finally we are going to configure the newly created share; select the share to enter its configuration area.

Edit the share data to your suit and select the Access Control Mode. Two modes are available:

  • Public guest access – There is no user based authentication.
  • Controlled access – The authentication is defined in the Accounts section.

Since this is only for my homelab I choose Public access.

Next select the share type, for our purposes case I obviously choose NFS and set the permissions as Read-Write.

You can also edit the NFS options and configure to suit your personal preferences and/or specifications.

Just a final tip for the non-Unix people, if you want to check the NFS share open a SSH session with the openfiler server and as root issue the command showmount -e. The output should look like this.

The Openfiler configuration is done, now we are going to create a new datastore in our ESX servers.

5 – Add the datastore to the ESX servers

Now that the share is created and configured it is time to add it to our ESX servers.

As usually from the vSphere Client go to Configuration -> Storage -> Add storage.

In the pop-up window choose Network File System.

Enter in the Server, Folder and Datastore Name label.

Finally check the data and click finish. If everything goes well after a few seconds the new datastore should appear.

And with this we are finished. If you see any mistake or have anything to add please comment :-)

Juanma.

33 responses to Configure NFS shares in Openfiler for your vSphere homelab

  1. 

    Excellent. I have been trying to get this working for days and I followed this article and had it working in minutes.

    Nice one. Thanks

  2. 

    Just wanted to say that this was a life saver – got me through perfectly!

    Thanks a ton!

  3. 

    Any idea if it’s possible to use showmount from an ESX service console? I’ve tried a showmount -e but it times out, even with the firewall disabled. I’ve already enabled the portmapper service. I know the service console is separate to the vmKernel but this is my standard diagnostic process (we’re increasingly a Linux shop) – if I can get it working on ESX then the rest of my team don’t need special troublehshooting instructions.

    I know I could use esxcfg-nas -l.

    thanks,

    Ed.

    • 

      Hi Ed thanks for the comment. Regarding your question, yes it’s possible to use showmount from the ESX COS, since it’s based on Linux and showmount is a Unix standard command.

      However the timeout issue you described is perfectly normal in a ESX server if you use “showmount -e” without any more arguments because by default showmount will try to query localhost and the ESX should not be exporting anything. To get NFS exported shares from the Openfiler server you should use “showmount -e OPENFILER_IP_ADDRESS”.

      But this command will show every NFS shares exported in the Openfiler server that the ESX server is authorized to access not which of them are configured as datastores.

  4. 

    Hi,

    What about NFS performance? can you give me some hints to achieve higher read/write in my VMs. I have both physical OF and Virtual OF

    • 

      Hi Hussain, thanks for the comment. I currently run OF as a VM and to be sincere I don’t run high loads on it, just to provide a bunch of iSCSI LUNS and NFS shares for my labs. However best thing to improve I/O is going to a faster disk, SSD if possible.

      Regarding NFS with vSphere, VMware NFS Best Practiced whitepaper is worth a read (http://www.vmware.com/files/pdf/VMware_NFS_BestPractices_WP_EN.pdf), hope this helps.

      • 

        Hello Juan,, Thank you very much for this link. I’m testing the OF NAS on VM on old PE2850, PE 2650, DL380 G3 and DL380 G6.

        I will go through the paper provided and I will try to hit a decent speed.

        Any tips or tricks will be highly appreciated.

        Thanks once again.
        S.Hussain

  5. 

    Hi once again,

    All the past days, I was testing the OF NFS on a VM. Here’s the screen shot of disk performance on one of the VM that is hosted on the vNFS Datastore on the Same ESX Host.

    Is it decent?
    http://imageshack.us/photo/my-images/857/nfsattoperformancejpep.png/

  6. 

    Great post! Unfortunately I just put together exactly the same thing from a number of Openfiler forum posts and a lot of trial and error before I came across it. Just typical!

    I’ve now bookmarked it for futur reference – thanks!

    • 

      Thanks for the comment Nigel! I’m glad you liked, yes that’s very typical and we all do it, but it’s also a nice way to learn :-)

      BTW I also like dance/electronic music ;-)

  7. 

    Awesome Post! Bang On, followed these instructions and they worked great, even with version 2.99…Thanks for this!

  8. 

    Version 2.99 NAS works perfect in ESXi5. Have you try iscsi in ESXi5? The software iSCSI adpater can not find the volume after scan.

    Thanks!

    Ray.

  9. 

    Thanks for a great how-to. Your effort is much appreciated!

  10. 

    Hello and thank you to the author of this article – Juan Manuel! I have been trying to get my lab working for days, hence I couldn’t use the DRS, FT, and Storage vMotion in my VMware lab just due to the lack of an NFS datastore and heartbeat datastore. Thanks a lot for your help mate!

  11. 

    Thank you so much for your great work that saves me a lot of time.

  12. 

    Hi Friends,

    To help you all I created a video to add storage to ESXi server and link of the same is given below. http://www.youtube.com/watch?v=Ggm6m-lGsas to see more videos you can visit http://www.prohut.net/blogging/videos/.

  13. 

    Soon autumn, hurry to say goodbye to summer!).

  14. 

    wow..excellent artcile….thanks a lot guys..

  15. 

    great man , this is really helpful :)

  16. 

    Great walk through guide. This helped me get some shared storage configured in my VMware lab. Many thanks!

  17. 

    hi guys
    I followed the step it works out of box , but the VM mirgation , starts till 30% and then time out, any clue? on this

  18. 

    You may have wide selections of surround speakers since there are various types being sold inside market.
    Technology and engineering methods are constantly evolving.
    If there is certainly any question which material must be used, it is better to hold to the original material in order to match the sister speaker.

  19. 

    Thanks This help :-)

  20. 
    josephturley July 11, 2014 at 22:19

    Very helpful at a critical time. Thank you!

  21. 

    Hello Juanma,

    thanks for this article. But still I have a question about the make_share screen. On that screen are three options 1. make share, 2. make home share And 3. delete folder. Could you tell me the difference between option 1 and 2??

  22. 

    Every time I switch to public access and change the share permission to RW and hit update it goes back to No

  23. 

    Great blog! Any chance you could comment on the inability to extend a partition in the GUI? I’ve looked all over the place and there is clearly a bug in OF that you cannot extend a partition. Some suggestions of changing the starting cylinder in the GUI works but I still cannot extend my partition. Not being a Linux guy, I dont know the CLI very well but would attempt it if I could actually find a good article showing how to do it the CLI. Very frustrated at the lack of info out there :(

Trackbacks and Pingbacks:

  1. My Home VMware Lab | vHersey - December 8, 2011

    […] Openfiler as an iSCSI target. Here is one and here is another one. To configure Openfiler for NFS check this article or this […]

  2. ESXi 5.1 Home Lab Initial Setup « JamesScanlonITKB - December 2, 2012

    […] NFS: https://jreypo.wordpress.com/2010/11/30/configure-nfs-shares-in-openfiler-for-your-vsphere-homelab/ […]

  3. Lab Storage Changeover. iSCSI to NFS. | Moif - June 19, 2014

    […] installation for myself. 2. Install and configure Openfiler using this awesome guide by @jreypo: https://jreypo.wordpress.com/2010/11/30/configure-nfs-shares-in-openfiler-for-your-vsphere-homelab/ – you’re going to want to create two datastores to satisfy HA heartbeat requirements so […]

  4. لابراتوار خانگی VMware - راهکارهای جامع دیتاسنتر - June 20, 2016

    […] Openfiler as an iSCSI target. Here is one and here is another one. To configure Openfiler for NFS check this article or this […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s