CLI commands for Block Storage volumes

  1. List your current volumes:

    linode-cli volumes list
    
  2. 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
    
  3. 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
    
  4. Resize a volume:

    linode-cli volumes resize $volume_id --size 200
    

    📘

    You can only increase a volume's size.

  5. Delete a volume:

    linode-cli volumes delete $volume_id