Interacting with Block Storage via the CLI

Prerequisites

Update to the latest Exoscale CLI (minimum version: 1.74.5). For installation, visitExoscale CLI Installation.

Create a Block Storage Volume

exo compute block-storage create volume-test-1 --size 100 --zone ch-gva-2

List Block Storage Volumes

exo compute block-storage list --zone ch-gva-2

Attach a Block Storage Volume to an Instance

exo compute block-storage attach volume-test-1 my-instance --zone ch-gva-2

Detach a Block Storage Volume

exo compute block-storage detach volume-test-1 --zone ch-gva-2

Create a Snapshot

exo compute block-storage snapshot create volume-test-1 --zone ch-gva-2

Create a Volume from a Snapshot

exo compute block-storage create volume-test-from-snapshot --snapshot <snapshot_name> --zone ch-gva-2