Doug_Walcutt
Contributor
Contributor

Setting up NFS Shares on a Windows 2003 Storage Server R2

I wish to setup NFS shares on an HP StorageWorks All-in-One AOi400 that is rinning Windows Storage Server 2003 R2. Attached to the AOi400 is an MSA 50 drive array.

My problems are as follows:

1. Although VMware's documentation wasn't very useful, I have managed to add the storage using VIC 2.5, to the ESX 3.5 server I want to have access to it and I can see the share, browse it but when browse the datastore and try to upload ISO images to it, I get a message stating that the I was unable to login to the NFC server.

2. I'm using Windows Storage Server 2003 R2's Services for NFS and tried to map user accounts but I'm totally stumped by NIS server side of the dialog box. The WSS server is a member of an AD domain but I'm not using AD authentication and don't want to extend the domain schema to do so. I've no idea how to setup a NIS server and some of the information I've been able to obtain googling the errors I've been getting seem to indicate that I just need to setup the shares and mount them on the ESX server.

I'd very much appreciate a clear, definitive guilde or instructions on how to do this.

0 Kudos
13 Replies
Texiwill
Leadership
Leadership

Hello,

Check out http://www.astroarch.com/wiki/index.php/Setting_up_Windows_Services_For_UNIX_%28SFU%29_NFS for assistance.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education. As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XII: 2009-2020,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
Doug_Walcutt
Contributor
Contributor

Followed the procedures from the link you provided, but now everytime I try to upload files to that datastore, the server crashes and when I log back into it, I get a "send to MS" error dialog thats states that a critical stop occurred due to device driver.

I assume that I have to use VC's datastore browser to upload the files or ESX won't recognize them as being there.

0 Kudos
Texiwill
Leadership
Leadership

Hello,

Well that is certainly odd. I have no problems putting VMs or any files on that share from any source. How are you uploading files to the datastore and what types of files are you using? Remember if its VMs, they either need to be thick files, or 2gbsparse files.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education. CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354, As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XII: 2009-2020,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos
Doug_Walcutt
Contributor
Contributor

The files are ISO image files and I'm using the datastore upload option to upload the files, I assume thats some form of tftp.

0 Kudos
Texiwill
Leadership
Leadership

Hello,

Datastore upload is over its own port and protocol that goes to the ESX server over the same ports used by VC. It would be faster just to go straight to the share on the server using CIFS/SMB. As there are less entities involved. I.e. no NFS, etc.


Best regards,

Edward L. Haletky

VMware Communities User Moderator

====

Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education. CIO Virtualization Blog: http://www.cio.com/blog/index/topic/168354, As well as the Virtualization Wiki at http://www.astroarch.com/wiki/index.php/Virtualization

--
Edward L. Haletky
vExpert XII: 2009-2020,
VMTN Community Moderator
vSphere Upgrade Saga: https://www.astroarch.com/blogs
GitHub Repo: https://github.com/Texiwill
0 Kudos
Michael_msft_
Contributor
Contributor

Hi Doug,

I think I can give you a hand with your setup. One things I do want to mention, though, is please do not install SFU 3.5 on the Storage Server Machine. You will have two sets of nfs binaries on the box and this could get complicated. 3.5 ran fine on vanilla 2003 but with R2 and Storage Server NFS is there for you (with some updates that weren't in 3.5).

What you've got (correct me if I'm wrong and I'll update this):

Storage Server with R2

ESX Linux System

What you might need (I'll explain this in a bit):

An MSNFS Mapping Server.

1) In order to connect to an 2003R2 based Microsoft NFS Server you will need a mapping solution to conver UNIX users and groups to Windows Users and groups and vice versa. These will come in one of two forms Active Direcotry (which we've ruled out) or a User Name Mapping Service. NIS can be difficult to work with, so we'll avoid using that. The mapping server can be set up on the Windows Storage Server machine but I would recommend against that as it sounds like the machine may be under heavy load at times and we might not want the nfs service and mapping service competing for resources. If you aren't concerned about this, then it can be done. If you are, set up a second Windows Server 2003 R2 computer and add the Fileserver role with the Microsoft Services for NFS feature. The Storage Server will have this feature pre-installed. The following steps are are to be run on which ever machine you intend to use as the mapping server and are the same on either machine:

1) Copy the /etc/passwd and /etc/group files from your ESX server to the machine you are going to use as the mapping server. Anywhere will do, but %sysdrive%:\Windows\msnfs\pcnfs\ is the convention

2) Run Start > Administrative Tools > Services for Network Filesystem

3) In the nfsmgmt window right click on the "User Name Mapping" root and select "Properties"

4) Select the option to "Use Password and Group files" and enter the paths for these files in the text boxes below. Click "OK"

5) Back in nfsmgmt window expand the "User Name Mapping" root to reveal "User Maps" and "Group Maps"

6) Right click on "User Maps" and select "Create Map"

7) In the "Create Advanced User Mapping" window select your domain or, if you prefer, your local machine from the "Windows Domain" drop down

😎 Click the "List Windows Users" and "List Unix Users" buttons to display lists of the available users for mapping

9) Select the the windows user and unix user from each list that you wish to map together and click "Add". Repeat this for as many user pairs as you would like and then click "close."

10) Right click on "Group Maps" and select "Create Map"

11) Repeat steps 7-9 for groups

12) Run Start > Run > notepad \windows\msnfs\.maphosts to edit the maphosts file. This file will allow machines access to the mapserver via domain name or IP. If unedited only the machine the mapserver is running on will have access which will work just fine if you are running on the storage works machine and that is the only machine on which you need access.

Your mapping server configuration is now complete. (That's the difficult part). Now you must configure your nfs server to use the mapping server. On you Windows Storage Server machine run the following:

1) If you used the local machine as the mapserver run "nfsadmin mapping config maplookup=yes mapsvr=localhost" otherwise run "nfsadmin mapping config maplookup=yes mapsvr=<mapserver>" with the name of the mapserver

You should be all set and ready to go. To verify that mapping is configured, log in to the Storage Server machine with a windows user that is in the mapping server, mount an nfs share on any machine with "mount * nfsserver:/nfsshare" and then run the mount command again with no arguments to display the shares. The output of the second mount command should look like this:

Local Remote Properties

-


Z:
server\share UID=54321, GID=9876

rsize=32768, wsize=32768

mount=soft, timeout=0.8

retry=1, locking=yes

fileaccess=755, lang=ANSI

casesensitive=no

If your UID and GID are -2 and -2 then mapping is not working. If it is showing up as your mapped UID and GID you're good to go. For more information on connecting to a mapping server follow this link:

http://technet2.microsoft.com/windowsserver/en/library/466be05c-48eb-4508-b3b6-ff7b6d1e61b21033.mspx...

One last note I'd like to add. When creating the NFS shares on the windows box be sure that the Windows User(s) in the mapping server has the neccessary permissions on the directory. This is something that is easilly overlooked.

Thanks Doug, drop back here if you have any issues.

0 Kudos
stoddmi
Contributor
Contributor

I have an issue with this as well, but...

I am creating a test environment with Free EXS 3.5 U4, and I am trying to connect to a dell powervault server. I am using the free version of esx 3.5U4 and can't connect to it using telnet/SSH.

Any work arounds for getting /etc/passwd and /etc/group? It seems the free version is extremely limited in regards to configuration.

Can I just create the 2 files? if so would anyone have a syntax example?

Thanks,

Mike Stoddard

I LOVE LAMP!
0 Kudos
stoddmi
Contributor
Contributor

Okay..

i figured out what I needed to do. (i created a linux server with the same u & p.

I did a cat of /etc/passwd and /etc/group, copied and pasted to a new file.

All is well. Thanks!

Mike

I LOVE LAMP!
0 Kudos
AlbertWT
Virtuoso
Virtuoso

Hi Stod,

where did you copied the files into ? /etc/passwd and /etc/group ?

Kind Regards,

AWT

/* Any kind of comment or input would be greatly appreciated */
0 Kudos
asatoran
Immortal
Immortal

where did you copied the files into ? /etc/passwd and /etc/group ?

Look at Micheal's post above:

1) Copy the /etc/passwd and /etc/group files from your ESX server to
the machine you are going to use as the mapping server. Anywhere will
do, but %sysdrive%:\Windows\msnfs\pcnfs\ is the convention.

IOW, copy the files from the ESX server to the Windows server.

0 Kudos
vm_arch
Enthusiast
Enthusiast

Word to the wise:

I have learnt to HATE NFS on windows...

R2 has an additional 'feature' that bugs several people I know... that if you use MS-Services for NFS for the User Name Mapping it will occasionally (and randomly) just lock up (and your ESX Hosts lose visibility of the directories in the NFS stores). You then have to restart the User Name Mapping Service on the Windows box... only to find that either the User or Group mappings have mysteriously vanished. Recreate them and all of a sudden the ESX hosts can 'see' again.

I know of at least three implementations here that all have this little feature. Pre-R2 doesn't seem to do it with such regularity.

0 Kudos
LucasAlbers
Expert
Expert

Every time the words "windows and nfs server" appear in a posting it always ends poorly.

Anecdotally from the posts I've read inevitable they end up with a reliability problem.

0 Kudos
DavidHazar
Contributor
Contributor

If you are going to use Windows Storage Server and VMWare ESX, make sure you install the hotfixes referenced here:

0 Kudos