1
votes

Let's say there is a single disk Disk 0 at an Amazon EC2 instance Instance1 with the corresponding EBS volume having the device-name /dev/sd1. Let's say this disk maps to C-drive on the VM.

Now can we create a new EBS volume attach it to Instance1 with the same device-name /dev/sd1?

If this is possible, does it mean, after the volume is attached, we can go ahead and extend the existing C-drive at Instance1, without having to go through the process of detaching it first, creating a snapshot etc.?

1

1 Answers

2
votes

If an EBS volume is already mounted at /dev/sd1, it is not possible to mount another volume as that device.

First, detach the existing volume, then attach a new volume.

To extend the size of an EBS volume:

  • Detach the EBS volume from the EC2 instance
  • Create Snapshot of the EBS volume
  • Create Volume from the snapshot, making the volume larger
  • Attach the new EBS volume to the EC2 instance

The disk partition will also need to be extended. This can be done with the Disk Management console (Windows) or with the resize2fs command (Linux).