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.
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!
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.
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.The command to resize the filesystem depends on the filesystem type. If you don’t know what filesystem you’re using, check with df:
You can see the filesystem type in the second column of the output. The following example output shows the filesystem type is ext4.
For ext3/4 filesystems, use resize2fs to resize the filesystem.
For XFS, use xfs_growfs to resize the filesystem.
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