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:
- A Scaleway account logged into the console
- Owner status or IAM permissions allowing you to perform actions in the intended Organization
- An Instance
- Attached an additional Block Storage volume to your Instance
-
Connect to your Instance using SSH.
-
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 resizingsdb1
: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
-
Use
growpart
to increase the partition size of your Block Storage volume (heresdb1
):# 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
-
Use
lsblk
to check that the partition was correctly resized. In the following output, you can see that our partitionsbd1
went from18.6G
(step 2) to27.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