satish8450 / Documents-AWS

Documents Listed her
0 stars 0 forks source link

Storage ( EFS AND Storage Gateway) #18

Open satish8450 opened 4 months ago

satish8450 commented 4 months ago

EFS

Elastic File System : By the basis of Network based it will work , based on the IP address we can able to access the data from instances which is attached by EFS

2049 port must be opened in Security group

Setup :

Create Two instances Creating EFS : Name : Name of the EFS --> Customize File system type: Reginal : for all availability zones One Zone : Particularly one zone Automatic backups : don't need backups Lifecycle management: Choose which is want Next Network access Virtual Private Cloud (VPC): Choose VPC Mount targets : Everything remains same choose Security group

Create EFS , We need to attach this EFS to Instances via "mount via IP"

execute this command in server1 sudo su - mkdir /efs

Ex : sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport 10.0.0.16:/ /efs/ (Availability zone 1a)

Same execute similar commands in sever2 mount command will be different we can variation in ip address

EFS STORAGE attached to both servers now . validate by using #df -h image

after completion of this , if we created any file in server1 under /efs it will automatically reflected in server 2

satish8450 commented 4 months ago

Storage gateway :

Generally this storage gateway is used in migration activity

if our project running on-premises we have data on it we want to migrate this data to cloud. Through Storage gateway we can copy the data in s3

why s3?

we have advantage in S3 classes as we can segregate the data year wise ( using glacier )

Storage Gateway types :

File Gateway : Files we can migrate Tape Gateway : data stored in Hard discs Volume Gateway : for volumes we can migrate

Point 1 : we don't have any on-prem server now so we can assume EC2 instance as Onprem Point 2: Storage gateway Creation : Before migration we need to create Gateway instance while creating StorageGateway Step 1: Gateway name: Gateway time zone: Choose the local time zone based on where you are deploying your gateway. Gateway options ; Gateway type-Amazon S3 File Gateway Host platform : Mention where On prem server located ( VM or Ec2-instance) Launch EC2 instance : This is the Gateway instance ( launch the instance given requirements) Use default settings ( will create instance with above requirements)

Storagewizad instance will create in Ec2 Dashboard Next Step 2 : Connect to AWS : endpoint options --> service endpoint Step 3 : Activate gateway Upto here we have created Storagegateway and Instance. We need to create connection b/w s3 <--> Storagegateway 4

Point 3: Create bucket in s3 Create Files share in Storage gateway and choose s3 bucket

Point 4 :

Establish the connection between Storage gateway and On perm Server

Goto Fileshare, below we have mount command we need to execute that in onpremserver

mount path : create any folder copy all files into that folder it will automatically reflect in S3

StorageGatway