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

(Question) Mount media from NFS #46

Open
tobiasbartel opened this issue Dec 9, 2024 · 4 comments
Open

(Question) Mount media from NFS #46

tobiasbartel opened this issue Dec 9, 2024 · 4 comments

Comments

@tobiasbartel
Copy link

Hello,

quick question, I have all my media on a NAS shared via NFS.
What do I have to put into the values file in order to make the NFS shares available in the container?

Thanks in advance!

Cheers!

@astephon88
Copy link

First you would need to create a PV on the cluster pointing to your nfs share:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: jellyfin-library-storage-pv
spec:
  accessModes:
  - ReadWriteMany
  nfs:
    server: nfs_server_hostname
    path: "/path/to/your/media"
  mountOptions:
      - nfsvers=4.1 # or whatever NFS version you're running
  capacity:
    storage: 26Ti # max capacity of the NFS share, or less if you want to limit how much storage the app sees as available 

Then create a PVC in the namespace that jellyfin will deploy to referencing that PV (you'll need to create the namespace first):

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: jellyfin-library-storage-pvc
  namespace: jellyfin
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 26Ti # match the storage amount from the PV
  volumeName: jellyfin-library-storage-pv

Finally, add jellyfin-library-storage-pvc to persistence.media.existingClaim in your values file

@alexmorbo
Copy link

Hi,

I have a similar issue. Currently, I mount media to hostPath, but now I need to mount it to a different directory, such as /share, and I cannot name the volume "media."

Would the following change in the chart resolve the issue?

{{- if .Values.persistence.media.enabled }}
- name: media
  persistentVolumeClaim:
    claimName: {{ if .Values.persistence.media.existingClaim }}{{ .Values.persistence.media.existingClaim }}{{- else }}{{ template "jellyfin.fullname" . }}-media{{- end }}
  emptyDir: {}
{{- end }}

Changes:

  • Move the condition statement outside the "media" definition.

@Supporterino
Copy link
Contributor

Hey @tobiasbartel @alexmorbo @astephon88,

no need to create a extra PV for your NFS share. The media PVC for jellyfin is for the media produced by jellyfin like thumbnails and stuff. To mount your own media into jellyfin you can utilise the volumes and volumeMounts keys like this:

volumes:
  - name: series
    nfs:
      server: 1.2.3.4
      path: /some/path/series
  - name: movies
    nfs:
      server: 1.2.3.4
      path: /some/path/movies

volumeMounts:
  - mountPath: /series
    name: series
  - mountPath: /movies
    name: movies
    readOnly: true

@astephon88
Copy link

Oof, not sure how I missed that in the deployment template. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants