fix for nfs-photo not exporting root dir
This commit is contained in:
@@ -25,14 +25,6 @@ spec:
|
||||
- sh
|
||||
- -c
|
||||
- chmod -R a+rwX /disks/base /disks/sub1
|
||||
mtab-setup:
|
||||
image:
|
||||
repository: hectorm/nfs-ganesha
|
||||
tag: v10
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- cat /proc/self/mounts > /mtab-vol/mtab
|
||||
# native sidecar (restartPolicy: Always): mounts the two disks and
|
||||
# exposes their union at /disks/merged via FUSE. It must be up and
|
||||
# actually mounted *before* the "app" container is created, since
|
||||
@@ -46,7 +38,6 @@ spec:
|
||||
mergerfs:
|
||||
dependsOn:
|
||||
- fix-permissions
|
||||
- mtab-setup
|
||||
restartPolicy: Always
|
||||
image:
|
||||
repository: ghcr.io/hotio/mergerfs
|
||||
@@ -77,6 +68,24 @@ spec:
|
||||
memory: 64Mi
|
||||
limits:
|
||||
memory: 512Mi
|
||||
# runs after mergerfs is confirmed mounted (see dependsOn) and has
|
||||
# /export mounted too, so the /proc/self/mounts snapshot it takes
|
||||
# actually includes the fuse.mergerfs line for /export. ganesha's
|
||||
# FSAL_VFS resolves export paths against this frozen /etc/mtab, not
|
||||
# the live /proc/mounts - if /export is missing from it (e.g. this
|
||||
# ran before mergerfs, or without /export mounted at all), ganesha
|
||||
# fails at startup with "resolve_posix_filesystem(/export) ...
|
||||
# No such file or directory" even though /export is mounted fine.
|
||||
mtab-setup:
|
||||
dependsOn:
|
||||
- mergerfs
|
||||
image:
|
||||
repository: hectorm/nfs-ganesha
|
||||
tag: v10
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- cat /proc/self/mounts > /mtab-vol/mtab
|
||||
containers:
|
||||
app:
|
||||
image:
|
||||
@@ -141,7 +150,7 @@ spec:
|
||||
type: persistentVolumeClaim
|
||||
accessMode: ReadWriteOnce
|
||||
size: 100Gi
|
||||
storageClass: longhorn
|
||||
storageClass: longhorn-single-replica
|
||||
retain: true
|
||||
advancedMounts:
|
||||
app:
|
||||
@@ -153,7 +162,7 @@ spec:
|
||||
type: persistentVolumeClaim
|
||||
accessMode: ReadWriteOnce
|
||||
size: 100Gi
|
||||
storageClass: longhorn
|
||||
storageClass: longhorn-single-replica
|
||||
retain: true
|
||||
advancedMounts:
|
||||
app:
|
||||
@@ -171,6 +180,9 @@ spec:
|
||||
app:
|
||||
- path: /export
|
||||
mountPropagation: HostToContainer
|
||||
mtab-setup:
|
||||
- path: /export
|
||||
mountPropagation: HostToContainer
|
||||
dev-fuse:
|
||||
type: hostPath
|
||||
hostPath: /dev/fuse
|
||||
|
||||
@@ -94,7 +94,7 @@ spec:
|
||||
type: persistentVolumeClaim
|
||||
existingClaim: nfs-photo-export
|
||||
globalMounts:
|
||||
- path: /webdav/photo
|
||||
- path: /webdav/photo/library
|
||||
sda2:
|
||||
type: persistentVolumeClaim
|
||||
existingClaim: nas1-sda2
|
||||
|
||||
@@ -2,3 +2,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- longhorn-no-retain.yaml
|
||||
- longhorn-single-replica.yaml
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: longhorn-single-replica
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: "false"
|
||||
provisioner: driver.longhorn.io
|
||||
reclaimPolicy: Retain
|
||||
allowVolumeExpansion: true
|
||||
parameters:
|
||||
numberOfReplicas: "1"
|
||||
staleReplicaTimeout: "30"
|
||||
@@ -15,3 +15,4 @@ resources:
|
||||
- ../../base/namespaces/finance.yaml
|
||||
- ../../base/namespaces/nfs.yaml
|
||||
- ../../base/namespaces/syncthing.yaml
|
||||
- ../../base/namespaces/photo-stats.yaml
|
||||
|
||||
Reference in New Issue
Block a user