Network file share
Used in AWS/Azure
- ec2/autoscalling/vm/vmscaleset
- ecs/acs
- EKS/AKS/K8s
EFS – Elastic file storage
- Aws EFS works is fully managed by aws and its using NFS 4.1 version
- EFS will works only for linux servers
- Cost per GB
- NFS port to connect linux server (inbount/outbound need open ports)
- ecs, eks, ec2 and lambda
- iam user / iam role
- security group to allow/deny network
Watch class recording to create EFS
NFS client
- nfs-utils for RHEL, CentOS, Amazon Linux, and Fedora distributions
sudo yum update && sudo yum install -y nfs-utils
# or
sudo dnf update && sudo dnf install -y nfs-utils
- nfs-common for Debian and Ubuntu distributions
sudo apt update && sudo apt install -y nfs-common
- Network relay (stunnel package, version 4.56 or later)
- Python (version 3.4 or later)
- OpenSSL 1.0.2 or newer
sudo mkdir -p /efs
sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport fs-09e84447d97adf7a8.efs.us-east-1.amazonaws.com:/ /efs
AFS – Azure File share
- Azure AFS is managed by azure (NFS version 3.1)
- will suppourt both windows & linux
- Cost per GB
- NFS and SMB to connect windows and linux servers (inbount/outbound need open ports)
- vm, vmss, acs,aks and functions.
- service user or manage identity
- Network secuirty group (allow/deny network)
Task
- create 2 ec2 and efs storage and mount efs to instance create/down some file to mount location and verify files will shared netwotk.