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
|
||||
|
||||
Reference in New Issue
Block a user