Discovering AWS Linux Block Device Mappings
On Amazon Linux I ran this command
aws ec2 describe-volumes
This gave me information about the volumes attached and their mappings, which I have trimmed and slightly obfuscated. Based on the information below you can see /dev/xvda is mapped to vol-0123456, which you can easily look up in the console. If you have multiple volumes you will see multiple attachments.
{
"Volumes": [
{
"Attachments": [
{
"InstanceId": "i-xxxx",
"VolumeId": "vol-0123456",
"State": "attached",
"DeleteOnTermination": false,
"Device": "/dev/xvda"
}
],
"Encrypted": false,
"VolumeType": "gp2",
"VolumeId": "vol-0123456",
"State": "in-use",
"Iops": 100,
"SnapshotId": "snap-123123123",
"Size": 10
}
]
}
Changing Volume Sizes for Running Instances
I have changed the EBS volume size for Windows instances while they were running. However, AWS say on this page that sometimes you will need to stop the instance / detach the volume to modify the size. So, in short, try it and see what happens.
In some cases, you must detach the volume or stop the instance for modification to proceed. If you encounter an error message while attempting to modify an EBS volume, or if you are modifying an EBS volume attached to a previous-generation instance type, take one of the following steps:
For a non-root volume, detach the volume from the instance, apply the modifications, and then re-attach the volume.
For a root (boot) volume, stop the instance, apply the modifications, and then restart the instance.