asdjkag
asdjkag

Reputation: 448

EC2 Instance doesn't start after Reattaching the Volume

I'm trying to lunch an instance from backup snapshots. I follow the procedure here :

  1. Goto the snapshot section of the aws tools.
  2. Create a volume from the snapshot.
  3. Create an ec2 instance (make sure it's an EBS backed instance, if it's the same kind as the original snapshot you'll be fine)
  4. Stop the instance
  5. Detach the existing EBS volume from the instance
  6. Attach the volume you just created, make sure you give it the same name as the instance that was attached.
  7. Start the instance back up.

Not quite sure what is EBS backed instance.

Every thing works fine,But after I reattach the volume,The instance I created cant get start,when i press start,it pending for awhile then stopped again. What maybe the problem?

Thanks in advance.

Upvotes: 5

Views: 7958

Answers (3)

TickTock
TickTock

Reputation: 29

This worked for me.

Basically the "Device" attachment information that is auto-populated wasn't right.

When I tried starting the EC2 instance the error read.

enter image description here

The error ,clearly states that volume isn't attached at(/dev/xvda)

Now, navigate back to volumes. Undo the previous attached volume.

Attach the volume again by providing the "Device" info as provided in the error message, /dev/xvda in this case.

Upvotes: 2

Prash
Prash

Reputation: 546

Before detaching the volume, note down the volume id and device name which is actually mounted right now.

Then while reattaching another volume, you need to make above device name only otherwise it will not start.

Upvotes: 0

user3736091
user3736091

Reputation:

I also have done this before. It works. When you reattach the volume check the name, it should be identical to the original root volume name. If the root volume name is different it can't start.

Upvotes: 5

Related Questions