Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only use nextcloudData as persistence Storage #264

Open
MrRenesto opened this issue Aug 4, 2022 · 5 comments
Open

Only use nextcloudData as persistence Storage #264

MrRenesto opened this issue Aug 4, 2022 · 5 comments
Labels
Persistence Anything to do with external storage or persistence. This is also where we triage things like NFS.

Comments

@MrRenesto
Copy link

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 ?).

@TheShadowBanned
Copy link

TheShadowBanned commented Aug 12, 2022

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

@corincorvus
Copy link

corincorvus commented Oct 24, 2022

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

@SNThrailkill
Copy link

SNThrailkill commented Feb 5, 2023

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.

@jessebot jessebot added the Persistence Anything to do with external storage or persistence. This is also where we triage things like NFS. label Apr 10, 2023
@jahegu
Copy link

jahegu commented Oct 25, 2023

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

@miguemely
Copy link

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Persistence Anything to do with external storage or persistence. This is also where we triage things like NFS.
Projects
None yet
Development

No branches or pull requests

7 participants