Skip to main content

volumes

Creates, updates, deletes, gets or lists a volumes resource.

Overview

Namevolumes
TypeResource
Idlinode.linode.volumes

Fields

The following fields are returned by SELECT queries:

Returns the Block Storage volumes attached to this Linode.

NameDatatypeDescription
idintegerRead-only The unique identifier for the volume.
linode_idintegerThe unique identifier of the Linode this volume is attached to, if applicable.
createdstring (date-time)Read-only When this volume was created. (example: 2025-01-01T00:01:01)
encryptionstringRead-only Whether encryption is enabled on this volume. (enabled, disabled) (example: enabled)
filesystem_pathstringRead-only The full file system path for the volume, based on its label. The path is /dev/disk/by-id/scsi-0Linode_Volume_label. (example: /dev/disk/by-id/scsi-0Linode_Volume_my-volume)
hardware_typestringRead-only The storage type of this volume. This can be either hdd to emulate a hard disk drive for the volume, or nvme to emulate a non-volatile memory express solid state drive. (hdd, nvme) (example: nvme)
io_readybooleanRead-only Indicates whether the volume is successfully attached to a Linode and ready for read and write operations.
labelstringFilterable The name of the volume. A label can be up to 32 characters long and contain alphanumeric characters, hyphens, and underscores. This value is also used in the volume's filesystem_path. (example: my-volume, pattern: ^[a-zA-Z]((?!--|__)[a-zA-Z0-9-_])+$)
linode_labelstringRead-only The name of the Linode this volume is attached to, if applicable. (example: linode123)
regionstringThe unique identifier for the region where the volume lives. (example: us-iad)
sizeintegerThe volume's size, in gigabytes.
statusstringRead-only The current status of the volume. This can be one of: - creating. The API is creating the volume and it's not ready for use. - active. The volume is online and ready for use. - resizing. The volume's capacity is being upgraded. - key_rotating. The volume's encryption keys are being rotated to new values. Requests to resize, delete, or clone a volume fail during encryption key rotation. (creating, active, resizing, key_rotating) (example: active)
tagsarrayFilterable Any tags applied to this object. Use tags to label and organize your cloud computing resources.
updatedstring (date-time)Read-only When this volume was last updated. (example: 2025-01-01T00:01:01)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectlinodeIdpage, page_sizeView the Block Storage volumes attached to this Linode.

Learn more...

Learn more...

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
linodeIdstringID of the Linode to look up.
pageintegerThe page of a collection to return.
page_sizeintegerThe number of items to return per page.

SELECT examples

View the Block Storage volumes attached to this Linode.

Learn more...

Learn more...

SELECT
id,
linode_id,
created,
encryption,
filesystem_path,
hardware_type,
io_ready,
label,
linode_label,
region,
size,
status,
tags,
updated
FROM linode.linode.volumes
WHERE linodeId = '{{ linodeId }}' -- required
AND page = '{{ page }}'
AND page_size = '{{ page_size }}'
;