As described in the doc page I tried to resize my droplet running Ubuntu 16
root@ubuntu:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
I resized from:
So I turned off the droplet, launched resize and turned back on.
Then I run df -h and I don’t see 80gb but 60gb.
root@ubuntu:~# df -Th /dev/vda1
Filesystem Type Size Used Avail Use% Mounted on
/dev/vda1 ext4 58G 25G 34G 43% /
So as described in the doc page I tried to resize the disk checking that i use ext4:
root@ubuntu:~# gdisk -l /dev/vda
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/vda: 167772160 sectors, 80.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 18451246-590F-4CCF-88A0-81943A03E074
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 167772126
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 227328 167772126 79.9 GiB 8300
14 2048 10239 4.0 MiB EF02
15 10240 227327 106.0 MiB 0700
But the partition is not resized:
root@ubuntu:~# df -Th /dev/vda1
Filesystem Type Size Used Avail Use% Mounted on
/dev/vda1 ext4 58G 25G 34G 43% /
When I do:
root@ubuntu:~# growpart /dev/vda 1
NOCHANGE: partition 1 is size 167544799. it cannot be grown
or:
root@ubuntu:~# resize2fs /dev/vda1
resize2fs 1.42.13 (17-May-2015)
Filesystem at /dev/vda1 is mounted on /; on-line resizing required
old_desc_blocks = 4, new_desc_blocks = 5
resize2fs: Permission denied to resize filesystem
I have no luck and I can’t expand the disk.
any help?
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!
Hello, @tonydangelo123
What you can do is to first run a file system check for the partition and then resize the file system. You can check if everything is okay with this command:
e2fsck -f /dev/vda1
and then run the resize command:
resize2fs /dev/vda1
You can also check our official documentation for resizing droplets:
https://www.digitalocean.com/docs/droplets/how-to/resize/
Let me know how it goes.
Regards, Alex
Hi @alexdo,
thank you for your message.
I did follow the documentation, and my main problem is that I’m trying to resize the partition where my root folder is mounted /
So when I run:
root@ubuntu:~# e2fsck -f /dev/vda1
e2fsck 1.42.13 (17-May-2015)
/dev/vda1 is mounted.
e2fsck: Cannot continue, aborting.
I can’t unmount my root folder.
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.