Hi, I have a droplet which running with 2gb RAM and 26GB disk. Now, I need to resize it into 3gb RAM and 60GB disk or above that.
I also have resized it twice, one with 3gb ram, and second with 4gb ram which have 80GB disk.
But the problem: when i go into my server through ssh, the storage disk is still same. 26GB and not increased.
current spec: / 4 GB Memory / 80 GB Disk / SGP1 - Ubuntu 18.04.1 x64 when i run df -H command
Filesystem Size Used Avail Use% Mounted on udev 2.1G 0 2.1G 0% /dev tmpfs 414M 938k 413M 1% /run /dev/vda1 26G 16G 11G 60% / tmpfs 2.1G 8.2k 2.1G 1% /dev/shm tmpfs 5.3M 0 5.3M 0% /run/lock tmpfs 2.1G 0 2.1G 0% /sys/fs/cgroup /dev/vda15 110M 3.6M 106M 4% /boot/efi overlay 26G 16G 11G 60% /var/lib/docker/overlay2/56c8f51f0c0b75168b729d598716146e8ffb68604acf7c448817e226b09398d8/merged overlay 26G 16G 11G 60% /var/lib/docker/overlay2/5cb36bb7ab70e70f940614d87254622553d2d448bfe5f03c958f45d3984d1c3c/merged overlay 26G 16G 11G 60% /var/lib/docker/overlay2/9ac08e3712a8bd4dd4543c82afbd65b0d1158c6a8ae6eb5644a350179d946feb/merged shm 68M 0 68M 0% /var/lib/docker/containers/8d333bb43599fa2e26eb0dbae657d1349a8c76d211838b47d88eb31ae2edb299/mounts/shm shm 68M 0 68M 0% /var/lib/docker/containers/de7b1d4562aedf152eaec9e373d6186b8e7eb7ed87d191228febb3bf1645a2e1/mounts/shm shm 68M 0 68M 0% /var/lib/docker/containers/459df6711c82334f120e35b0b74ef42f1075fc9b6766b00e851236f916ca3d8c/mounts/shm tmpfs 414M 0 414M 0% /run/user/0
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.
Try giving the server a reboot, then run fdisk -l
and check the size of the disk that’s returned, in particular the size listed on the first line in your output. It will look like this:
root@ubuntu-s-1vcpu-1gb-sgp1-01:~# fdisk -l
Disk /dev/vda: 25 GiB, 26843545600 bytes, 52428800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 4BE72FBF-27EC-46C1-AA51-D9AB03EFC2B6
Device Start End Sectors Size Type
/dev/vda1 227328 52428766 52201439 24.9G Linux filesystem
/dev/vda14 2048 10239 8192 4M BIOS boot
/dev/vda15 10240 227327 217088 106M Microsoft basic data
In your case if the increased disk has been added it should say ‘60GiB’. If that’s successful, then check the output again to find the partition with the type Linux filesystem
which should be the last one in order (ie. has the highest start sector), then just run resize2fs /dev/vda1
– double check the partition is vda1 though.
That will take a few seconds, then run df -H
again to verify.
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
Maybe try taking a snapshot, destroy it and recreate from snapshot after? But i’d wait for other comments before doing that, i’m sure there’s a faster way as snapshots of that size might take some time.