OMV5. amd64. All updates applied. Docker 20. NextcloudPi does not use external volume

Here is a brief description of my issues. I run a headless home server. Base OS is OMV-5 with all the newest updates applied and working fine. For boot, I use a small 240GB SSD and for data, I use a 4TB, 3.5 drive and for periodic backups, I use an external 1TB drive. Everything was working fine. I had Docker 19.x installed and NextcloudPi was working very well with the following command:

docker run --restart=always -d -p 4443:4443 -p 44443:443 -p 8080:80 -v /srv/dev-disk-by-label-WD4TB/ncdata:/data -v /srv/dev-disk-by-label-SG1TB/ncbackup:/backup -v /etc/localtime:/etc/localtime:ro --name nextcloud ownyourbits/nextcloudpi

Both ncdata and ncbackup were created by me in the root folder (/) using the commands:
mkdir ncdata
mkdir ncbackup

Both have the default ownership of (root root)

However, after running this setup for about a month, without issues, I noticed that my pi-hole was reporting that all queries were coming from the docker instance rather than specifying the container it was coming from. This irked me and I read about macvlans and successfully implemented that on a test machine. That time, docker 20 was still unreleased as so all my testing too was done on docker 19.x. So now I thought I should put this into the main production machine I was using.

In the interim, docker released version 20.

As I like doing things cleanly due to my OCD, I started afresh. Took a backup for all my data and disconnected the SG1TB drive. Formatted the main 240GBSSD and installed OMV-5, updated it completely and installed Docker (20). Setup macvlan network and found that to be working as well. Reconnected the SG1TB drive and reinstalled NextcloudPi using the same command but with the IP as this was the IP I would initially access NCP from:

docker run --restart=always -d -p 4443:4443 -p 44443:443 -p 8080:80 -v /srv/dev-disk-by-label-WD4TB/ncdata:/data -v /srv/dev-disk-by-label-SG1TB/ncbackup:/backup -v /etc/localtime:/etc/localtime:ro --name nextcloud ownyourbits/nextcloudpi

The installation happened without issues. Once the container was up and running, I stopped it and assigned it to run with the macvlan network. Once done, I was able to access the NCP instance, make new users, upload files, and everything seemed to have gone well.

However, I noticed that the space on the boot drive (240GB) was reducing and no data was being written to the 4TB drive as should have been the case.

I looked up the the config.php file and realised that for whatever reason, the /ncdata flag was being ignored and was defaulting to /data-ro/nextcloud/data which was inside the /var/lib/docker/overlay2/(random characters)/merged/ folder.

Just to confirm, I reverted back to the old setup without any changes to the configuration other than docker which has been updated to 20 from version 19.

Here again the same thing is happening. The config.php file still has the /data-ro/nextcloud/data entry and my /ncdata volume which reflects to /srv/dev-disk-by-label-WD4TB/ncdata is being ignored. Before someone asks, yes, /srv/dev-disk-by-label-WD4TB/ncdata exists and is having no permission issues with the default ownership of root root.

I have been at it for about 4 days now. Must have redone the setup at least 20 times over the last 4 days, meticulously ensuring that I don’t miss out on any step. However, no luck.

So can someone tell me what is wrong here?

I have even tried using Nginx Proxy Manager to see if it changes anything. The redirection happens. I can still access the NCP interface. Still upload and delete files. No issues there as well.

Also, another thing I noticed is that I am now unable to upload large files even though the NCP Configuration page lists the limit as 10G. When I try uploading a file larger than say 1GB, it simply gives me an error with “An unknown error has occurred”. This was not the case when I was on docker 19.x

I am on the verge of pulling out my hair. Can someone please help me?

And yes, this is a Xeon based server and I am using the amd64 base OS and followed the docker instructions to install on debian. The NCP container is ownyourbits/nextcloudpi one and it pulls the latest version every time.

Over the last 4 days, I have tried Ubuntu 20, server as well as desktop. Still end up with the same issue. Is it docker which has done this? I am not able to install docker 19.x anymore as it ends up with an error every time, something on the lines of version incorrect or not found or something.

When I try to retrieve the old docker verisons available for install, 19.03.13 does not seem to be available. In fact, version 19 is not available.

root@docker:~# apt-cache madison docker-ce
(Output removed as I was getting some 4 links limit error)

I still try installing version 19 manually and this is what I get:
root@docker:~# sudo apt-get install docker-ce=19,03,13 docker-ce-cli=19,03,13 containerd,io
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Version ‘19,03,13’ for ‘docker-ce’ was not found
E: Version ‘19,03,13’ for ‘docker-ce-cli’ was not found
root@docker:~# sudo apt-get install docker-ce=19,03,12 docker-ce-cli=19,03,12 containerd,io
Reading package lists… Done
Building dependency tree
Reading state information… Done

I have tried with all the versions for 19 which were released as stable.

This seems to be a behaviour only with nextcloudpi and that too only for the ncdata volume. The ncbackup volume is being picked up all right.

Also, the assigned volume for nginx is working as it is pulling up and using the config.json file.

MotionEye works all right too!

The owner for ncdata and ncbackup is root root.

When I check the owner of data-ro tree structure, i see this

|var (root root)
|lib (root root)
_ docker (root root)
|__overlay2 (root root)
|0cd8711fdbf9527b00b42d83d121eabf6c618cfc77fb53edc27cfa9bcde2298c (root root)
merged (root root)
|______data-ro (root root)
|______nextcloud (w ww-data w ww-data)
|_______data (w ww-data w ww-data)
|________user 1 (w ww-data w ww-data)
|_________files (w ww-data w ww-data)

I have not changed any permission for any directory after creating them, i. e. ncdata and ncbackup and thet have the default ownership of root root

Can someone help me?

Same setup here. Same problem here.

Using docker run with “-v ncdata:/data” will create a volume but the user data are not in there. :frowning:
As I can see all are stored in data-ro now and I’m sure that is not good.
If you backup with ncp panel back function the backup contains all user data because backing up is done inside of the container, but if someone tried to do it from host by backup the ncdata folder he will be very unhappy on restore.

And BTW if you put your ncdata to external drive the user data will be stored already to /var/lib/docker/overlay2/l folder and that will be the default drive in most cases. Anyway I moved the “data-root” in daemon.json of docker also to the external drive but this is will only hide the problem.

@nachoparker Any idea what happend / changed now?