Question

How do I expand my disk after doing a permanent resize?

Hi, I recently upgraded to the 40GB plan and I just realized that my hard drive space has not increased yet:

dev             999M     0  999M   0% /dev
run            1003M  368K 1003M   1% /run
/dev/vda3        20G   16G  2.7G  86% /
tmpfs          1003M     0 1003M   0% /dev/shm
tmpfs          1003M     0 1003M   0% /sys/fs/cgroup
tmpfs          1003M  2.3M 1001M   1% /tmp
tmpfs           201M     0  201M   0% /run/user/1000

How can I resolve this?

Subscribe
Share

Submit an 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.

If on Ubuntu:

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

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

resize2fs /dev/vda1

Check

df / -h

Hi @chenshuiluke Did you just upgrade CPU+RAM or did you upgrade CPU+RAM+Disk, where the process takes several minutes to complete? It should expand automatically unless you’ve modified the partitions manually. But I don’t know Arch, so maybe that process is manual. Can check the DigitalOcean control panel, click the droplet for more information, and it should state the amount of RAM, disk space and region right under the droplet name in the top.

This comment has been deleted

Hello, I’m experiencing the same… did 3 resizes from 25Gb until 80… Still it shows me 25… can someone help me?

@chenshuiluke

It’s possible that the conversion script doesn’t play well with the script(s) that DigitalOcean uses as I just test resized a 2GB Droplet to a 4GB Droplet and the disk increase took without any work on my end (other than powering on the Droplet).

Before

root@ubuntu-2gb-nyc2-01:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            993M     0  993M   0% /dev
tmpfs           200M   11M  190M   6% /run
/dev/vda1        39G  2.7G   36G   7% /
tmpfs          1000M     0 1000M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs          1000M     0 1000M   0% /sys/fs/cgroup
/dev/vda15      105M  3.6M  101M   4% /boot/efi
tmpfs           200M     0  200M   0% /run/user/0

After

root@ubuntu-2gb-nyc2-01:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            2.0G     0  2.0G   0% /dev
tmpfs           396M  5.6M  390M   2% /run
/dev/vda1        58G  2.7G   56G   5% /
tmpfs           2.0G     0  2.0G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/vda15      105M  3.6M  101M   4% /boot/efi
tmpfs           396M     0  396M   0% /run/user/0

Parted should work, though I’ve only used Arch a handful of times in the past, so short of standard tools, such as Parted, it’s hard to say what may be causing the issue.

Hi @hansen, I upgraded cpu+ram+disk. It should be noted that my system was originally a Debian system but I used the Arch conversion script to convert it to an arch box. I checked in my control panel and it says it has 40GB.