| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
You can list information about a volume, including the specific instance the volume is attached to.
To view information about an Amazon EBS volume
Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.
Click Volumes in the navigation pane.
The console displays a list of current volumes and the instances they are attached to.
To view more information about a volume, select it.
Information about the volume appears in the lower pane.
To describe volumes and list information about the volumes that you own, use the ec2-describe-volumes command.
PROMPT>ec2-describe-volumes
Amazon EC2 returns information similar to the following.
VOLUME vol-4d826724 80 us-east-1a in-use 2010-03-30T13:58:58+0000 standard
ATTACHMENT vol-4d826724 i-6058a509 /dev/sdh attached 2010-03-30T13:54:55+0000
VOLUME vol-50957039 13 us-east-1a available 2010-03-24T08:01:44+0000 standard
VOLUME vol-6682670f 1 us-east-1a in-use 2010-03-30T08:11:01+0000 standard
ATTACHMENT vol-6682670f i-69a54000 /dev/sdh attached 2010-03-30T09:21:14+0000 This information includes the volume ID, capacity, status (in-use or available), and creation time of each volume. If the volume is attached, an attachment line shows the volume ID, the instance ID to which the volume is attached, the device name exposed to the instance, its status (attaching, attached, detaching, detached), and when it attached.
Tip
You can use ec2-describe-volumes to filter the results to only the volumes that match the criteria you specify.
To describe instances and list volumes that are attached to running instances, use the ec2-describe-instances command.
PROMPT>ec2-describe-instances
Amazon EC2 returns information similar to the following.
RESERVATION r-f25e6f9a 111122223333 default INSTANCE i-84b435de ami-b232d0db ec2-184-73-201-68.compute-1.amazonaws.comdomU-12-31-39-00-86-35.compute-1.internal running gsg-keypair 0 m1.small 2010-03-30T08:43:48+0000 us-east-1a aki-94c527fd ari-96c527ff monitoring-disabled 184.73.201.68 10.254.137.191 ebs BLOCKDEVICE /dev/sda1 vol-cf13b3a6 2010-03-30T08:01:44.000Z true BLOCKDEVICE /dev/sdh vol-c7f95aae 2010-03-30T13:58:58.000Z true
Tip
You can use ec2-describe-instances to filter the results to only the instances that match the criteria you specify.
For more information about block device mapping, see Block Device Mapping.
To describe volumes and list information about all volumes that you own, use the DescribeVolumes action. Construct the following request.
https://ec2.amazonaws.com/ ?Action=DescribeVolumes &AUTHPARAMS
The following is an example response.
<DescribeVolumesResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/">
<volumeSet>
<item>
<volumeId>vol-4282672b</volumeId>
<size>80</size>
<status>in-use</status>
<createTime>2008-05-07T11:51:50.000Z</createTime>
<attachmentSet>
<item>
<volumeId>vol-4282672b</volumeId>
<instanceId>i-6058a509</instanceId>
<size>80</size>
<snapshotId>snap-12345678</snapshotId>
<availabilityZone>us-east-1a</availabilityZone>
<status>attached</status>
<attachTime>2008-05-07T12:51:50.000Z</attachTime>
</item>
</attachmentSet>
</item>
...
</volumeSet>Tip
You can use DescribeVolumes to filter the results to only the
volumes that match the criteria you specify.