Question

I resized by droplet, it is marked as resized, but when I log into it half an hour later, it still seems to be the same size. What am I m...

I have resized my droplet’s disk from 40 to 80, and now it looks like this:

doctl compute droplet list
ID           Name               Public IPv4        Private IPv4    Public IPv6    Memory    VCPUs    Disk
1234         jenkins            x.x.x.x            10.132.0.3                     4096      2        80

After waiting 30 minutes, when I log into my droplet I am expecting the disk size to be 80, but it still seems to be 40:

ssh root@x.x.x.x
Filesystem      Size  Used Avail Use% Mounted on
udev            2.1G     0  2.1G   0% /dev
tmpfs           412M   43M  369M  11% /run
/dev/vda1        42G   42G     0 100% /
tmpfs           2.1G     0  2.1G   0% /dev/shm
tmpfs           5.3M     0  5.3M   0% /run/lock
tmpfs           2.1G     0  2.1G   0% /sys/fs/cgroup
/dev/loop1       43M   43M     0 100% /snap/snapd/20290
/dev/loop2       72M   72M     0 100% /snap/lxd/22753
/dev/vda15      110M  6.4M  104M   6% /boot/efi
/dev/loop0       67M   67M     0 100% /snap/core20/2015
/dev/loop3       43M   43M     0 100% /snap/snapd/20671
/dev/loop4       97M   97M     0 100% /snap/lxd/24061
/dev/loop5       68M   68M     0 100% /snap/core20/2105

I would expect to see something like this:

...
/dev/vda1        80G   42G    42G 50% /
...

But I’m still seeing

...
/dev/vda1        42G   42G     0 100% /
...

Wondering if I’m missing something on how to resize a droplet’s disk.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

alexdo
Site Moderator
Site Moderator badge
February 15, 2024
Accepted Answer

Heya

You can check our article on How to resize droplets

https://docs.digitalocean.com/products/droplets/how-to/resize/

In certain cases, a disk resize fails to resize the Droplet’s partition or filesystem. If you rerun df -h after a disk resizes and the output is unchanged, this usually indicates a problem.

To resize the partition, use the growpart command. In this command, /dev/vda is the name of the disk, separated by a space, and followed by the number of the partition to resize, 1.

growpart /dev/vda 1

The command to resize the filesystem depends on the filesystem type. If you don’t know what filesystem you’re using, check with df:

df -Th /dev/vda1

You can see the filesystem type in the second column of the output. The following example output shows the filesystem type is ext4.

Filesystem     Type  Size  Used Avail Use% Mounted on
/dev/vda1      ext4   50G  4.0G   45G  10% /

For ext3/4 filesystems, use resize2fs to resize the filesystem.

resize2fs /dev/vda1

For XFS, use xfs_growfs to resize the filesystem.

xfs_growfs /dev/vda1

If there is more than one partition on the disk, you may have to modify the above commands to more closely match the Droplet’s partition table. Partitions are numbered, so if you want to grow a specific partition, use its number in the growpart /dev/vda command, i.e. growpart /dev/vda 2 grows the second partition.

Regards

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.