AIO (Docker compose) not using NFS Data directory on nas (OMV 7) - how to find the error ?

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • Docker AIO fresh Installation
  • Operating system and version (e.g., Ubuntu 24.04):
    • Docker on debian (VM on Proxmox)
  • OMV 7 as NFS Share Server

********

Hello,

I want to install a new NC AIO (docker compose) with data backup from old instance.
I want to connect a NFS file share on OMV 7 for the data directory.

I did the following steps:

  • mount the NFS File on the docker host ( /mnt/nextcloud/ncdata ) - there is an subfolder /data)

  • set the chmod (chmod 755 -R /mnt/nextcloud)

  • set the ownership ( chown -R 33:0 /mnt/nextcloud ) …also tried chown -R 33:33 /mnt/nextcloud)

  • at compose.yaml NEXTCLOUD_DATADIR: /mnt/nextcloud/ncdata/data

No Error in the Docker console during start with hints on a share/volume problem.

Starting the from Backup Recover the NFS share keeps empty and the docker file system runs into "no space left on device"

I also tried to create volume nextcloud_aio_nextcloud_datadir with the local mount and also with direct nfs share connection.

Any idea how to look why the container does not use the NFS share ?

2 Likes

Hi, can you please post the complete docker compose file here?

Also, can you post the output of sudo docker info here?

Additionally, can you provide the output of sudo df -h ?

Here are the Infos

sudo docker info

Client: Docker Engine - Community
Version:    29.1.2
Context:    default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version:  v0.30.1
Path:     /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version:  v5.0.0
Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
Containers: 5
Running: 5
Paused: 0
Stopped: 0
Images: 13
Server Version: 29.1.2
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
CDI spec directories:
/etc/cdi
/var/run/cdi
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 1c4457e00facac03ce1d75f7b6777a7a851e5c41
runc version: v1.3.4-0-gd6d73eb8
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.1.0-41-amd64
Operating System: Debian GNU/Linux 12 (bookworm)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.818GiB
Name: pvedocker
ID: 71959db6-4404-4459-a1c5-2069ea0264dc
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
::1/128
127.0.0.0/8
Live Restore Enabled: false
Firewall Backend: iptables

sudo df -h

Filesystem Size Used Avail Use% Mounted on
udev 1.9G 0 1.9G 0% /dev
tmpfs 391M 1.2M 390M 1% /run
/dev/sda3 17G 5.8G 9.8G 38% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda2 124M 12M 113M 10% /boot/efi
192.168.200.19:/NC_Data 98G 2.0M 98G 1% /mnt/nextcloud/ncdata
overlay 17G 5.8G 9.8G 38% /var/lib/docker/overlay2/fa7abbcbfeb97c7eb44b6daf53370a58ced73012305de056c57b58fd24e7ba85/merged
overlay 17G 5.8G 9.8G 38% /var/lib/docker/overlay2/087b22b23001e6237190c9b8b9a1cc4dad58ea2a0642880574481d7a5c60361f/merged
overlay 17G 5.8G 9.8G 38% /var/lib/docker/overlay2/b2a0bfee23884fa9d1d947312049221734f0f6349aa7428cba4b466092b73da0/merged
overlay 17G 5.8G 9.8G 38% /var/lib/docker/overlay2/e620586b52b4496b149a81e851b3e1ea7557bd89a58d7d56b4b2ee1ec372fcd3/merged
overlay 17G 5.8G 9.8G 38% /var/lib/docker/overlay2/9d20e305b6bf4a9132ebba4c2c1ddf2c6ca1e61790e4628a2517ba65a53febfb/merged
tmpfs 391M 0 391M 0% /run/user/0
overlay 17G 5.8G 9.8G 38% /var/lib/docker/overlay2/2c83bb180536c8109b591f5fffe99f451ff9a7d5975048fa3560953a68ee49ee/merged
192.168.200.19:/All_Backup 229G 60G 170G 26% /mnt/All_Backup

compose.yaml

name: nextcloud-aio # Add the container to the same compose project like all the sibling containers are added to automatically.

services:
nextcloud-aio-mastercontainer:
image: ghcr.io/nextcloud-releases/all-in-one:latest # This is the container image used. You can switch to ghcr.io/nextcloud-releases/all-in-one:beta if you want to help testing new releases. See https://github.com/nextcloud/all-in-one#how-to-switch-the-channel
init: true # This setting makes sure that signals from main process inside the container are correctly forwarded to children. See https://docs.docker.com/reference/compose-file/services/#init
restart: always # This makes sure that the container starts always together with the host OS. See https://docs.docker.com/reference/compose-file/services/#restart
container_name: nextcloud-aio-mastercontainer # This line is not allowed to be changed as otherwise AIO will not work correctly
volumes:
- nextcloud_aio_mastercontainer:/mnt/docker-aio-config # This line is not allowed to be changed as otherwise the built-in backup solution will not work
- /var/run/docker.sock:/var/run/docker.sock:ro # May be changed on macOS, Windows or docker rootless. See the applicable documentation. If adjusting, don’t forget to also set ‘WATCHTOWER_DOCKER_SOCKET_PATH’!
network_mode: bridge # This adds the container to the same network as docker run would do. Comment this line and uncomment the line below and the networks section at the end of the file if you want to define a custom MTU size for the docker network
ports:
- 8070:8080 # This is the AIO interface, served via https and self-signed certificate. See https://github.com/nextcloud/all-in-one#explanation-of-used-ports
environment: # Is needed when using any of the options below
APACHE_PORT: 11000 # Is needed when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else). See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
APACHE_IP_BINDING: 0.0.0.0 # Should be set when running behind a web server or reverse proxy (like Apache, Nginx, Caddy, Cloudflare Tunnel and else) that is running on the same host. See https://github.com/nextcloud/all-in-one/blob/main/reverse-proxy.md
NEXTCLOUD_DATADIR: /mnt/nextcloud/ncdata/data # Allows to set the host directory for Nextcloud’s datadir. ??? Warning: do not set or adjust this value after the initial Nextcloud installation is done! See https://github.com/nextcloud/all-in-one#how-to-change-the-default-location-of-nextclouds-datadir
NEXTCLOUD_MOUNT: /mnt/ # Allows the Nextcloud container to access the chosen directory on the host. See https://github.com/nextcloud/all-in-one#how-to-allow-the-nextcloud-container-to-access-directories-on-the-host

volumes: # If you want to store the data on a different drive, see https://github.com/nextcloud/all-in-one#how-to-store-the-filesinstallation-on-a-separate-drive
nextcloud_aio_mastercontainer:
name: nextcloud_aio_mastercontainer # This line is not allowed to be changed as otherwise the built-in backup solution will not work

I suspect the problem is that your root partition only has 9,8G left but stores all docker images, volumes and the whole system. I would recommend to increase the root disk to at least 50G.

Apart from that see GitHub - nextcloud/all-in-one: 📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance.

I think, that would not be my current problem, because I see, during the “recovery” the “borg-backup” container would write it in the container filesystem (yes than the 9,8GB are not enough), but it should write all the recovered data to the NEXTCLOUD_DATADIR: /mnt/nextcloud/ncdata/data and there are 100GB free… so my problem is, that the configured mount will not be used and I do not know where to find the error.

I read that in case of an problem, the AIO returns to a default “datadir” value and that seems to be the case…

Please refer to this. This is the setting you are actually looking for.

No, I do not want to move the complete docker Directory…. I only want to use another datadir for AIO…like described here GitHub - nextcloud/all-in-one: 📦 The official Nextcloud installation method. Provides easy deployment and maintenance with most features included in this one Nextcloud instance. …. but this do not work OR I did a mistake…

No, it works as designed. The datadir indeed should be extracted onto the configured target. However the volumes and the images and other docker data is still stored in the configured Docker Root Dir, in your case on the very small root drive.

But the DataDir does not be extraxted to the configured target.

Q: If the drive mapping via NEXTCLOUD_DATADIR: will work, where could I see it inside the AIO master container ?

You can see it inside the nextcloud-aio-borgbackup container during extraction.

Sorry, but at which path ?

1 Like

I give up… I’ve tried so many variations from documentation and threads. Maybe I’ll give it more time later.

1 Like