Volumes commands
Basic command examples
Here are some common tasks for your Block Storage volumes you can perform with the Linode CLI.
List your current volumes
linode-cli volumes list
Create a new volume
This operation create a new volume with the size specified in GB:
linode-cli volumes create --label my-volume --size 100 --region us-east
Create a new volume and attach it to a Linode
Specify a linode_id to create the volume and automatically attach it to a specific Linode:
linode-cli volumes create --label my-volume --size 100 --linode_id $linode_id
Attach or detach the volume
Run these operations to attach or detach from a Linode:
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 about 4 hours ago
