In my previous post I explained you how to mount EFS volume inside a fargate task container. EFS serves as persistent storage for ephemeral container. Sometime you may want to see the data containers are storing in EFS. Most of the time containers are special purpose containers like MongoDB which does not provide any interface to browse the file system.
The easy way to look at EFS is to mount it on an EC2 instance. EFS volume can be mounted on multiple machines therefore you can mount it on EC2 machine and inside the container at the same time. You need to look at DNS name for EFS volume.
This DNS name is used while mounting EFS volume as a NFS drive on EC2 volume.
Create a directory for mounting EFS volume. For example I am creating /efs3
Now you can mount the EFS volume using following command. Please replace DNS name of your EFS volume:
The easy way to look at EFS is to mount it on an EC2 instance. EFS volume can be mounted on multiple machines therefore you can mount it on EC2 machine and inside the container at the same time. You need to look at DNS name for EFS volume.
This DNS name is used while mounting EFS volume as a NFS drive on EC2 volume.
Create a directory for mounting EFS volume. For example I am creating /efs3
sudo mkdir /efs3
sudo mount -t nfs -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-9ce1684d.efs.ap-south-1.amazonaws.com:/
/efs3
You can follow the following link for more information
https://docs.aws.amazon.com/efs/latest/ug/mounting-fs-mount-cmd-dns-name.html
No comments:
Post a Comment