How can I connect my file gateway's NFS file share to my Windows server?
Last updated: 2020-07-10
I created a file gateway on AWS Storage Gateway. My file gateway uses VMware ESXi as the host platform. How can I connect a Network File System (NFS) file share to my Windows Server 2016 client?
Important: These steps are specific to environments running in AWS, such as environments that use Amazon Elastic Compute Cloud (Amazon EC2) instances or on-premises servers that are connected to AWS.
Create the file share
- Open the Storage Gateway console.
- From the list of gateways, select your file gateway. Then, choose Create file share.
- Under Configure file share settings, for Amazon S3 bucket name, enter a name for the bucket.
- For Access objects using, select Network File System (NFS). Then, choose Next.
- For Configure how files are stored in Amazon S3, you can optionally modify the Storage class for new objects, Object metadata, or Access to your S3 bucket. Or, you can leave the default values for those fields, and then choose Next.
- Review the details of your NFS file share, and then choose Create file share.
- Wait for the file share's Status to change to Available.
Note: If the file share's Status seems stuck in Creating, then check the permissions specified in the Amazon Simple Storage Service (Amazon S3) bucket policy and the AWS Identity and Access Management (IAM) role associated with the file share. The file share's role must have access to the S3 bucket.
- After the file share is available, select the file share so that you can view its Details tab.
- Note the mount command that's listed next to On Microsoft Windows.
Mount the file share on your Windows server
- On your Window server, open Server Manager. For more information, see Server Manager on the Microsoft website.
- From the Server Manager dashboard, under Configure this local server, choose Add roles and features.
- In the Add Roles and Features Wizard, choose Next until you reach the Features section.
- For Features, confirm that Client for NFS (Installed) is selected.
- On your Windows client, search for the Command Prompt application. Then, open the context (right-click) menu on the Command Prompt application and choose Run as administrator.
- In the Administrator: Command Prompt, enter mount to display the current mounts on the Windows server.
- In the next prompt, enter the mount command that you noted in step 9 of Create the file share.
Note: Be sure to replace [WindowsDriveLetter] with the drive that you want to map to the S3 bucket that's associated with the file share.
- Run the cd command to navigate into the drive that you specified in the mount command.
- Run the dir command to list the files that are in the drive. Confirm that the files in the drive are the same files that are in the S3 bucket that's associated with the file share.