1
votes

I changed size of my persistent disk from 10GB to 20GB.

ScreenshotScreenshot of persistent disk image in Google Compute Engine

Now when I run df command in my server, I can still see only 10GB space.

user@edudrona-prod-vm:~$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 10186040 6755924 2889652 71% / udev 10240 0 10240 0% /dev tmpfs 1535964 8528 1527436 1% /run tmpfs 3839908 0 3839908 0% /dev/shm tmpfs 5120 0 5120 0% /run/lock tmpfs 3839908 0 3839908 0% /sys/fs/cgroup tmpfs 767984 0 767984 0% /run/user/1003

I am just running simple Wordpress site using Bitnami. Except from changing 10GB to 20GB, I did not make any change to increase disk space. Do I have to play around with settings anywhere else as well?

Update: I got following output from resize2fs command:

user@edudrona-prod-vm:~$ sudo resize2fs /dev/sda1 resize2fs 1.42.12 (29-Aug-2014) The filesystem is already 2620416 (4k) blocks long. Nothing to do!

1

1 Answers

1
votes

Take a look at the documentation here.

resize2fs alone is not sufficient because what it does is resizing to fill the extents of the carrier partition, but your /dev/sda1 is still the old size. You need to resize that first. On some operating systems the whole root partition upsizing is done automatically on boot, so try rebooting to see if just that does the trick. Otherwise, you'll need to follow the manual steps. Be careful and make sure to back things up first.