Getting Information About Your Volumes

You can get information about your volumes using AWS CLI, like their type, size, and attachment to a virtual machine (VM).

Getting Information About Your Volumes Using Cockpit v2

See the Volumes dashboard.

Getting Information About Your Volumes Using OSC CLI

The ReadVolumes command lists one or more specified Block Storage Unit (BSU) volumes.

Request sample
$ osc-cli api ReadVolumes --profile "default" \
    --Filters '{
        "VolumeIds": ["vol-12345678"]
      }'
Request sample
$ osc-cli api ReadVolumes --profile "default" \
    --Filters '{
        "VolumeStates": ["in-use"],
        "VolumeTypes": ["gp2", "io1"]
      }'

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • Filters: (optional) One or more filters.

    • CreationDates: (optional) The dates and times at which the volumes were created, in ISO 8601 date-time format (for example, 2020-06-30T00:00:00.000Z).

    • LinkVolumeDeleteOnVmDeletion: (optional) Whether the volumes are deleted or not when terminating the VMs.

    • LinkVolumeDeviceNames: (optional) The VM device names.

    • LinkVolumeLinkDates: (optional) The dates and times at which the volumes were attached, in ISO 8601 date-time format (for example, 2020-06-30T00:00:00.000Z).

    • LinkVolumeLinkStates: (optional) The attachment states of the volumes (attaching | detaching | attached | detached).

    • LinkVolumeVmIds: (optional) One or more IDs of VMs.

    • SnapshotIds: (optional) The snapshots from which the volumes were created.

    • SubregionNames: (optional) The names of the Subregions in which the volumes were created.

    • TagKeys: (optional) The keys of the tags associated with the volumes.

    • TagValues: (optional) The values of the tags associated with the volumes.

    • Tags: (optional) The key/value combination of the tags associated with the volumes, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

    • VolumeIds: (optional) The IDs of the volumes.

    • VolumeSizes: (optional) The sizes of the volumes, in gibibytes (GiB).

    • VolumeStates: (optional) The states of the volumes (creating | available | in-use | updating | deleting | error).

    • VolumeTypes: (optional) The types of the volumes (standard | gp2 | io1).

  • NextPageToken: (optional) The token to request the next page of results. Each token refers to a specific page.

  • ResultsPerPage: (optional) The maximum number of logs returned in a single response (between 1 and 1000, both included). By default, 100.

The ReadVolumes command returns the following elements:

  • NextPageToken: The token to request the next page of results. Each token refers to a specific page.

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

  • Volumes: Information about one or more volumes.

    • CreationDate: The date and time (UTC) at which the volume was created.

    • Iops: The number of I/O operations per second (IOPS):

      • For io1 volumes, the number of provisioned IOPS

      • For gp2 volumes, the baseline performance of the volume

    • LinkedVolumes: Information about your volume attachment.

      • DeleteOnVmDeletion: If true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM.

      • DeviceName: The name of the device.

      • State: The state of the attachment of the volume (attaching | detaching | attached | detached).

      • VmId: The ID of the VM.

      • VolumeId: The ID of the volume.

    • Size: The size of the volume, in gibibytes (GiB).

    • SnapshotId: The snapshot from which the volume was created.

    • State: The state of the volume (creating | available | in-use | updating | deleting | error).

    • SubregionName: The Subregion in which the volume was created.

    • Tags: One or more tags associated with the volume.

      • Key: The key of the tag, with a minimum of 1 character.

      • Value: The value of the tag, between 0 and 255 characters.

    • VolumeId: The ID of the volume.

    • VolumeType: The type of the volume (standard | gp2 | io1).

Result sample
{
  "Volumes": [
    {
      "VolumeId": "vol-12345678",
      "Tags": [],
      "VolumeType": "gp2",
      "SubregionName": "eu-west-2a",
      "State": "in-use",
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "Iops": 100,
      "LinkedVolumes": [
        {
          "VolumeId": "vol-12345678",
          "DeleteOnVmDeletion": false,
          "DeviceName": "/dev/sdb",
          "State": "attached",
          "VmId": "i-12345678"
        }
      ],
      "Size": 10
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Getting Information About Your Volumes Using oapi-cli

The ReadVolumes command lists one or more specified Block Storage Unit (BSU) volumes.

Request sample
$ oapi-cli --profile "default" ReadVolumes \
    --Filters '{
        "VolumeIds": ["vol-12345678"]
      }'
Request sample
$ oapi-cli --profile "default" ReadVolumes \
    --Filters '{
        "VolumeStates": ["in-use"],
        "VolumeTypes": ["gp2", "io1"]
      }'

This command contains the following attributes that you need to specify:

  • DryRun: (optional) If true, checks whether you have the required permissions to perform the action.

  • Filters: (optional) One or more filters.

    • CreationDates: (optional) The dates and times at which the volumes were created, in ISO 8601 date-time format (for example, 2020-06-30T00:00:00.000Z).

    • LinkVolumeDeleteOnVmDeletion: (optional) Whether the volumes are deleted or not when terminating the VMs.

    • LinkVolumeDeviceNames: (optional) The VM device names.

    • LinkVolumeLinkDates: (optional) The dates and times at which the volumes were attached, in ISO 8601 date-time format (for example, 2020-06-30T00:00:00.000Z).

    • LinkVolumeLinkStates: (optional) The attachment states of the volumes (attaching | detaching | attached | detached).

    • LinkVolumeVmIds: (optional) One or more IDs of VMs.

    • SnapshotIds: (optional) The snapshots from which the volumes were created.

    • SubregionNames: (optional) The names of the Subregions in which the volumes were created.

    • TagKeys: (optional) The keys of the tags associated with the volumes.

    • TagValues: (optional) The values of the tags associated with the volumes.

    • Tags: (optional) The key/value combination of the tags associated with the volumes, in the following format: "Filters":{"Tags":["TAGKEY=TAGVALUE"]}.

    • VolumeIds: (optional) The IDs of the volumes.

    • VolumeSizes: (optional) The sizes of the volumes, in gibibytes (GiB).

    • VolumeStates: (optional) The states of the volumes (creating | available | in-use | updating | deleting | error).

    • VolumeTypes: (optional) The types of the volumes (standard | gp2 | io1).

  • NextPageToken: (optional) The token to request the next page of results. Each token refers to a specific page.

  • ResultsPerPage: (optional) The maximum number of logs returned in a single response (between 1 and 1000, both included). By default, 100.

The ReadVolumes command returns the following elements:

  • NextPageToken: The token to request the next page of results. Each token refers to a specific page.

  • ResponseContext: Information about the context of the response.

    • RequestId: The ID of the request.

  • Volumes: Information about one or more volumes.

    • CreationDate: The date and time (UTC) at which the volume was created.

    • Iops: The number of I/O operations per second (IOPS):

      • For io1 volumes, the number of provisioned IOPS

      • For gp2 volumes, the baseline performance of the volume

    • LinkedVolumes: Information about your volume attachment.

      • DeleteOnVmDeletion: If true, the volume is deleted when terminating the VM. If false, the volume is not deleted when terminating the VM.

      • DeviceName: The name of the device.

      • State: The state of the attachment of the volume (attaching | detaching | attached | detached).

      • VmId: The ID of the VM.

      • VolumeId: The ID of the volume.

    • Size: The size of the volume, in gibibytes (GiB).

    • SnapshotId: The snapshot from which the volume was created.

    • State: The state of the volume (creating | available | in-use | updating | deleting | error).

    • SubregionName: The Subregion in which the volume was created.

    • Tags: One or more tags associated with the volume.

      • Key: The key of the tag, with a minimum of 1 character.

      • Value: The value of the tag, between 0 and 255 characters.

    • VolumeId: The ID of the volume.

    • VolumeType: The type of the volume (standard | gp2 | io1).

Result sample
{
  "Volumes": [
    {
      "VolumeId": "vol-12345678",
      "Tags": [],
      "VolumeType": "gp2",
      "SubregionName": "eu-west-2a",
      "State": "in-use",
      "CreationDate": "2010-10-01T12:34:56.789Z",
      "Iops": 100,
      "LinkedVolumes": [
        {
          "VolumeId": "vol-12345678",
          "DeleteOnVmDeletion": false,
          "DeviceName": "/dev/sdb",
          "State": "attached",
          "VmId": "i-12345678"
        }
      ],
      "Size": 10
    }
  ],
  "ResponseContext": {
    "RequestId": "0475ca1e-d0c5-441d-712a-da55a4175157"
  }
}

Getting Information About Your Volumes Using AWS CLI

Before you begin: Install and configure AWS CLI. For more information, see Installing and Configuring AWS CLI.

To get information about your volumes, use the describe-volumes command following this syntax:

Request sample
$ aws ec2 describe-volumes \
    --profile YOUR_PROFILE \
    --volume-id vol-12345678 \
    --filters Name=X,Values=Y \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • (optional) volume-id: One or more volume IDs.

    If you do not specify any volume ID, the request returns a description of all your volumes.

  • (optional) filters: One or more filters, in the "Name=X,Values=Y" format.

    You can specify several values for a same filter using the "Name=X,Values=Y, Z" format.

    The following filters are available:

    • attachment.attach-time: The time at which the attachment was initiated.

    • attachment.delete-on-termination: Whether the volume is deleted when terminating the instance.

    • attachment.device: The device on which the volume is attached.

    • attachment.instance-id: The ID of the instance the volume is attached to.

    • attachment.status: The attachment state (attaching | attached | detaching | detached)

    • availability-zone: The Availability Zone in which the volume was created. For more information, see About Regions and Subregions.

    • create-time: The date and time of creation.

    • tag-key: The key of a tag associated with the resource.

    • tag-value: The value of a tag associated with the resource.

    • tag:XXXX: The value of a tag associated with the resource, where XXXX is the key of the tag.

      To filter a tag whose key is XXXX and value is YYYY, you can therefore use either of the following two formats:

      • --filters Name=tag-key,Values=XXXX Name=tag-value,Values=YYYY

      • --filters Name=tag:XXXX,Values=YYYY

    • volume-id: The ID of the volume.

    • volume-type: The type of the volume (standard | gp2 | io1).

    • snapshot-id: The snapshot from which the volume was created.

    • size: The size of the volume, in gibibytes (GiB).

    • status: The state of the volume (creating | available | in-use | deleting | error). For more information, see About Volumes.

  • endpoint: The endpoint corresponding to the Region you want to send the request to. For more information, see Installing and Configuring AWS CLI.

The describe-volumes command returns the following elements:

  • Volumes: Information about one or more volumes. This element contains the following information:

    • AvailabilityZone: The Availability Zone where the volume is.

    • Attachments: Information about your volume attachment to an instance. This element contains the following information:

      • AttachTime: The date and time at which the volume was attached to the instance.

      • InstanceId: The ID of the instance.

      • VolumeId: The ID of the volume.

      • State: The attachment state of the volume (attaching | detaching | attached | detached).

      • DeleteOnTermination: If true, the volume is deleted when terminating the instance. If false, the volume is not deleted when terminating the instance.

      • Device: The name of the device.

    • Tags: One or more tags associated with the volume. This element contains the following information:

      • TagKey: The key of the tag associated with the resource.

      • TagValue: The value of the tag associated with the resource.

    • VolumeType: The type of volume (standard | gp2 | io1). For more information about volume types, see About Volumes > Volume Types and IOPS.

    • VolumeId: The ID of the volume.

    • State: The state of the volume. For more information, see About Volumes.

    • (io1 and gp2 only) Iops: The number of IOPS. For io1 volumes, the number of provisioned IOPS. For gp2 volumes, the baseline performance of the volume. For more information, see About Volumes.

    • SnapshotId: The ID of the snapshot from which you created the volume.

    • CreateTime: The date and time of creation.

    • Size: The size of the volume (in GiB).

Result sample
"Volumes": [
    {
        "AvailabilityZone": "eu-west-2a",
        "Attachments": [
            {
                "AttachTime": "2015-03-18T09:36:45.728Z",
                "InstanceId": "i-12345678",
                "VolumeId": "vol-87654321",
                "State": "attached",
                "DeleteOnTermination": false,
                "Device": "/dev/xvdb"
            }
        ],
        "Tags": [],
        "VolumeType": "io1",
        "VolumeId": "vol-87654321",
        "State": "in-use",
        "Iops": 500,
        "SnapshotId": null,
        "CreateTime": "2015-01-26T11:01:08.381Z",
        "Size": 50
    }
]

Related Pages

Corresponding API Methods

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.