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!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
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:
I can’t unmount my root folder.
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:
and then run the resize command:
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