How can I connect my file gateway's NFS file share to my Windows Server?
Last updated: 2022-06-30
I created a file gateway on AWS Storage Gateway. My file gateway uses VMware ESXi as the host platform. I want to 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 those that use Amazon Elastic Compute Cloud (Amazon EC2) instances. This also includes 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.
- For Amazon S3 location, choose either the Amazon Simple Storage Service (Amazon S3) bucket name, S3 access point, or S3 access point alias. Then, provide the corresponding name.
- For AWS Region, choose the AWS Region of the S3 bucket.
- For File share name, enter a name for the file share.
- For AWS PrivateLink for S3, choose either VPC endpoint ID or VPC endpoint DNS name. Then, provide the required information in the corresponding field.
- For Audit logs, Automated cache refresh from S3, and File upload notification, choose the appropriate option based on your need. Or, you can leave the default values for those fields, and then choose Next.
- For Configure how files are stored in Amazon S3, you can modify Storage class for new objects, Object metadata, Access to your S3 bucket, and Encryption. Or, you can leave the default values for those fields, and then choose Next.
- Choose Next to configure file access settings. You can modify the Allowed clients, Mount options, Export as, and File metadata defaults. 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.