Only use nextcloudData as persistence Storage
I want to store the Data Files on my NFS, for that i only need /var/www/html/data. I dont want to mount everything under /var/www/* on my NFS.
At the Moment you can only use nextcloudData when persistence is enabled overall.
(Im new to Nextcloud, maybe there is another way to do this ?).
A few questions up front:
What cluster are u running? Which device/ host? You are familiar with pv and pvc?
Short answer:
The /var/www path applies only for inside the container, with persistence enabled, it will be a different path on your NFS storage.
The mounted folder outside the container will only be the /data folder inside the folder you created with pv and pvc on your NFS storage.
Example:
Your NFS nextcloud storage folder: /media/nextcloud (created manually in advance)
Your nextcloud data path will be: /media/nextcloud/data/
Edit: You want to externally mount the /data/files part only, keeping all other stuff like apps and so on inside your container, correct?
Greetz
I think he wants only the data folder. I want it too. I tried something, but if i try to add nfs as "extra volume" of the helm chart and set the path /var/www/html/data, i get an error: "path must be unique".
May it possible to post samples for persistence and patch of the chart to use an external data nfs storage?
In my Case is it a k3s Setup with 3 Nodes.
Thanks
What I did to accomplish this was mount my NFS share through extraVolumes as /nfs and then change dataDir to /nfs as well as change my config.php to set my dataDir to /nfs and that seemed to work well enough.
Please, can you better explain how do you do? As far as I set dataDir on Helm to /nfs folder the pod replace nfs mounitng point by existing pvc
Necroing this issue here (my apologies)
So I'm trying to deploy this helm chart to replace my old install that uses NFS.
On the old install, it mounts a NFS share to /ncdata (Nextcloud Data Directory). This is what is defined in the Nextcloud config as its "Data Directory".
Within the helm values, I defined the following: nextcloud.datadir: /ncdata nextcloud.extraVolumes:
extraVolumes:
- name: nfs
nfs:
server: "nfs-server"
path: "/mnt/nfspath"
readOnly: false
extraVolumeMounts:
- name: nfs
mountPath: "/ncdata"
The error I get is Deployment.apps "nextcloud" is invalid: [spec.template.spec.containers[0].volumeMounts[7].mountPath: Invalid value: "/ncdata": must be unique, spec.template.spec.containers[1].volumeMounts[8].mountPath: Invalid value: "/ncdata": must be unique, spec.template.spec.containers[2].volumeMounts[7].mountPath: Invalid value: "/ncdata": must be unique, spec.template.spec.containers[3].volumeMounts[0].name: Not found: "nextcloud-data"
I'm assuming this is related to this issue, but also I think its related to #531 ?