Setting up the AWS Elastic File System (EFS)

This little experiment has big implications. Oracle RAC was ruled out on AWS because the disks could not be shared. Within the past year there have been installations of Oracle RAC using iSCSI devices as storage. So, it can be done, if not a bit oddly. This is where I would argue, why? And there are those who answer this question, and for them, the ones who can get past the huge license and support costs, their chance to roll out RAC on AWS.

To prove it works, it, being efs, I offer the following:

  • Connect to VPC using VPN (preferably)
  • Start Pageant & Load Private Key (Windows)
  • Create two Linux instance on DB (private) subnet
  • Tag volumes and network interfaces
  • SSH to both new instances & apply updates
    • sudo yum update
  • Create (or identify/modify) security group(s)
    • One for EC2 instance
      • allow outbound access to the mount target on TCP port 2049
    • One for EFS
      • allow inbound access for the TCP protocol on port 2049 for NFS from all EC2 instances on which you want to mount the file system
      • NFS (2049) TCP (6) 2049
    • Create the Elastic File System (EFS) (use either AWS console or CLI)
      • Console much easier – conceals building a token, among other things…
      • Tag the mount targets ”Name” in the “interface” tab
    • Create the mount target
      • cd /mnt
      • sudo mkdir efs
    • Mount EFS
      • “EC2 Mount Instructions” in console are tailored to environment built, for example:
        • sudo mount -t nfs4 -o nfsvers=4.1 $(curl -s efs
        • Except: final “efs” should be replaced with “/mnt/efs”, since we picked a more reasonable place over the ec2-user’s home directory.
      • Issue “df -h” to confirm mount
    • Permissions
      • The “sudo” command was used to create the mount target, so when the EFS is mounted, it is owned by “root”.
      • Change with “sudo chown ec2-user:ec2user /mnt/efs”

For now, I will not modify the /etc/fstab file to make it mount after reboot; but, will investigate putting this in user data with “sudo yum update” and other such initialization.

That would be building the AWS way, anyway… Building for Failure!

30 year career in data, analysis, architecture, transformations, migrations, replication, using Oracle, Sybase, SQL Server, DB/2, XDB, Informix, Ingres, Seed, SQL DB/4381, and others. Nobody buys a database. People buy solutions. AWS is my network.

Leave a Reply