Mounting EFS on EC2 Linux
- In this lab, we will mount EFS created in previous to Linux EC2 instance
- Created two EC2 instance, name it EFS-Instance-1 & EFS-Instance-2
- Login into both the instance and create a directory named EFS
mkdir EFS
- Now we will EFS storage to EFS directory, first you would need to find the DNS of EFS storage created in previous
For this go to EFS service and look for:
- Now to mount, log back to EFS-Instance-1 and run below command
sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport YOUR-EFS-DNS:/ EFS
- Similarly run same command on EFS-Instance-2
- With this EFS is mounted on your EC2 instances, to check run
df -h