Open shubham-kumar-tripathi opened 1 year ago
--- You can choose your preferred Cloud Provider but here I am using AWS.---
[ ] Login to your AWS Management Console, and then enter to your EC2 Instance Dashboard, you will see Elastic Block Store(EBS) on the left panel, now select Volumes.
[ ] Create a new Volume and select the volume type according to your use and make sure that the availability zone of the Volume is the same as the availability zone of your Instance.
[ ] Create that Volume.
[ ] After creating, attach that volume to your instance.
[ ] Connect your Instance to your local machine.
[ ] Now list all the available storage devices and their mounting point $ lsblk
[ ] You will see your newly created volume as "/dev/xvdf".
[ ] Check the file system for this volume by: $ sudo file -s /dev/xvdf
[ ] Format that EBS Volume to EXT4 using:
$ sudo mkfs -t ext4 /dev/xvdf
[ ] Mount that Volume to /usr/share/nginx/html or at the location where you want to put your application files by: $ sudo mount /dev/xvdf1 /usr/share/nginx/html
[ ] Now move all your application files to the above math where you mounted that volume.
[ ] Now create an entry to /etc/fstab so that after rebooting volume should automatically mounted to that directory. $ UUID=aebf131c-6957-451e-8d34-ec978d9581ae(Use your UUID) /usr/share/nginx/html ext4 defaults,nofail 0 2