How To Create Elastic File System(EFS) On Amazon Cloud
We can create an EFS or elastic file system and mount them in AWS servers. We can use these file systems to attach any number of servers. Let’s see, how to create elastic. There’s no limitation on the size of the file system. A single file can have a maximum size of 47.9 TB.
Go to Storage service -> EFS
Click on Create file system and select your VPC network.
Next step, I have chosen the mount target wherein selected the availability zone, subnets, automatically IP and security group.
Click next and add a tag.
AWS has a new feature like enable lifecycle management.
It has two Storage classes types:
- Infrequent access: it means if you’re not accessing the data frequently, you need to keep long live.
- Standard: Stores frequent access files.
I’m leaving it none
Choose the default settings for throughput and performance mode. You can change it according to your need and click on next.
If you require to configure client access, you can but I’m not creating.
The final step, review and create then click on create file system.
Click on it and find the DNS name.
Mount EFS on EC2, login to your both EC2 instance and install nfs client.
yum install nfs-utils
Create a mount directory
the port 2049 should be allowed in the EC2 instance security group. You can find this information from your EC2 instance.
This EC2 security group should be allowed in EFS.
mount -t nfs -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-18b22198.efs.us-east-1.amazonaws.com:/ /root/nfs-share
NFS mounted on EC2 instance without any issue and check using df -h | grep /root/nfs-share
You’re done Elastic file system mount efs create aws