🎉 Announcing new lower pricing — up to 40% lower costs for Cloud Servers and Cloud SQL! Read more →

Contents

Filesystems and Disks

Most Server Images provide a small partition by default, perhaps two gigabytes. This allows the Image to be used on all Server Types because there will always be enough space for it.

Some Images (in particular the Ubuntu images) are rigged to automatically grow the partition and file system during the first boot (you can control this behaviour if you wish with special user data).

Most other images leave the work for you to do manually, so when you first boot a server the file system might look very small:

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/vda1             1.3G  754M  501M  61% /

And the partition table might look like this:

$ sfdisk -uM -l /dev/vda

Disk /dev/vda: 20805 cylinders, 16 heads, 63 sectors/track
Units = mebibytes of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start   End    MiB    #blocks   Id  System
/dev/vda1         0+  1341-  1342-   1374023   83  Linux

The actual disk is the full size as per the Server Type, but the Images partition table just doesn’t use it all by default.

To make use of your whole disk, you’ll want to grow the partition and then grow the file system using the growpart tool:

$ growpart /dev/vda 1

In the case of the Ubuntu images, you can grow the default filesystem like this:

$ resize2fs /dev/vda1

Our official Centos images comes with LVM, so you grow the partition and then grow the LVM PV. Other images may have different arrangements.

Last updated: 12 May 2022 at 11:31 UTC

Try Brightbox risk-free with £50 free credit Sign up takes just two minutes...