HomeStorageBlock StorageHow to
Increase the volume size
Jump toUpdate content

How to increase your Block Storage volume size

Reviewed on 01 December 2022Published on 10 January 2020

With Block Storage it is possible to expand the volume size of an Instance.

Security & Identity (IAM):

You may need certain IAM permissions to carry out some actions described on this page. This means:

  • you are the Owner of the Scaleway Organization in which the actions will be carried out, or
  • you are an IAM user of the Organization, with a policy granting you the necessary permission sets
Requirements:

How to increase the volume size from the Scaleway console

  1. Click the Volumes tab on the Instance information page of the console. A list of your volumes displays.
    Tip:

    You must go to the Volumes tab in the Scaleway console and select the volume corresponding to the Instance you want to increase.

  2. Click «See more Icon» beside the volume you want to increase and then click Increase Volume.
  3. Increase the size according to your preference with the «Plus Icon» button.
  4. Click Increase volume to confirm.
    Note:

    Currently, only the increase of a Block Storage volume is supported. The maximum size of a Block volume is 10 TB.

How to increase the partition size of the volume

Tip:

It is recommended to make a backup of your data using the snapshot feature, before increasing the partition size of your volume. This helps to avoid any potential data loss.

  1. Connect to your Instance using SSH.

  2. Use the lsblk command to identify your Block Storage volume’s mount point. In the following example the volume is mounted at /mnt/block-volume:

    root@scw-distracted-keldysh:~# lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
    loop0 7:0 0 63.3M 1 loop /snap/core20/1852
    loop1 7:1 0 111.9M 1 loop /snap/lxd/24322
    loop2 7:2 0 49.8M 1 loop /snap/snapd/18596
    sda 8:0 0 9.3G 0 disk
    ├─sda1 8:1 0 9.2G 0 part /
    ├─sda14 8:14 0 4M 0 part
    └─sda15 8:15 0 106M 0 part /boot/efi
  3. Use growpart to increase the partition size of your block storage volume (here /dev/sdb1):

    growpart /dev/sdX 1
    Tip:

    Take a note of the space between the device identifier and the partition number.

  4. Increase the partition size of the volume using resize2fs. Replace /dev/sdX with the name of your block volume in the following command:

    resize2fs -p /dev/sdX1
  5. Check the new block volume size using lsblk:

    root@scw-distracted-keldysh:~# lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
    loop0 7:0 0 63.3M 1 loop /snap/core20/1852
    loop1 7:1 0 111.9M 1 loop /snap/lxd/24322
    loop2 7:2 0 49.8M 1 loop /snap/snapd/18596
    sda 8:0 0 18.6G 0 disk
    ├─sda1 8:1 0 18.5G 0 part /
    ├─sda14 8:14 0 4M 0 part
    └─sda15 8:15 0 106M 0 part /boot/efi
See Also