VMware Cloud Community
dwatters
Enthusiast
Enthusiast
Jump to solution

Can't add an NFS share on my ESX host.

When I try to map an NFS share to my ESX host, I get the following error message:

Call "HostDatastoreSystem.CreateNasDatastore" for object "ha-datastoresystem" on ESXi "<HOST_ADDRESS>" failed.

Operation failed, diagnostics report: Cannot open volume: /vmfs/volumes/558537c6-ae971e4d

I can ping it:

~ # vmkping -I vmk1 -s 1472  <NFS_ADDRESS>

PING 192.168.6.200 (192.168.6.200): 1472 data bytes

1480 bytes from <NFS_ADDRESS>: icmp_seq=0 ttl=128 time=0.665 ms

1480 bytes from <NFS_ADDRESS>: icmp_seq=1 ttl=128 time=0.362 ms

NFS Server is Win2008 R2 with NFS server process running.  The share is viewable from the Share and Storage Management snap-in.  The share is configured as read-only, but it's just a repository for .ISO files anyways, so I don't really want it to be writable either. 

Any help would be appreciated. 

1 Solution

Accepted Solutions
tomtom901
Commander
Commander
Jump to solution

Did you configure the Windows NFS share like this?

Screen Shot 2014-03-01 at 21.29.07.png

With the below esxcli command, I could mount the share mentioned above without any issues. Note that I've set the allow root access bit under the permissions of the Advanced NFS sharing. That might resolve your issue if you have not enabled this.

esxcli storage nfs add --host=192.168.1.10 --volume-name=NFS --share=ns

View solution in original post

20 Replies
a_p_
Leadership
Leadership
Jump to solution

>>> The share is configured as read-only,

This might be the issues. What's the file system on the new share? Is it already VMFS? Afaikyou cannot mount other file system as datastores.

André

dwatters
Enthusiast
Enthusiast
Jump to solution

>>>Afaikyou cannot mount other file system as datastores.

WAT?!!?

Isn't that the whole point of NFS?!?  Kinda the middle-man between different file systems?

Reply
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Sorry you are right. I must have been sleeping.

It's probably more the granted permissions which are causing the issue. Please see http://kb.vmware.com/kb/1003967

André

dwatters
Enthusiast
Enthusiast
Jump to solution

So I tried Step 3, and it fails.

nc -z <NFS_ADDRESS> 2049

Can you help me resolve this?

edit: I verified the firewall rules on the NFS server, and port 2049 is open for inbound connections. 

I verified the NFS sharing permissions, everyone can read the folder, even unmapped and anonymous users. Root access is allowed.  I don't know how I can get more open than that. 

Reply
0 Kudos
grasshopper
Virtuoso
Virtuoso
Jump to solution

Hi

King_Robert
Hot Shot
Hot Shot
Jump to solution

just check the permission on the NFS Share and Root is allowed and everone and Read only and Root has Read and Write access.

dwatters
Enthusiast
Enthusiast
Jump to solution

Here what I get when I try the command:

~ # grep -i nfs /var/log/vmkernel.log

~ #

In the NFS sharing tab on the Windows server, no users are specified.  I've allowed "unmapped access" and allowed "anonymous" access.  When I view the "permissions" tab, "ALL_MACHINES" have read-only access and root is allowed. 

The share cannot be mounted by other 'nix machines, so I know I'm doing something wrong.  However, I don't know where to look to figure out where I went wrong.

Reply
0 Kudos
grasshopper
Virtuoso
Virtuoso
Jump to solution

Please ensure that you reproduce the problem by attempting to connect to the datastore before searching the logs for the error.  If the logs have rolled over you would need to use a different approach (i.e. 'zcat' against the vmkernel log in /scratch/logs/, for example).  Just ensure you reproduce and then check (much easier).  You should see something.  Also you may consider putting the free Wireshark sniffer on the Windows server to review traffic.

I'm afraid I won't be much help on a Windows NFS as I only support NFS on production grade filers or at least on a linux distro / appliance such as OpenFiler (common in labs).  If you want a low impact test of using a linux appliance for your NFS needs, you can install it on VMware Workstation (i.e. on top of that Windows server, unless it's production).  You can get a 30 day trial for Workstation and the Openfiler is free.  Lots of docs on the web about this, probably not much about Windows :smileysilly:

dwatters
Enthusiast
Enthusiast
Jump to solution

~ # grep -i nfs /var/log/vmkernel.log

2014-02-27T15:11:42.657Z cpu1:12234453)NFS: 157: Command: (mount) Server: (<NFS_HOSTNAME>) (<NFS_IPADDRESS>)  Path: (esxnfs) Label: (<STORAGE_NAME>) Options: (ro)

2014-02-27T15:11:42.659Z cpu0:33489)WARNING: NFS: 221: Got error 2 from mount call

2014-02-27T15:11:42.659Z cpu1:12234453)NFS: 190: NFS mount <NFS_HOSTNAME>:<NFS_SHARE> failed: The mount request was denied by the NFS server. Check that the export exists and that the client is permitted to mount it.

We have a large file server, and there are all sorts of ISO's on there.  I was hoping to re-use the infrastructure we already have to build-up new projects. 

Reply
0 Kudos
grasshopper
Virtuoso
Virtuoso
Jump to solution

dwatters wrote:

We have a large file server, and there are all sorts of ISO's on there.  I was hoping to re-use the infrastructure we already have to build-up new projects. 

I see, that makes sense.  Yeah that does sound like a good use case.  We can see that the error is access denied, but that could also be caused by an incorrect path.  You may need to prefix that share location with something like /vol/yoursharename.  Hopefully someone here can help further.  Also, perhaps MS support can assist since it's technically running on their product.

dwatters
Enthusiast
Enthusiast
Jump to solution

Yeah, there's a lot that's "supposed" to be done on the Windows side.  However, most of it is user credentials/ and mapping users to groups and/or mapping 'nix users to local users... Useless since I just want anonymous, READ ONLY access... So frustrating. 

Thank you very much for your time and assistance. 

Reply
0 Kudos
admin
Immortal
Immortal
Jump to solution

Something simple you may want to check - NFS mounts are case sensitive. (apologies if you've already done this but I have seen some very experienced people get caught out by this in the past)

pacifierz
Contributor
Contributor
Jump to solution

May be you have exceeded the maximum number of NFS datastores on the ESX.

How many datastores does the ESX server already has?

Navigate to Configuration > Software > Advanced Settings > NFS > "NFS.MaxVolumes"

Check the value of "NFS.MaxVolumes" (default is set to '8'). In case you already had 8 datastores assigned to the ESX, you won't be able to map anymore.

Try increasing the value

ESXi/ESX 3.x: Set NFS.MaxVolumes to 32

ESXi/ESX 4.x: Set NFS.MaxVolumes to 64

ESXi 5.0/5.1/5.5: Set NFS.MaxVolumes to 256

Reply
0 Kudos
dwatters
Enthusiast
Enthusiast
Jump to solution

I don't have any other NFS datastores.  The only storage for the host is local storage.

I did think to look at the case of the share. I often forget that.  Thanks for the reminder though.

Reply
0 Kudos
tomtom901
Commander
Commander
Jump to solution

Did you configure the Windows NFS share like this?

Screen Shot 2014-03-01 at 21.29.07.png

With the below esxcli command, I could mount the share mentioned above without any issues. Note that I've set the allow root access bit under the permissions of the Advanced NFS sharing. That might resolve your issue if you have not enabled this.

esxcli storage nfs add --host=192.168.1.10 --volume-name=NFS --share=ns

dwatters
Enthusiast
Enthusiast
Jump to solution

It's the same except for the radio button.  I have "Allow anonymous" selected instead.  I'll try it your way now.  Thank you very much!

Reply
0 Kudos
tomtom901
Commander
Commander
Jump to solution

Sure, let me know!

dwatters
Enthusiast
Enthusiast
Jump to solution

WOO HOO!!!!  That did it!  Thank you all very much for your help!

Reply
0 Kudos
davemays
Contributor
Contributor
Jump to solution

I had a simular error and in 2012 it gets more picky about UDP versus TCP NFS shares. I wrote a blog entry about it here DaveOnline: Using Windows 2012 NFS with VMware ESX