无法在某些EC2 ASG上装载某些EFS文件系统



我目前正在为我的应用程序使用AWS EC2自动缩放组。我的文件系统使用AWS EFS。我有大约5个EFS文件系统,在启动新实例时启用了自动装载。

当自动缩放在放大时启动新实例时,有时我会遇到一些奇怪的问题。在某些情况下,某些EFS将不会装入。这种情况非常罕见,但发生后会损坏我的生产系统。

据我所知,在新启动的EC2实例中联网之前,系统似乎正在尝试装载EFS。以下是错误日志:

Dec  13 01:09:08 ip-xxxxxxxxxxxxxx systemd[1]: var-www-html-mcstaging.xxxxxxxx-app-etc.mount: Mount process exited, code=exited, status=1/FAILURE
Dec  13 01:09:08 ip-xxxxxxxxxxxxxx systemd[1]: var-www-html-mcstaging.xxxxxxxxxxxx-app-etc.mount: Failed with result 'exit-code'.
Dec  13 01:09:08 ip-xxxxxxxxxxxxxx systemd[1]: Failed to mount /var/www/html/mcstaging.xxxxxxxxxxx/app/etc.
Dec  13 01:09:08 ip-xxxxxxxxxxxxxx systemd[1]: Dependency failed for Remote File Systems.
Dec  13 01:09:08 ip-xxxxxxxxxxxxxx systemd[1]: remote-fs.target: Job remote-fs.target/start failed with result 'dependency'.

_netdev添加到/etc/fstab的装载选项中。我相信这里已经回答了这个问题。

最新更新