AWS Storage

AWS EFS How to create and configure ?

 

 

AWS EFS How to create and configure ?

What is EFS?

*Amazon Elastic File System (EFS) fully-managed service from AWS .
*File Storage service from AWS.
*concurrently-accessible storage for up to thousands of Amazon EC2 instances.
*Works with NFS protocal . Its similar to traditional NAS file system storage .Like same NAS share can be mounted on multiple Linux/Unix servers.
*EFS file systems can automatically scale from gigabytes to petabytes of data without needing to provision storage
*When you mount EFS by Default it will show 8E (Exabyte) capacity
*Can be mounted only with Linux systems. Not with windows systems at this moment.
*Amazon EFS file systems can also be mounted on an on-premises server, so any data that is accessible to an on-premises server can be read and written to Amazon EFS using standard Linux tools.
*Every file system object (i.e. directory, file, and link) is redundantly stored across multiple Availability Zones
*All file systems deliver a consistent baseline performance of 50 MB/s per TB of storage, all file systems (regardless of size) can burst to 100 MB/s, and file systems larger than 1TB can burst to 100 MB/s per TB of storage.
*File system throughput is shared across all Amazon EC2 instances connected to a file system. For example, a 1TB file system that can burst to 100MB/s of throughput can drive 100MB/s from a single Amazon EC2 instance, or 10 Amazon EC2 instances can collectively drive 100MB/s
*You can managle file system access through security group
*EFS supports file system encryption.
*pay only for the amount of file system storage you use per month in GB. There is no minimum fee and no set-up costs

How to create EFS?

Lets take 2 AWS Linux instance for this test

Select EFS services from AWS services page and click Create File System.

EFS works based on VPC.Mount target IP address by default it will show for all the zones .If youe EC2 instances not running you can remove the zone .

In EFS access management controlled through security group . Create a security group with NFS allow access.

Here sg-bbf16bc1 is security group of 2 web server . Infact you can provide IP address  or subnet of the instances.

Remove the default sg and attach new security group “efstestsg”

Enter the Tag ( Optional ) and performance mode choose “General” .By the way it can provide low latency . If you are using more than 1000 systems you can choose Max IO

EFS Supports encryption also . you can use KMS keys also.

 

EFS File system created sucessfully

EC2 mount instructions you can find from the same page . You can directly use this commands. You no need to modify .This is a beautiful future.No need to worry about mount commands.

Install nfs-utils ” $ sudo yum -y install nfs-utils ” using the command . If it is Amazon Linux its comes with image . No need to install .

Mount commands using DNS names

sudo mount -t nfs -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 file-system-id.efs.aws-region.amazonaws.com:/ efs-mount-point

Mount commands using IP. Note the IP address for ex

$ sudo mount -t nfs -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 mount-target-IP:/ ~/efs-mount-point

Now file system mounted using mount commands

Create some folders and files

Now lets connect with 2nd serverCentos

Install nfs-utils package.

Mount and verify the directories

Create some directories from 2nd server and check in 1st server (Amazon Linux)

Able to see the new directories “final” . Which is created from 2nd node.

How to Delete EFS

 

Now file system is deleted.

 

 

Tagged

Leave a Reply

Your email address will not be published. Required fields are marked *