Permission denied to resize filesystem
- Posted on May 15, 2020
- UbuntuUbuntu 16.04
- Asked by Tony D’Angelo
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:
- 15$ 1vcpu 3gb ram 60gb disk to
- 20$ 2vcpu 4gb ram 80gb disk
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?
source : https://www.digitalocean.com/community/questions/permission-denied-to-resize-filesystem