EFS无法安装在EC2实例上

时间:2017-09-29 13:00:51

标签: amazon-web-services amazon-ec2 dns amazon-vpc amazon-efs

我试图在我的EC2实例上安装EFS系统。 我很好地遵循了这个Walkthrough。但似乎EFS并未通过使用DNS进行安装。

当我使用IP时,它可以正常工作,但我找不到实例2中挂载文件夹中实例1创建的文件。我的意思是EFS不是真正共享的。 请帮帮忙?

有关信息,请在VPC中启用DNS设置。 EFS和EC2在同一个VPC中。

EFS安全组具有允许端口2049上的EC2安全组的入侵规则。

我还应该检查什么?

root@ip:~# mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 $EC2_AVAIL_ZONE.fs-4644458f.efs.$REGION.amazonaws.com:/ /efs-mount-point
mount.nfs4: Failed to resolve server eu-west-1a.fs-4644458f.efs.eu-west-1.amazonaws.com: Name or service not known
root@ip:~#



root@ip:~# mount -a -t nfs4
mount.nfs4: Failed to resolve server eu-west-1a.fs-4644458f.efs.eu-west-1.amazonaws.com: Name or service not known
root@ip:~#
root@ip:~# mount -a
mount.nfs4: Failed to resolve server eu-west-1a.fs-4644458f.efs.eu-west-1.amazonaws.com: Name or service not known
root@ip:~#

1 个答案:

答案 0 :(得分:0)

如果您有自定义DNS,则可能需要将DNS查询重定向到AWS DNS服务器:

echo "server=/amazonaws.com/169.254.169.253" > /etc/dnsmasq.d/amazonaws.com.conf
echo "prepend domain-name-servers 127.0.0.1;" >> /etc/dhcp/dhclient.conf
service dnsmasq restart
service network restart