Using Block Storage with the Scaleway CLI
This page contains basic commands to manage your Block Storage volumes using the Scaleway CLI.
Before you start
To complete the actions presented below, you must have:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- Installed and configured the Scaleway CLI
Creating a volume
The following command allows you to create a volume:
scw block volume create name=<NAME> size=<SIZE_IN_GB>Listing your volumes
The following command allows you to list volumes present in your Organization:
scw block volume listGetting details on a volume
The following command allows you to get information about a given volume:
scw block volume get <VOLUME_ID>Updating a volume
The following command allows you to modify the settings of a volume:
scw block volume update <VOLUME_ID>Attaching a volume to an Instance
The following command allows you to attach a volume to an Instance:
scw instance server attach-volume server-id=<INSTANCE_ID> volume-id=<VOLUME_ID> volume-type=<VOLUME_TYPE>Once your volume is attached to the desired Instance, you must mount it from within the Instance to use it. Refer to the dedicated documentation for more information.
Detaching a volume from an Instance
The following command allows you to detach a volume from an Instance:
scw instance server detach-volume server-id=<INSTANCE_ID> volume-id=<VOLUME_ID>Deleting a volume
The following command allows you to delete a given volume:
scw block volume delete <VOLUME_ID>For comprehensive information on the different CLI commands to interact with Scaleway Block Storage (including the different arguments for each command), refer to the dedicated Scaleway CLI documentation.