Install wordpress
Restore web from aws S3 backup files
07/08/2016
Install wordpress
Multi Sites WordPress on ec2 ubuntu 12
10/08/2016
Show all

Mount disk in ubuntu with aws volume

Install wordpress

Create new volume on aws EC2

https://www.yanivp.net/wp-content/uploads/2016/08/2016-08-07_21-57-43.jpg

Attach Volume

https://www.yanivp.net/wp-content/uploads/2016/08/2016-08-07_21-57-43.jpg

 

cat /proc/partitions

https://www.yanivp.net/wp-content/uploads/2016/08/2016-08-07_23-20-28.jpg

sudo mke2fs -F -t ext4 /dev/xvdf ( FORMAT DISK )

https://www.yanivp.net/wp-content/uploads/2016/08/2016-08-07_22-41-58.jpg

Create drive folder:  sudo mkdir /drive-2

Mount disksudo mount /dev/xvdf /drive-2

 cd /

 ls -la

 df -h

lsblk

 sudo chmod 777 /drive-2/

cd /drive-2/

Auto mount disk after reboot  sudo nano /etc/fstab

Add this line  /dev/xvdf /drive-2 ext4 defaults 0 0

https://www.yanivp.net/wp-content/uploads/2016/08/2016-08-07_23-16-09.jpg

Move disk from SERVER1 to SERVER2

From SERVER1 :

cd /

 sudo umount /dev/xvdf

sudo nano /etc/fstab AND delete line: /dev/xvdf /date ext4 defaults 0 0

go to AWS  and STOP SERVER1

go to AWS Volume and  Detach volume

go to AWS Volume and Attach Volume to SERVER2

From SERVER2 :

cd /

sudo mkdir /drive-4

sudo mount /dev/xvdf /drive-4

Auto mount disk after reboot sudo nano /etc/fstab

Add this line /dev/xvdf /drive-4 ext4 defaults 0 0

ls -l cd /drive-4

If you need to attache volume from different zone like eu-west-1a you need to create snap-shout to the volume and create a volume in your ec2 zone.

Leave a Reply

Your email address will not be published. Required fields are marked *