Jump toUpdate content
How to increase your Block Storage volume size
With Block Storage it is possible to expand the volume size of an Instance.
If you have activated 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
- You have an account and are logged into the Scaleway Console
- You have created a Block Storage volume
How to increase the volume size from the Scaleway console
-
Click the Volumes tab on the Instance information page of the console. A list of your volumes displays.
-
Click «See more Icon» beside the volume you want to increase and then click Increase Volume.
-
Increase the size according to your preference with the «Plus Icon» button.
-
Click Increase your 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
It is recommeneded to make a backup of your data using the snapshot feature, before increasing the partition size of your volume. This helps to avoid any data loss.
-
Connect to your Instance using SSH.
-
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-friendly-beaver:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 61.9M 1 loop /snap/core20/1270
loop1 7:1 0 67.2M 1 loop /snap/lxd/21835
loop2 7:2 0 43.3M 1 loop /snap/snapd/14295
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
sdb 8:16 0 37.3G 0 disk
└─sdb1 8:17 0 23.3G 0 part /mnt/block-volume -
Unmount the volume:
umount /mnt/block-volume
-
Check that the volume is unmounted by running the
lsblk
command. -
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.
-
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
-
Run
e2fsck
on the Block Storage volume to check that everything went well. Replace/dev/sdX
with the name of your block volume in the following command:e2fsck /dev/sdX1
An output like the following example displays. The status of your file system should be
clean
root@scw-elegant-franklin:~# e2fsck /dev/sda
e2fsck 1.45.5 (07-Jan-2020)
/dev/sda: clean, 11/1827840 files, 158770/7324218 blocks -
Remount the volume to access the files stored on it:
mount -o defaults /dev/sda /mnt/block-volume