大网数据广告活动
服务器运维问答

Amazon Web Services EFS doesn't seem to be saving files

· 52CE 我爱测

So I'm trying to use AWS EFS with EC2 to have persistent storage between multiple instances. I'm mounting the drive using, sudo mount -t nfs4 -o nfsvers=4.1 $(curl -s http://IPADDRESSHERE/latest/meta-data/placement/availability-z…

问题原文

原帖链接 · Charlie Fish · CC BY-SA 3.0

So I'm trying to use AWS EFS with EC2 to have persistent storage between multiple instances.

I'm mounting the drive using, sudo mount -t nfs4 -o nfsvers=4.1 $(curl -s http://IPADDRESSHERE/latest/meta-data/placement/availability-zone).FILESYSTEMIDHERE.ZONEHERE.amazonaws.com:/ /mydir. I have replaced some of the key information with placeholders for security reasons.

After running that nothing happens it just goes right back to the terminal no success message and no error message so I assume it worked.

I create a folder or file inside /mydir and ls /mydir and everything shows up fine.

Then I unmount the drive using sudo umount /mydir. Once again after running that no error but no success message so I assume it worked. All the files stay in the folder and nothing changes after running that.

Then I create a new directory and mount the drive to that new directory and none of the files or folders I created show up in that new folder.

So it looks like it's not even saving to the EFS drive if when mounting to a new folder it doesn't even sync down the files. Any ideas on how to get this working? Thanks so much in advance.

已采纳解答

原帖链接 · EEAA · CC BY-SA 3.0

To your original question: if you mount a filesystem "on top" of your current working directory, you will not see the contents of the mounted fs, nor will you be able to save content to that fs until you cd back to the parent directory and then enter the mounted fs again.

When you write data, it consumes space on whatever filesystem it is written to. In the case of EFS, data saved there will not affect usage of your EBS volumes.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-07-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。