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

Increasing the size of a partition

The growpart utility allows you to resize partitions. If you have increased the size of the partition's underlying volume, for example, you can increase the size of the partition to make use of the additional space.

Before you start

To complete the actions presented below, you must have:

Important
  • Make sure to make a backup of your data using the snapshot feature beforehand to avoid any potential data loss
  • You must have partitioned your volume to follow the procedure below
  • If the partition you want to resize is mounted, you must unmount it beforehand
  1. Connect to your Instance using SSH.

  2. Use the lsblk command to identify your volume partition. Ensure that the partition is not mounted before you resize it. In the following example, we are resizing sdb1:

    root@scw-festive-agnesi:~# lsblk
    NAME    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
    sda       8:0    0  23.3G  0 disk
    ├─sda1    8:1    0  23.2G  0 part /
    ├─sda14   8:14   0     4M  0 part
    └─sda15   8:15   0   106M  0 part /boot/efi
    sdb       8:16   0 38.6G  0 disk
    └─sdb1    8:17   0 18.6G  0 part
  3. Use growpart to increase the partition size of your Block Storage volume (here sdb1):

    # Replace /dev/sdX 1 with the name of your partition
    growpart /dev/sdX 1

    An output similar to the following displays:

    CHANGED: partition=1 start=0 old: size=39061504 end=39061504 new: size=58490880 end=58490880
  4. Use lsblk to check that the partition was correctly resized. In the following output, you can see that our partition sbd1 went from 18.6G (step 2) to 27.9G.

    root@scw-festive-agnesi:~# lsblk
    NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
    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
    sdb       8:16   0 27.9G  0 disk
    └─sdb1    8:17   0 27.9G  0 part
Still need help?

Create a support ticket
No Results