AWS EFS

From Indie IT Wiki
Revision as of 10:45, 7 November 2019 by imported>Plittlefield (Created page with "Amazon Elastic File System (Amazon EFS) provides a simple, scalable, fully managed elastic NFS file system for use with AWS Cloud services and on-premises resources. It is bui...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Amazon Elastic File System (Amazon EFS) provides a simple, scalable, fully managed elastic NFS file system for use with AWS Cloud services and on-premises resources. It is built to scale on demand to petabytes without disrupting applications, growing and shrinking automatically as you add and remove files, eliminating the need to provision and manage capacity to accommodate growth.

https://aws.amazon.com/efs/

Usage

Set up the file system on the Console...

https://eu-west-1.console.aws.amazon.com/efs/home?region=eu-west-1

In the EC2 virtual server, install the necessary software and reboot...

sudo apt-get install nfs-common
sudo reboot

Create the mount point folder...

sudo mkdir /mnt/efs

Mount the elastic file system on that folder...

sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-xxxxxxx.efs.eu-west-1.amazonaws.com:/ /mnt/efs

Make the mount permanent...

sudo nano /etc/fstab

LABEL=cloudimg-rootfs	/	 ext4	defaults,discard	0 0
fs-xxxxxxx.efs.eu-west-1.amazonaws.com:/ /mnt/efs nfs4 nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport,_netdev 0 0

Reboot to check...

sudo reboot

You are done :-)