Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reattache a volume on a EC2 instance

Tags:

amazon-ec2

I can not attach back a volume to an instance. Already try to name it /dev/xvda, /dev/sda1 or /dev/sda(don't even attach) but when looking to instance status the volume don't apear at Root device, but on Block devices..

the instance: i-037681c5cce05ec5d

the volume: vol-07d60c2e66bcf2a36

When I try to start the instance this error appear:

Invalid value 'i-037681c5cce05ec5d' for instanceId. Instance does not have a volume attached at root (xvda)

Root device -

Block devices /dev/xvda

or

Block devices /dev/sda1

instance proprieties

neither works

like image 612
Lucas Cavalcanti Avatar asked Mar 07 '26 22:03

Lucas Cavalcanti


1 Answers

I had the same problem and it is you are using /dev/xvda when attaching the volume again. Instead. You must use xvda alone. It solves the problem.

like image 67
Gabriel Ferrer Avatar answered Mar 09 '26 17:03

Gabriel Ferrer