Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions menu/navigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -4998,6 +4998,10 @@
"label": "Managing a volume",
"slug": "managing-a-volume"
},
{
"label": "Increasing volume size via the API",
"slug": "increasing-volume-size"
},
{
"label": "Identifying the API managing Block Storage volumes and snapshots",
"slug": "identifying-volume-snapshot-api"
Expand Down
55 changes: 55 additions & 0 deletions pages/block-storage/api-cli/increasing-volume-size.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
meta:
title: &title Increasing the size of Block Storage volumes via the Scaleway API
description: &desc This page explains how to increase the size of a Block Storage volume using the Scaleway API.
content:
h1: *title
paragraph: *desc
tags: increase expand increment raise storage volume block
dates:
validation: 2025-03-04
posted: 2025-03-04
categories:
- block-storage
- storage
---

The Block storage API allows you to interact with Block Storage volumes programmatically through API calls. Refer to the [Developers reference website](https://www.scaleway.com/en/developers/api/block/) for more information on how to use the Block Storage API.

<Macro id="requirements" />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- A valid [API key](/iam/how-to/create-api-keys/)
- A [Block Storage volume](/instances/api-cli/creating-a-volume/)

1. Run the command below to list your Block Storage volumes. Do not forget to replace the `{zone}` placeholder with the desired Availability Zone (`fr-par-1`, `nl-ams-2`, etc.):
```
curl -X GET \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
"https://api.scaleway.com/block/v1alpha1/zones/{zone}/volumes"
```

An output similar to the following displays:

```
{"volume": {"creation_date": "2020-06-02T08:04:50.094118+00:00", "server": null, "id": "<VOLUME_ID>", "size": 25000000000, "name": "myAwesomeVolume", "zone": "<REGION>", "export_uri": null, "volume_type": "b_ssd", "modification_date": "2020-06-02T08:04:50.094118+00:00", "state": "available", "organization": "<ORGANIZATION_ID>"}}
```

2. To modify the volume size, run the request below. Do not forget to replace the placeholders with the appropriate value:
```
curl -X PATCH \
-H "X-Auth-Token: $SCW_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{"size" : "{size_in_bytes}"}' \
"https://api.scaleway.com/block/v1alpha1/zones/{zone}/volumes/{volume_id}"
```
<Message type="note">
You can only increase the size of a Block Storage volume. Reducing its size is not permitted due to technical constraints.
</Message>
An output similar to the following displays:
```
{"volume": {"creation_date": "2020-06-02T08:04:50.094118+00:00", "server": null, "id": "VOLUME_ID", "size": 26000000000, "name": "new_name", "zone": "REGION", "export_uri": null, "volume_type": "b_ssd", "modification_date": "2020-06-02T08:08:27.385208+00:00", "state": "resizing", "organization": "ORGANIZATION_ID"}}
```

The size of your volume has been updated.
6 changes: 4 additions & 2 deletions pages/instances/api-cli/increasing-volume-size.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ meta:
content:
h1: Increasing Block Storage volumes via the Instance API
paragraph: This page explains how to increase a Block Storage volume
tags: increase expland increment raise storage volume block
tags: increase expand increment raise storage volume block
dates:
validation: 2024-08-26
posted: 2020-01-10
Expand All @@ -14,12 +14,14 @@ categories:
- storage
---

The Instances API allows you to interact with Block Storage volumes programmatically through API calls. To increase the size of a volume using the Block Storage API, refer to the [dedicated documentation](/block-storage/api-cli/increasing-volume-size/).

<Macro id="requirements" />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- A valid [API key](/iam/how-to/create-api-keys/)
- A [Block Storage volume](/instances/api-cli/creating-a-volume/)
- A [Block Storage volume](/instances/api-cli/creating-a-volume/) attached to an Instance


1. Inspect the volume and verify its name, size, and if the type is `b_ssd` by running the following request.
Expand Down