Question
How do I make Ubuntu's resize2fs command work after increasing Droplet size?
Earlier today I increased the drive space on my Ubuntu droplet from 30GB to 40GB. After restarting, the drive size has increased:
> fdisk -l
...
Disk /dev/vda: 40 GiB, 42949672960 bytes, 83886080 sectors
But naturally the filesystem itself is still 30GB:
> df -h
...
/dev/vda1 30G 16G 13G 55% /
> fdisk -l
...
/dev/vda1 * 2048 62910539 62908492 30G 83 Linux
The problem is that the resize2fs command doesn’t behave as expected.
> sudo resize2fs /dev/vda1
resize2fs 1.42.12 (29-Aug-2014)
The filesystem is already 7863561 (4k) blocks long. Nothing to do!
Have I missed a step here? As I understand it, I should be able to increase the size of the root filesystem without unmounting it. Is there something I need to do to the partition table to tell resize2fs that the additional 10GiB is there for the taking?
Any suggestions would be much appreciated!
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.
×
Hi,
Commands actually do work. Make sure you free some disk. I had same issue until I realized there was no free space at all. Everything worked fine after releasing some disk space.