Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
shamimice03 authored Jul 9, 2023
1 parent 428401e commit 91beee0
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,28 @@ Attach the AWS EFS filesystem to multiple AWS EC2 instances running on different
### Test
To test whether the EFS file system is mounted on or not. `SSH` into the instances and run `df -k` command to find out all the mounted file systems on your EC2 instances.

### Bash Script used to mount file system:
```
#! /bin/bash
# Update the system packages
sudo yum update -y
# Create a directory for the content
sudo mkdir -p content/test/
# Install the Amazon EFS utilities
sudo yum -y install amazon-efs-utils
# Add an entry to /etc/fstab to mount the EFS file system
sudo su -c "echo 'fs-0c4c5164674de43ca:/ content/test/ efs _netdev,tls 0 0' >> /etc/fstab"
# Mount the EFS file system
sudo mount content/test/
# Display the disk space usage
df -k
```

<!-- ## Attach EFS volume to Multiple EC2 instances
```
Expand All @@ -43,4 +65,4 @@ This appears to be an entry in the /etc/fstab file on a Linux system.
The entry specifies that the EFS (Elastic File System) should be mounted at a specific mount point (specified by "efs-mount-point"), with the file system ID being "file-system-id". The options specified for the mount include "_netdev" (which indicates that the filesystem is a network device and should not be mounted until the network is available), "tls" (which enables Transport Layer Security for data in transit), and "iam" (which enables the use of AWS Identity and Access Management (IAM) credentials for authentication).
The final "0 0" specifies the dump and file system check order options, respectively. A "0" for these options indicates that they should be skipped.
``` -->
``` -->

0 comments on commit 91beee0

Please sign in to comment.