Search code examples
amazon-web-servicesamazon-ebsamazon-efs

Need extensible storage for EC2 ! Alternatives of EFS (Elastic File System) on AWS ?


As EFS is not in All regions.. What are other options if I need an extensible storage which can be mounted on EC2 ?


Solution

  • EBS volumes can be extended whenever needed. Limitations include :

    1) It cannot be mounted to multiple instances at once similar to EFS >> To tackle this you have to keep one instance as NFS server and other instances as clients which connect to it. You can use this tutorial for the same.

    https://www.tecmint.com/how-to-setup-nfs-server-in-linux/

    2) Amazon do not log data usage information in cloudwatch due to the privacy model.

    There are custom scripts available from Amazon using which you can log the "data usage" metrics into cloudwatch. cloudwatch can alert you once the data usage reaches some set level.Say 85%. Then you can goto volumes>>modify volume>>set new size>> and do a resize at OS end to make it reflected.

    The below steps explain in detail how to setup volume usage metrics in cloudwatch.

    These scripts are designed to run on your Amazon EC2 instances running Linux, where you can configure them to report memory and disk space usage metrics to Amazon Cloud Watch. Once the metrics are submitted to Cloud Watch, you can view graphs, calculate statistics and set alarms on them in the Cloud Watch console.

    Basic steps include

    1. Install the required perl packages, corresponding to the instance you selected (RHEL, Ubuntu, Amazon Linux etc).
    2. Download, install and configure the monitoring scripts.
    3. Configure the AWS credential template .
    4. Perform a test run to confirm its reporting to cloud watch.
    5. Setup a cron job to run this at regular intervals so that cloud watch custom metrics will be updated.

      6. Goto cloud watch, select custom metric for disk usage and create an alarm with 80% limit. So that it will alert you once usage crosses for the custom metric you selected.

    Together with EBS volumes and NFS sharing concept, you can mimic the exact EFS functionality and architecture. Performance will be lower compared to the EFS.(You can use EBS volumes in raid type to minimize the performance loss too)