Nextcloud not using entire disk for free space

Hey guys! Hope I’m posting this right, I’ve got an issue where my snap installation on an Ubuntu VM is not using the entire available disk space. Looks like a partition issues but I don’t know enough to fix it alone. See the partitions below:

root@nextcloud-blzxxr1:~# fdisk /dev/sda

Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Command (m for help): p

Disk /dev/sda: 2 TiB, 2199023255552 bytes, 4294967296 sectors
Disk model: Virtual disk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: C9608651-9F10-4F2A-B25B-EE9C11906C79

Device       Start        End    Sectors Size Type
/dev/sda1     2048       4095       2048   1M BIOS boot
/dev/sda2     4096    2101247    2097152   1G Linux filesystem
/dev/sda3  2101248 4294965247 4292864000   2T Linux filesystem


root@nextcloud-blzxxr1:~# df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                               1.9G     0  1.9G   0% /dev
tmpfs                              394M  1.2M  393M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  196G  6.6G  180G   4% /
tmpfs                              2.0G     0  2.0G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              2.0G     0  2.0G   0% /sys/fs/cgroup
/dev/sda2                          976M  103M  806M  12% /boot
/dev/loop0                          28M   28M     0 100% /snap/snapd/7264
/dev/loop1                          55M   55M     0 100% /snap/core18/1705
tmpfs                              394M     0  394M   0% /run/user/1000
/dev/loop2                          69M   69M     0 100% /snap/lxd/14804
/dev/loop3                         254M  254M     0 100% /snap/nextcloud/21521

root@nextcloud-blzxxr1:~# lsblk
NAME                      MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0                       7:0    0  27.1M  1 loop /snap/snapd/7264
loop1                       7:1    0    55M  1 loop /snap/core18/1705
loop2                       7:2    0    69M  1 loop /snap/lxd/14804
loop3                       7:3    0 253.4M  1 loop /snap/nextcloud/21521
sda                         8:0    0     2T  0 disk
├─sda1                      8:1    0     1M  0 part
├─sda2                      8:2    0     1G  0 part /boot
└─sda3                      8:3    0     2T  0 part
  └─ubuntu--vg-ubuntu--lv 253:0    0   200G  0 lvm  /
sr0                        11:0    1  1024M  0 rom

Could someone please help me fix this, I would really appreciate it!

Edit: I managed to resolve this on my own, just want to add how for anyone coming across this issue after snap installing NC.

You have to find the volume group name and logical volume name, in my case it was the default vg of “ubuntu-vg” and default lv of “ubuntu-lv”. I verified this by checking /dev/

So I used: lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv (was originally using lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv which returned errors).
Then I used: resize2fs -f /dev/ubuntu-vg/ubuntu-lv
This resolved my issue :slight_smile:

Sorry for you. I think without Snap there would not be the problem.

1 Like