12 Jul 2015

AWS Elastic File System - First Boot

We've been eager to get our hands on AWS EFS and as the preview dropped in this week we got our chance (albiet via a virtual trip to Oregon). But firstly, what is it?
AWS EFS is 'standalone' petabyte scale cloud storage offering multi-source connectivity via NFSv4, with 'E' standing for elastic in the true sense. EFS removes the restrictions of single instance EBS vol mounts to provide multi-instance access, and if like us you've struggled with the nuances of s3fs-fuse mounts then EFS will be a breath of fresh air as it supports standard file and directory operations.

Setup

EFS setup is a straightforward 3-step process. On the first screen (Fig:1) select a VPC and subnets (recommended is all), detail IPs (or leave as auto), and choose a security group (EFS is SG friendly) -

Fig:1 - Configure EFS


Click through, add a name tag, review and create (Fig:2) -

Fig:2
 

 

Connectivity

Hooking your instances up to EFS is simple enough and once pre-reqs are in place for nfs-utils (Amazon Linux, Red Hat Enterprise Linux, or SuSE Linux) or nfs-common (Ubuntu) it's a case of making mount point directory (i.e ~/efs) and mounting it via the following command (which dynamically pulls down your instance AZ details from EC2 meta-data) -

sudo mount -t nfs4 $(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone).fs-a12bc345.efs.us-west-2.amazonaws.com:/ ~/efs

Fig:3 - EFS DNS

Utilising EC2 meta-data is pretty cool as without it you would need to manually specify the respective EFS zone DNS (Fig:3), which of course would lead to all sorts of problems for multi-AZ auto-scaling configs.

As mentioned, EFS access is SG controlled and requires port 2049 for ingress/egress. In our simple test build we used the same SG for both EFS and EC2 so just nested the group in itself for TCP 2049 (Fig:4).



Fig:4 - Combined EFS and EC2 security group.


EFS has been a long time coming and is a welcome addition to the AWS core. We haven't tested connectivity from Windows instances so can't comment on any impact it may have on 3rd party utilities like Cloudberry Drive, however as with s3fs-fuse for Linux you are somewhat limited in what you can do with s3 mounts (s3 at base level is a simple key, value store, not a 'real' file system), as such there is no doubting the potential EFS provides and the huge gap it fills (elastically, of course).

No comments:

Post a Comment