chapter nine

9 Sharing Data Volumes Between Machines: EFS

 

This chapter covers

  • Creating a highly available network file system
  • Mounting a network file system on multiple EC2 instances
  • Sharing files between EC2 instances
  • Tweaking performance of your network file system
  • Monitoring possible bottlenecks of your network file system
  • Backing up your shared file system

Many legacy applications store state in a file system on disk. Therefore, using Amazon S3, an object store, as described in chapter 7 is not possible without modifying the application. Using block storage as discussed in the previous chapter might be an option, but does not allow you to access files from multiple machines. As block storage persists data in a single data center only, AWS promises an uptime of 99.9% only.

In case you need to share a file system between virtual machines or require high availability, the Elastic File System (EFS) might be an option. EFS is based on the NFSv4.1 protocol, which allows you to mount and access the file system on one or multiple machines in parallel. Also EFS distributes data among multiple data centers, also called availability zones, and promises an uptime of 99.99%. In this chapter you learn how to set up EFS, tweak performance, and backup your data.

[Note]  EFS only works with Linux

At this time, EFS is not supported by Windows EC2 instances. The Amazon FSx for Windows File Server is an alternative to EFS for Windows workloads. See https://aws.amazon.com/fsx/windows/ to learn more.

9.1 Creating a file system

9.1.2 Using CloudFormation to describe a file system

9.1.2 Pricing

9.2 Creating a mount target

9.3 Mounting the EFS file system on EC2 instances

9.4 Sharing files between EC2 instances

9.5 Tweaking performance

9.5.1 Performance mode

9.5.2 Throughput mode

9.5.3 Storage class impacts performance

9.6 Backing up your data

9.7 Summary