Giter Site home page Giter Site logo

amazon_efs's Introduction

Amazon Elastic File System

In this project, three web servers were created and distributed across separate availability zones. The web servers need to share the same unstructured data.

The data can consists of PHP files, config files, plugins, and images etc.

EFS Is used as a shared file system, with EFS you can share file data without provisioning or managing servers.

Amazon EFS automatically grows and shrinks as you add or remove files. This removes the need for capacity management

After creating the EFS file system, you can create mount tragets on each subnet.The mount target enables communication from Amazon EC2 instances on the subnet. It uses the Network File system (NFSV4) protocol

Create different subnets within EFS to allow connection with EC2

Amazon EFS security Group once created, you can prepare to create the file system

NFS

In general, Create the EC2 instance then the EFS, and within the network session of the EFS you create security group for each EC2 instance,

EFS

Then click attach to attach the EFS and EC2 instance copy out the EFS mount helper provided code

sudo mount -t efs -o tls fs-08ed9db97402b6ab1:/ efs

EFS Attach

Connect to the instance

Login as root user: sudo -i Install the amazon EFS Util tool

sudo yum install -y amazon-efs-utils

EFS Util tool

Amazon EFS client Is available in the Amazon Linux package repositories, to build install and package on linux repositories

  1. In the terminal, run:

sudo -i

  1. In the terminal, run:

sudo yum install -y amazon-efs-utils

  1. Go to the next step.
  2. In the terminal, run:

mkdir data

  • If you receive a Permission Denied message, run:

cd ~/

  1. In the terminal, run:

ls

  1. In the terminal, paste the sudo mount command that you copied from the Amazon EFS console in an earlier step. At the end of the command, replace the "efs" folder name with "data" (without quotes) and press Enter. sudo mount -t efs -o tls fs-08ed9db97402b6ab1:/ efs
  • The command should look similar to what is displayed in the screenshot example.
  1. In the terminal, run:

cd data

  1. To create a log file, run:

sudo bash -c "cat >> efs-1-setup.log"

  • No output will appear. Instead, the cursor will move to a new line and wait for your next input.
  1. In the terminal, run:

efs-1 mounted in site A

  1. To end the cat session, on your keyboard, press Ctrl+C.
  2. To view the log file contents, run:

cat efs-1-setup.log

You should see all the File system mounted to the different instances.

Files Monted in three EFS

amazon_efs's People

Contributors

benn1440 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.