Strange behavior regarding file storage

Hi,

i finally managed to install nextcloud-aio properly, but i notice a strange behavior regarding file storage, and wonder why is that and how to fix it.

i’ve set up the following env variables in my compose file regarding storage :

environment:
...
      - NEXTCLOUD_DATADIR=/mnt/srv/ncdata 
      - NEXTCLOUD_MOUNT=/mnt/

My hope was to store everything in /mnt/srv/ncdata (/mnt/srv is a NFS mount from my file server), and be able to access other mount inside of /mnt

But it seems that nextcloud is storing my files in both places (?!) :

root$ du -sh /mnt/ncdata
26G     /mnt/ncdata

root$ du -sh /mnt/srv/ncdata
26G     /mnt/srv/ncdata

For what i can see, the same files and directories are under /mnt/ncdata and /mnt/srv/ncdata, but they’re not just symlinked or same device mounted in different places.

I don’t understand that behavior, and wonder how to fix it (i want everything under /mnt/srv only,. The root filesystem isn’t - by far - large enough to host nextcloud)

Any idea how i can manage it ? (i mean i could just wipe everything and rebuild without NEXTCLOUD_MOUNT=/mnt/, but there might be a less painful way…

i should have done that test before posting, as it appear to effectively be the same directory mounted in both places :

root $ touch /mnt/ncdata/test

root $ ls /mnt/ncdata
admin  appdata_occ6ynpa4a20  audit.log  files_external  index.html  mathieu  nextcloud.log  test

root $ ls /mnt/srv/ncdata
admin  appdata_occ6ynpa4a20  audit.log  files_external  index.html  mathieu  nextcloud.log  test

So i probably have nothing to worry about my storage. But still, could anyone explain that behavior to me ?

1 Like