简体   繁体   中英

Unable to mount AWS Storage Gateway NFS (or SMB) File Share

I bet this is a permissions issue, but I can't figure it out.

Overview

So I have an EC2 VM Instance set up according to Amazon instructions . The VM instance is running at IP 18.212.some.thing (not really but you get the point).

I have set up a Storage Gateway (with default settings). The Storage Gateway is connected to a file share S3 bucket with name 'tobetest' (let's say, but not really). The File Share is (supposedly) exposed as IP: 172.32.other.thing

Failure

Now the instructions on AWS just tell me to mount the file share using the mount command in windows: mount -o nolock 172.32.other.thing:/tobetest [WindowsDriveLetter]: but every time I do I get an error Network Error - 53: The.network path was not found.

Security Settings

So at first I limited access to the File Share by setting Allowed clients to just my IP: 178.21.goo.get/32. I also limited access to the VM Instance by assigning a security group to it which allowed only inbound port 2049 (the NFS port, according to the settings editor in AWS console) to my IP.

When that didn't work I tried updating the security group (for the VM) to allow inbound on port 2049 to 0.0.0.0/0. I also tried changing the file share settings to allow clients from 0.0.0.0/0.

It still doesn't work, I still get Network Error 53.

Other attempts

For fun, I tried to do a SMB share but I didn't have any luck with that either. I set it up as guest account and then when I tried to net use it I got an error: "There are currently no logon servers available to service the logon request"

I gave up on SMB as that is not what we want to use.

Conclusion?

So does anyone have any idea why the NFS share is not found? All the security settings I can think of are not restricting any access.

I can SSH into the Storage Gateway if I use the 18.212.some.thing IP, but I don't know if I can verify the file share from there somehow? To verify that it's actually being served, or something?

Ok, it seems that the instructions on the AWS documentation are missing a few ports that need to be allowed in order for NFS to work. Their "NFS" inbound rule template only opens port 2049, but I had to create additional custom TCP rules to allow incoming port 111 and 20048. After that it works!

Unfortunately the AWS documentation omits quite a few things and I found it better to build the EC2 instance separately from the File Gateway build as this then allows you to choose a AWS-Storage-gateway AMI (I just chose the latest). When the EC2 instance is built you can then pass the public IP address to the Gateway build. This will be 18.212.etc as per above, but when the gateway is complete it then shows the IP as the private EC2 IP address in the details - and the example. Ignore this and substitute the EC2 public IP address in the example to get it to work. After building the EC2, you will need to create and link an IAM role which grants the instance access to your S3 bucket(s) in order to get the shares to work. I used SMB to connect my W10 PC as a guest which worked fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM