Nextcloud displaying incorrect available disk capacity

Hi guys,

Firstly, thanks in advance for any help provided. I’m running Nextcloud in a docker container. I’ve set up a volume on a 2TB external hard disk to store the associated files for the users but for some reason, Nextcloud is displaying the available capacity for the system partition.

Here’s a screenshot showing 98GB available (same availability as the system volume per the df -h output below).

I can’t seem to upload & embed images in this post, so here’s a link: Imgur: The magic of the Internet

The nextcloud docker data volume is using /media/ext2b_1/nextcloud_data which is mounted to a 2TB external disk

root@nas:/home/john# docker volume inspect john_nextcloud_data
[
    {
        "CreatedAt": "2022-06-08T16:35:51Z",
        "Driver": "local",
        "Labels": {
            "com.docker.compose.project": "john",
            "com.docker.compose.version": "1.29.2",
            "com.docker.compose.volume": "nextcloud_data"
        },
        "Mountpoint": "/var/lib/docker/volumes/john_nextcloud_data/_data",
        "Name": "john_nextcloud_data",
        "Options": {
            "device": "/media/ext2b_1/nextcloud_data",
            "o": "bind",
            "type": "none"
        },
        "Scope": "local"
    }
]

Nextcloud is reporting available space as 98GB which matches up to the system volume, not 1.8TB which is the external hard disk.

root@nas:/home/john# df -h
Filesystem                             Size  Used Avail Use% Mounted on
tmpfs                                  763M  3.3M  759M   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv      115G   12G   98G  11% /
tmpfs                                  3.8G     0  3.8G   0% /dev/shm
tmpfs                                  5.0M     0  5.0M   0% /run/lock
/dev/sda2                              2.0G  243M  1.6G  14% /boot
/dev/sda1                              1.1G  5.3M  1.1G   1% /boot/efi
/dev/mapper/ext2tb_1--vg-ext2tb_1--lv  1.8T  404M  1.7T   1% /media/ext2b_1
overlay                                115G   12G   98G  11% /var/lib/docker/overlay2/432e757f17a6898befd78e9ca7f8f8ff3dd7c567e88f9029de1936d0252e3824/merged
overlay                                115G   12G   98G  11% /var/lib/docker/overlay2/f031b95e307d0283b29a00da27ca3022ab31f21acee5449480d154a4e32d87e5/merged
overlay                                115G   12G   98G  11% /var/lib/docker/overlay2/bd75a8546e7d58aa81eee711242bceb52593b4cb55a64a3f9a43a9ee22f3b564/merged
overlay                                115G   12G   98G  11% /var/lib/docker/overlay2/31e955953d0402eb2979520c82a1121102d9d6d5660feafbcf9fd7ac46643c08/merged
overlay                                115G   12G   98G  11% /var/lib/docker/overlay2/0f517e91baa05eb271b7326642e7550cbd091cee64b774e9be7a10373037fbe9/merged
tmpfs                                  763M  4.0K  763M   1% /run/user/1000

simply mounting your data drive into the the container is useless as the application doesn’t use it (until you setup “external storage → local”)

you need to mount the data directory of the container to your mountpoint:

volumes:
  - ./media/ext2b_1/nextcloud_data:/var/www/html/data

copy existing data there before you change the mount points otherwise you loose all existing data