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.
Did you configure the Windows NFS share like this?
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
>>> 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é
>>>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?
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é
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.
Hi dwatters,
- Please ensure that the name you are adding is not greater than 42 characters in length.
- Also notable, typically the fix for NFS volumes served up by Windows is a reboot of the Windows server
- Perform the following from an ssh session on the ESXi host to help determine root cause
grep -i nfs /var/log/vmkernel.log
- Consider using tcpdump-uw (included with ESXi) to dig deeper
- If all else fails consider using the OpenFiler (free). Much better than Windows
just check the permission on the NFS Share and Root is allowed and everone and Read only and Root has Read and Write access.
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.
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:
~ # 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.
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.
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.
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)
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
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.
Did you configure the Windows NFS share like this?
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
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!
Sure, let me know!
WOO HOO!!!! That did it! Thank you all very much for your help!
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