GJain
GJain

Reputation: 5093

AWS EC2 - how to mount existing EBS (on /) on a newly launched instance

I had to terminate my instance. It was using an EBS vol.

I launched a new instance with root EBS vol = /dev/xvda1

I attached the old vol using aws console.

lsblk
NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda    202:0    0   8G  0 disk 
└─xvda1 202:1    0   8G  0 part /
xvdf    202:80   0  30G  0 disk 
└─xvdf1 202:81   0  30G  0 part 

On my old terminated instance, my old EBS vol was also mounted at /

Now I want to mount xvdf1 on / as well. So that my code can work without changes.

Is it possible for me to do that? Or can I launch a new instance with old/existing EBS vol?

Please clarify/

Upvotes: 0

Views: 285

Answers (1)

Stan Dudikoff
Stan Dudikoff

Reputation: 94

First detach the new volume from the new instance. Then attached old volume an just named one like /dev/xvda1 in the bottom section through attached process. There isn't any problems for attached old volume like root to new instance.

Good luck.

Upvotes: 1

Related Questions