Table: scaleway_instance_volume - Query Scaleway Instance Volumes using SQL
Scaleway Instance Volumes are block storage devices that you can attach to your Scaleway Instances. They offer reliable, scalable, and high-performance storage for your cloud servers. Instance Volumes can be used for primary storage of data, to provide additional storage capacity, or to increase I/O performance.
Table Usage Guide
The scaleway_instance_volume
table provides insights into the storage capabilities and configurations of Scaleway instances. As a system administrator or DevOps engineer, you can explore volume-specific details through this table, including size, type, and state. Utilize it to monitor storage usage, verify configurations, and ensure optimal storage performance for your Scaleway instances.
Examples
Basic info
Explore which instances are active within your Scaleway project, along with their respective sizes and types. This can help you manage resources and identify areas for potential optimization or scaling.
select name, id, state, size, volume_type, zone, projectfrom scaleway_instance_volume;
select name, id, state, size, volume_type, zone, projectfrom scaleway_instance_volume;
Count of volumes by volume type
Analyze the distribution of volume types in your Scaleway instance to better understand your storage utilization. This could potentially help optimize storage resources by identifying which volume types are most commonly used.
select volume_type, count(id)from scaleway_instance_volumegroup by volume_type;
select volume_type, count(id)from scaleway_instance_volumegroup by volume_type;
List unattached volumes
Discover the segments that consist of unused storage volumes within your Scaleway instances. This can aid in optimizing storage utilization and reducing unnecessary costs.
select id, volume_typefrom scaleway_instance_volumewhere server is null;
select id, volume_typefrom scaleway_instance_volumewhere server is null;
List volumes with size more than 10 GB (10000000000 Bytes)
Identify instances where your Scaleway volumes exceed 10 GB to help manage your storage resources more effectively.
select name, id, state, size, volume_type, zone, projectfrom scaleway_instance_volumewhere size > 10000000000;
select name, id, state, size, volume_type, zone, projectfrom scaleway_instance_volumewhere size > 10000000000;
Find volumes attached to stopped instance servers
Determine the areas in which storage volumes are attached to servers that are not currently active. This is useful for optimizing resource usage and managing costs, as unused volumes may be unnecessarily incurring charges.
select v.name, v.id, v.state, v.volume_type, s.name as server_name, v.zone, v.projectfrom scaleway_instance_volume as v, scaleway_instance_server as swhere s.id = v.server ->> 'id';
select v.name, v.id, v.state, v.volume_type, s.name as server_name, v.zone, v.projectfrom scaleway_instance_volume as v, scaleway_instance_server as swhere s.id = json_extract(v.server, '$.id');
Schema for scaleway_instance_volume
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
creation_date | timestamp with time zone | The time when the volume was created. | |
export_uri | text | Specifies the volume NBD export URI. | |
id | text | = | An unique identifier of the volume. |
modification_date | timestamp with time zone | The time when the volume was last modified. | |
name | text | = | The user-defined name of the volume. |
organization | text | The ID of the organization where the volume resides. | |
project | text | The ID of the project where the volume resides. | |
server | jsonb | Specifies the server attached to the volume. | |
size | bigint | The size of the volume disk (in bytes). | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
state | text | The current state of the volume. | |
title | text | Title of the resource. | |
volume_type | text | The type of the volume. | |
zone | text | = | Specifies the zone where the volume resides. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- scaleway
You can pass the configuration to the command with the --config
argument:
steampipe_export_scaleway --config '<your_config>' scaleway_instance_volume