Scaleway Block Storage provides network-attached storage that can be plugged in and out of cloud products such as Instances like a virtual hard-drive. Block Storage devices are independent from the local storage of Instances, and the fact that they are accessed over a network connection makes it easy to move them between Instances in the same Availability Zone.
Important
This page includes the API reference documentation for all Block Storage Low Latency offers. If you wish to use the Basic Block Storage offers, refer to the Instances API documentation page.
Quickstart
-
Configure your environment variables.
Note
This is an optional step that seeks to simplify your usage of the Block Storage API. See Availability Zones below for help choosing an Availability Zone. You can find your Project ID in the Scaleway consoleOpen in new context.
CodeImportant
Make sure that the Availability Zone (AZ) is the same as the one of your Instance. Block volumes can only be attached to Instances in the same AZ.
-
Edit the POST request payload you will use to create your Block volume. Replace the parameters in the following example:
CodeParameter Description project_idREQUIRED The ID of the Project you want to create your Block volume in. To find your Project ID you can list the projects or consult the Scaleway consoleOpen in new context. nameREQUIRED Name of the volume perf_iopsREQUIRED The maximum IO/s expected. This amount is a shared limit between write and read operations, it will be determined by your usage. You must specify either 5000, or15000.tagsThe list of tags ["tag1", "tag2", ...]that will be associated with the Database Instance. Tags can be appended to the query of the List Database Instances call to show results for only the Database Instances using a specific tag. You can also combine tags to list Database Instances that possess all the appended tags.from_emptyWhen you create a brand new volume, as opposed to creating a volume from a snapshot, you must specify its size. sizeVolume size. The value should be expressed in bytes. For example 30GB is expressed as 30000000000 -
Create a Block volume by running the following command. Make sure you include the payload you edited in the previous step.
CodeAn output similar to the following displays :
CodeNote
Make sure to save the
idof your volume, as it will be required in the next step. -
Attach your volume to your Instance using the Instance API Update an Instance call.
Note
Make sure the Block volume is created and ready before attaching it to the Instance.
Important
Make sure you include all your Instance's existing volumes in the payload, as the update can only be done to all or none of the volumes.
Your Block volume is ready to be used with your Instance.
Refer to the How to mount and use your Block volumeOpen in new context documentation page to do so.
Requirement
To perform the following steps, you must first ensure that:
bssd and sbs. The IOPS can be chosen for volumes of the sbs storage class