Expansion of the C drive/root partition is very simple and straight forward – however you will need to power off your instance per best practices so data does not change – however there are multiple ways to do this – this one involves just working the volume in question
First you will need to document the following
- Instance ID i-4cf5e4d5
- Availability Zone us-east-1a
you will need these value later for the expansion of the partition
Now you can click on the Root Device /dev/sda1 and you will get the following screen – make a note of 1 and 2
- /dev/sda1 defines a boot volume
- vol-716c16ed is the volume id
Once you click on the vol-716c16ed – it will take you to the screen below –
- one shows the Volume ID
- shows the size of the C drive/partition which in this case is 30 GB
Now you will need to create a snapshot out of the existing volume
- Click on Create Snapshot
Clicking it will take you the next screen
- Snapshot ID
- Name of the Snapshot
- Description
Click on Create to start the process – it can take up to hours – all depends on the size of the drive
Go to snapshots Tab on the left side to see if the snapshot has been completed successfully and now you will need to create a new volume from the Snapshot with the expanded size that you want -click on Create Volume and add the details
When creating the new volume – you will need to know the following
- New Size of the drive which in this case we want to increase by 5 GB so the new size is 35 GB
- Availability Zone ID that you previously noted which i sus-east-1a in this case
Click on the Create radio button to create the volume
Now you will need to go the volumes on the left side and search for the olad volume by putting the volume in the search
- Paste the old volume ID in the search box
- Once the search is complete and verify the volume ID
- Verfiy the old EC2 drive size
You will now need to deatch the volume
Click on detach volume and it will detach from the existing Ec2 instance
Now find the new volume by volume ID that you made a mote of and paste the new volume ID in the search box for volumes – you can see the new volume is now 35 GB
Click on Actions and attach volume
Now you will need to know the Intance ID of the EC intanace and click on Actions and attach Volume
- Make sure the Volume ID is correct
- Make sure the Intance ID isc orrect
- since this is the root volume – you will need to enter /dev/sda1 – otherwise it will not boot
No go to the EC2 dashboard and verify that you can start the instance to make sure the Instance starts
Dont foget the expand the drive in the OS whether is is linux or windows – this just does it on the EC2 backend