Skip to navigationSkip to main contentSkip to footerScaleway DocsAsk our AI
Ask our AI

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:

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 list

Getting 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

Note

Attaching a volume to an Instance must be done using the Instances CLI. Refer to the dedicated documentation for more information.

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

Note

Detaching a volume from an Instance must be done using the Instances CLI. Refer to the dedicated documentation for more information.

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.

Still need help?

Create a support ticket
No Results