By TokyoRob
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!
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!
Hi guys,
I had the same issue as above. Talking with DO Support it sounds like this is an occasional issue with resizing disk space on droplets. resize2fs didn’t work for me either, but following these instructions to repartition and then resize2fs did work for me:
https://linuxconfig.org/how-to-resize-ext4-root-partition-live-without-umount
DO Support suggested this command but I had already run the fdisk process above - it should do the same thing:
growpart /dev/vda1
Make sure to snapshot your droplet before attempting the above!
Dougie.
Hi TokyoRob,
First unmount the /dev/vda1 using below command.
sudo umount /dev/vda1
Now run the sudo resize2fs /dev/vda1
Hope it will help…
HOW WILL I INCREASE SIZE FOR UBUNTU
Hi, i am using two operating systems windows and ubuntu parallelly, i alloted 20GB to ubuntu and remainig space to windows but now the space in ubuntu is not enough to me i want to increase disk size. so, plz any one tell me how to increase disk space in ubuntu
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.