fix for nfs-photo not exporting root dir

This commit is contained in:
azykov@mail.ru
2026-08-16 20:42:10 +03:00
parent 0455b4a745
commit db517dbcbc
5 changed files with 38 additions and 12 deletions
+23 -11
View File
@@ -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
+1 -1
View File
@@ -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