Table: oci_core_volume_group - Query OCI Core Volume Groups using SQL
An OCI Core Volume Group is a resource within Oracle Cloud Infrastructure that allows users to manage block storage volumes as a single entity. You can use volume groups to batch manage the lifecycle of your block volumes, including backups, clones, and volume group exports. Volume Groups provide a simple and scalable solution to manage and monitor block storage volumes.
Table Usage Guide
The oci_core_volume_group
table provides insights into the volume groups within Oracle Cloud Infrastructure's Core service. As a Cloud Engineer, explore volume group-specific details through this table, including volume group state, availability domain, and associated metadata. Utilize it to uncover information about volume groups, such as their size, the volumes they contain, and their backup policies.
Examples
Basic info
Explore which volume groups are currently active by assessing their lifecycle state and creation times. This can help manage resources more effectively by identifying older, potentially unused groups.
select id as volume_group_id, display_name, lifecycle_state, time_createdfrom oci_core_volume_group;
select id as volume_group_id, display_name, lifecycle_state, time_createdfrom oci_core_volume_group;
List volume groups in a faulty state
Identify instances where volume groups are in a faulty state to quickly address potential issues and maintain system efficiency.
select id, display_name, lifecycle_state, time_createdfrom oci_core_volume_groupwhere lifecycle_state = 'FAULTY';
select id, display_name, lifecycle_state, time_createdfrom oci_core_volume_groupwhere lifecycle_state = 'FAULTY';
List volume groups with size greater than 1024 GB
Explore which volume groups exceed a size of 1024 GB to manage storage allocation effectively and prevent potential capacity issues.
select id, display_name, lifecycle_state, size_in_gbsfrom oci_core_volume_groupwhere size_in_gbs > 1024;
select id, display_name, lifecycle_state, size_in_gbsfrom oci_core_volume_groupwhere size_in_gbs > 1024;
List volume groups created in the root compartment
Explore which volume groups within the root compartment are created. This can be useful for understanding the distribution and organization of your data storage.
select id, display_name, lifecycle_state, tenant_id, compartment_idfrom oci_core_volume_groupwhere compartment_id = tenant_id;
select id, display_name, lifecycle_state, tenant_id, compartment_idfrom oci_core_volume_groupwhere compartment_id = tenant_id;
List volume groups created in the last 30 days
Explore the recently created volume groups in the last month to manage resources more effectively and to keep track of changes in your infrastructure. This can be particularly useful for monitoring resource allocation and infrastructure scaling over time.
select id, display_name, lifecycle_state, time_created, size_in_gbsfrom oci_core_volume_groupwhere time_created >= now() - interval '30' day;
select id, display_name, lifecycle_state, time_created, size_in_gbsfrom oci_core_volume_groupwhere time_created >= datetime('now', '-30 day');
Get volume details for the volume groups
Explore the specifics of volume groups and their associated volumes to better manage storage resources. This can be particularly useful in understanding the auto-tuned VPUs per GB for each volume within a group, aiding in resource optimization.
select g.id as volume_group_id, g.display_name as volume_group_diplay_name, v.id as volume_id, v.auto_tuned_vpus_per_gbfrom oci_core_volume_group as g, oci_core_volume as v, jsonb_array_elements_text(volume_ids) as iwhere v.id = i;
select g.id as volume_group_id, g.display_name as volume_group_diplay_name, v.id as volume_id, v.auto_tuned_vpus_per_gbfrom oci_core_volume_group as g, oci_core_volume as v, json_each(volume_ids) as iwhere v.id = i.value;
Schema for oci_core_volume_group
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
availability_domain | text | = | The availability domain of the volume group. |
compartment_id | text | = | ColumnDescriptionCompartment |
defined_tags | jsonb | Defined tags for resource. Defined tags are set up in your tenancy by an administrator. Only users granted permission to work with the defined tags can apply them to resources. | |
display_name | text | = | A user-friendly name. |
freeform_tags | jsonb | Free-form tags for resource. This tags can be applied by any user with permissions on the resource. | |
id | text | = | The OCID for the volume group. |
is_hydrated | boolean | Specifies whether the cloned volume's data has finished copying from the source volume group or backup. | |
lifecycle_state | text | = | The current state of a volume group. |
region | text | The OCI region in which the resource is located. | |
size_in_gbs | bigint | The aggregate size of the volume group in GBs. | |
size_in_mbs | bigint | The aggregate size of the volume group in MBs. | |
source_details | jsonb | The volume group source, either an existing volume group in the same availability domain or a volume group backup. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
tags | jsonb | A map of tags for the resource. | |
tenant_id | text | =, !=, ~~, ~~*, !~~, !~~* | The OCID of the Tenant in which the resource is located. |
tenant_name | text | The name of the Tenant in which the resource is located. | |
time_created | timestamp with time zone | The date and time the volume group was created. | |
title | text | Title of the resource. | |
volume_group_replicas | jsonb | The list of volume group replicas of this volume group. | |
volume_ids | jsonb | OCIDs for the volumes in this volume group. |
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)" -- oci
You can pass the configuration to the command with the --config
argument:
steampipe_export_oci --config '<your_config>' oci_core_volume_group