Volumes

This section details Volume-related Linode CLI commands.

list

Aliases: ls

Returns a paginated list of Volumes you have permission to view.

Usage

The format accepted by this command.

linode-cli volumes list [-h] [--label label] [--tags [tags] ]
    [--order-by {label,tags}] [--order {asc,desc}]

Sample

Examples of how this command might be used.

linode-cli volumes list

Filterable Attributes

Arguments used to define a filter for response entries.

Name

Type

Description

--label

str

The Volume’s label is for display purposes only.

--tags

[]str

An array of Tags applied to this object.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2018-01-01T00:01:01

When this Volume was created.

filesystem_path

str

/dev/disk/by-…me_my-volume

The full filesystem path for the Volume based on the Volume’s label.

hardware_type

str

nvme

The storage type of this Volume.

id

int

12345

The unique ID of this Volume.

label

str

my-volume

The Volume’s label is for display purposes only.

linode_id

int

12346

If a Volume is attached to a specific Linode, the ID of that Linode will be displayed here.

linode_label

str

linode123

If a Volume is attached to a specific Linode, the label of that Linode will be displayed here.

region

str

us-east

The unique ID of this Region.

size

int

30

The Volume’s size, in GiB.

status

str

active

The current status of the volume.

tags

[]str

[“example ta…er example”]

An array of Tags applied to this object.

updated

str

2018-01-01T00:01:01

When this Volume was last updated.


view

Get information about a single Volume.

Usage

The format accepted by this command.

linode-cli volumes view [-h] [--label label] [--tags [tags] ]
    [--order-by {label,tags}] [--order {asc,desc}] volumeId

Sample

Examples of how this command might be used.

linode-cli volumes view 12345

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

volumeId

int

ID of the Volume to look up.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2018-01-01T00:01:01

When this Volume was created.

filesystem_path

str

/dev/disk/by-…me_my-volume

The full filesystem path for the Volume based on the Volume’s label.

hardware_type

str

nvme

The storage type of this Volume.

id

int

12345

The unique ID of this Volume.

label

str

my-volume

The Volume’s label is for display purposes only.

linode_id

int

12346

If a Volume is attached to a specific Linode, the ID of that Linode will be displayed here.

linode_label

str

linode123

If a Volume is attached to a specific Linode, the label of that Linode will be displayed here.

region

str

us-east

The unique ID of this Region.

size

int

30

The Volume’s size, in GiB.

status

str

active

The current status of the volume.

tags

[]str

[“example ta…er example”]

An array of Tags applied to this object.

updated

str

2018-01-01T00:01:01

When this Volume was last updated.


create

Creates a Volume on your Account.

Usage

The format accepted by this command.

linode-cli volumes create [-h] [--config_id config_id]
    [--linode_id linode_id] [--region region] [--size size]
    [--tags tags] [--label label]

Sample

Examples of how this command might be used.

linode-cli volumes create \
    --label my-volume \
    --size 20 \
    --linode_id 12346 \
    --no-defaults

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--label *

str

my-volume

The Volume’s label, which is also used in the filesystem_path of the resulting volume.

--config_id

int

23456

When creating a Volume attached to a Linode, the ID of the Linode Config to include the new Volume in.

--linode_id

int

123

The Linode this volume should be attached to upon creation.

--region

str

N/A

The Region to deploy this Volume in.

--size

int

20

The initial size of this volume, in GB.

--tags

[]str

example tag

An array of Tags applied to this object.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2018-01-01T00:01:01

When this Volume was created.

filesystem_path

str

/dev/disk/by-…me_my-volume

The full filesystem path for the Volume based on the Volume’s label.

hardware_type

str

nvme

The storage type of this Volume.

id

int

12345

The unique ID of this Volume.

label

str

my-volume

The Volume’s label is for display purposes only.

linode_id

int

12346

If a Volume is attached to a specific Linode, the ID of that Linode will be displayed here.

linode_label

str

linode123

If a Volume is attached to a specific Linode, the label of that Linode will be displayed here.

region

str

us-east

The unique ID of this Region.

size

int

30

The Volume’s size, in GiB.

status

str

active

The current status of the volume.

tags

[]str

[“example ta…er example”]

An array of Tags applied to this object.

updated

str

2018-01-01T00:01:01

When this Volume was last updated.


update

Updates a Volume that you have permission to read_write.

Usage

The format accepted by this command.

linode-cli volumes update [-h] [--tags tags] [--label label]
    volumeId

Sample

Examples of how this command might be used.

linode-cli volumes update 12345 \
    --label my_volume

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

volumeId

int

ID of the Volume to look up.

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--label

str

my-volume

The Volume’s label is for display purposes only.

--tags

[]str

example tag

An array of Tags applied to this object.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2018-01-01T00:01:01

When this Volume was created.

filesystem_path

str

/dev/disk/by-…me_my-volume

The full filesystem path for the Volume based on the Volume’s label.

hardware_type

str

nvme

The storage type of this Volume.

id

int

12345

The unique ID of this Volume.

label

str

my-volume

The Volume’s label is for display purposes only.

linode_id

int

12346

If a Volume is attached to a specific Linode, the ID of that Linode will be displayed here.

linode_label

str

linode123

If a Volume is attached to a specific Linode, the label of that Linode will be displayed here.

region

str

us-east

The unique ID of this Region.

size

int

30

The Volume’s size, in GiB.

status

str

active

The current status of the volume.

tags

[]str

[“example ta…er example”]

An array of Tags applied to this object.

updated

str

2018-01-01T00:01:01

When this Volume was last updated.


delete

Aliases: rm

Deletes a Volume you have permission to read_write.

Usage

The format accepted by this command.

linode-cli volumes delete [-h] volumeId

Sample

Examples of how this command might be used.

linode-cli volumes delete 12345

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

volumeId

int

ID of the Volume to look up.


attach

Attaches a Volume on your Account to an existing Linode on your Account.

Usage

The format accepted by this command.

linode-cli volumes attach [-h] [--linode_id linode_id]
    [--config_id config_id]
    [--persist_across_boots persist_across_boots] volumeId

Sample

Examples of how this command might be used.

linode-cli volumes attach 12345 \
    --linode_id 12346 \
    --config_id 23456

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

volumeId

int

ID of the Volume to attach.

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--linode_id *

int

N/A

The ID of the Linode to attach the volume to.

--config_id

int

23456

The ID of the Linode Config to include this Volume in.

--persist_across_boots

bool

N/A

Defaults to true, if false is provided, the Volume will not be attached to the Linode Config.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2018-01-01T00:01:01

When this Volume was created.

filesystem_path

str

/dev/disk/by-…me_my-volume

The full filesystem path for the Volume based on the Volume’s label.

hardware_type

str

nvme

The storage type of this Volume.

id

int

12345

The unique ID of this Volume.

label

str

my-volume

The Volume’s label is for display purposes only.

linode_id

int

12346

If a Volume is attached to a specific Linode, the ID of that Linode will be displayed here.

linode_label

str

linode123

If a Volume is attached to a specific Linode, the label of that Linode will be displayed here.

region

str

us-east

The unique ID of this Region.

size

int

30

The Volume’s size, in GiB.

status

str

active

The current status of the volume.

tags

[]str

[“example ta…er example”]

An array of Tags applied to this object.

updated

str

2018-01-01T00:01:01

When this Volume was last updated.


clone

Creates a Volume on your Account.

Usage

The format accepted by this command.

linode-cli volumes clone [-h] [--label label] volumeId

Sample

Examples of how this command might be used.

linode-cli volumes clone 12345 \
    --label my-volume

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

volumeId

int

ID of the Volume to clone.

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--label *

str

my-volume

The Volume’s label is for display purposes only.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2018-01-01T00:01:01

When this Volume was created.

filesystem_path

str

/dev/disk/by-…me_my-volume

The full filesystem path for the Volume based on the Volume’s label.

hardware_type

str

nvme

The storage type of this Volume.

id

int

12345

The unique ID of this Volume.

label

str

my-volume

The Volume’s label is for display purposes only.

linode_id

int

12346

If a Volume is attached to a specific Linode, the ID of that Linode will be displayed here.

linode_label

str

linode123

If a Volume is attached to a specific Linode, the label of that Linode will be displayed here.

region

str

us-east

The unique ID of this Region.

size

int

30

The Volume’s size, in GiB.

status

str

active

The current status of the volume.

tags

[]str

[“example ta…er example”]

An array of Tags applied to this object.

updated

str

2018-01-01T00:01:01

When this Volume was last updated.


detach

Detaches a Volume on your Account from a Linode on your Account.

Usage

The format accepted by this command.

linode-cli volumes detach [-h] volumeId

Sample

Examples of how this command might be used.

linode-cli volumes detach 12345

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

volumeId

int

ID of the Volume to detach.

resize

Resize an existing Volume on your Account.

Usage

The format accepted by this command.

linode-cli volumes resize [-h] [--size size] volumeId

Sample

Examples of how this command might be used.

linode-cli volumes resize 12345 \
    --size 30

Parameters

Positional parameters used to define the resource this command should target.

Name

Type

Description

volumeId

int

ID of the Volume to resize.

Arguments

Additional fields used to execute this request.

Name

Type

Example

Description

--size *

int

30

The Volume’s size, in GiB.

Result Attributes

The attributes returned by this command.

Name

Type

Example

Description

created

str

2018-01-01T00:01:01

When this Volume was created.

filesystem_path

str

/dev/disk/by-…me_my-volume

The full filesystem path for the Volume based on the Volume’s label.

hardware_type

str

nvme

The storage type of this Volume.

id

int

12345

The unique ID of this Volume.

label

str

my-volume

The Volume’s label is for display purposes only.

linode_id

int

12346

If a Volume is attached to a specific Linode, the ID of that Linode will be displayed here.

linode_label

str

linode123

If a Volume is attached to a specific Linode, the label of that Linode will be displayed here.

region

str

us-east

The unique ID of this Region.

size

int

30

The Volume’s size, in GiB.

status

str

active

The current status of the volume.

tags

[]str

[“example ta…er example”]

An array of Tags applied to this object.

updated

str

2018-01-01T00:01:01

When this Volume was last updated.