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
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.