Extend storage nextcloud 20 Ubuntu 20.04 LTS snap

Hello I installed Ubuntu 20LTS and selected nextcloud during installation.
I works fine (nextcloud 20.0.8 installed and configured) except that the storage is limited to 180 Go despite I installed Ubuntu with 4To disk (VM)
image
How to extend this storage to maximum ?
using snap commands ?

sudo  fdisk -l
> Disk /dev/loop0: 69.9 MiB, 73277440 bytes, 143120 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> Disk /dev/loop1: 55.39 MiB, 58073088 bytes, 113424 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> Disk /dev/loop2: 55.46 MiB, 58142720 bytes, 113560 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> Disk /dev/loop3: 271.64 MiB, 284815360 bytes, 556280 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> Disk /dev/loop4: 31.9 MiB, 32600064 bytes, 63672 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> Disk /dev/loop5: 32.28 MiB, 33841152 bytes, 66096 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> Disk /dev/loop6: 70.39 MiB, 73797632 bytes, 144136 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> 
> 
> 
> 
> Disk /dev/sda: 4 TiB, 4398046511104 bytes, 8589934592 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: 63F3E975-086B-42A2-90F4-A85EFE72FA05
> 
> 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 8589932543 8587831296   4T Linux filesystem
> 
> 
> Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 200 GiB, 214748364800 bytes, 419430400 sectors
> Units: sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes


df -h 
Filesystem                         Size  Used Avail Use% Mounted on
    udev                               448M     0  448M   0% /dev
    tmpfs                               99M  1.2M   97M   2% /run
    /dev/mapper/ubuntu--vg-ubuntu--lv  196G  5.0G  181G   3% /
    tmpfs                              491M     0  491M   0% /dev/shm
    tmpfs                              5.0M     0  5.0M   0% /run/lock
    tmpfs                              491M     0  491M   0% /sys/fs/cgroup
    /dev/sda2                          976M  105M  805M  12% /boot
    /dev/loop1                          56M   56M     0 100% /snap/core18/1944
    /dev/loop0                          70M   70M     0 100% /snap/lxd/19188
    /dev/loop2                          56M   56M     0 100% /snap/core18/1997
    /dev/loop3                         272M  272M     0 100% /snap/nextcloud/27089
    /dev/loop4                          32M   32M     0 100% /snap/snapd/10707
    /dev/loop5                          33M   33M     0 100% /snap/snapd/11588
    /dev/loop6                          71M   71M     0 100% /snap/lxd/19647
    tmpfs                               99M     0   99M   0% /run/user/1000

thanks for help

I found the solution (easier to apply that to find …)

2 commands only :slight_smile:

sudo lvextend -l +100%FREE /dev/mapper/ubuntu–vg-ubuntu–lv
sudo resize2fs /dev/mapper/ubuntu–vg-ubuntu–lv

result
image

Hope it can help

1 Like