CLI commands for Block Storage volumes
-
List your current volumes:
linode-cli volumes list
-
Create a new volume, with the size specified in GB:
linode-cli volumes create --label my-volume --size 100 --region us-east
Specify a
linode_id
to create the volume and automatically attach it to a specific Compute Instance:linode-cli volumes create --label my-volume --size 100 --linode_id $linode_id
-
Attach or detach the volume from a Compute Instance:
linode-cli volumes attach $volume_id --linode_id $linode_id linode-cli volumes detach $volume_id
-
Resize a volume:
linode-cli volumes resize $volume_id --size 200
You can only increase a volume's size.
-
Delete a volume:
linode-cli volumes delete $volume_id
Updated 2 months ago