简体   繁体   English

如何将 AWS EFS 挂载到 Macbook 或本地计算机

[英]How to mount AWS EFS to Macbook or local computers

I am trying to mount AWS EFS to my local macbook (Also other local computers) However, after trying so many things, it is not working.我正在尝试将 AWS EFS 挂载到我的本地 macbook(还有其他本地计算机)但是,在尝试了很多事情之后,它不起作用。

My port 22 and 2049 is wide open as a testing.我的端口 22 和 2049 作为测试是完全开放的。

I tried few command like mount -t nfs4 -o nfservers=4.1 xxx.xxx.xxx.xxx:/ efs/我尝试了一些命令,例如mount -t nfs4 -o nfservers=4.1 xxx.xxx.xxx.xxx:/ efs/

But I am keep getting connection timed out error.但我不断收到connection timed out错误。

Also I tried mounting this EFS to another AWS account EC2 instances.我还尝试将此 EFS 安装到另一个 AWS 帐户 EC2 实例。 But keep getting same error.但不断得到同样的错误。

For example.例如。 I have EFS in Account1 and EC2 in Account2 (Different VPC) and trying我在 Account1 中有 EFS,在 Account2(不同的 VPC)中有 EC2 并尝试

sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 xxx.xxx.xxx.xxx:/ /efs/

It is not working.它不工作。

It ONLY works if I have my EC2 in same Account (which is account1).它仅适用于我的 EC2 在同一个帐户(即 account1)中的情况。

Is there a way I can mount this EFS in different account or local computers?有没有办法可以在不同的帐户或本地计算机上安装这个 EFS?

Did many google search and AWS forum search.. but no luck.做了很多谷歌搜索和 AWS 论坛搜索......但没有运气。

For those who are curious, try有兴趣的朋友可以试试

sudo mount -t nfs -o vers=4,tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 -w host_ip:/ efs

worked for me via direct connect.通过直接连接为我工作。

sudo mount -t nfs -o vers=4,tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 -w host_ip:/ efs sudo mount -t nfs -o vers=4,tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 -w host_ip:/efs

I have tried using the AWS Client connect VPN ie P2S VPN.我曾尝试使用 AWS 客户端连接 VPN,即 P2S VPN。 it worked for me as well.它也对我有用。 With the latest changes now the EFS can be connected from your local machine using AWS VPN.现在有了最新的更改,可以使用 AWS VPN 从您的本地计算机连接 EFS。

To access EFS file systems from on-premises, you must have an AWS Direct Connect or AWS VPN connection between your on-premises datacenter and your Amazon VPC.要从本地访问 EFS 文件系统,您的本地数据中心和 Amazon VPC 之间必须有 AWS Direct Connect 或 AWS VPN 连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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