re-export of base and sub1 photo dirs via webdav

This commit is contained in:
azykov@mail.ru
2026-08-18 02:09:34 +03:00
parent 5d99a8ac51
commit 3cdfe012e3
4 changed files with 146 additions and 7 deletions
@@ -46,6 +46,50 @@ data:
}
}
# individual disks, exported alongside the merged /export view so
# clients (webdav) can also see each underlying disk on its own.
EXPORT {
Export_Id = 2;
Path = /disks/base;
Pseudo = /base;
SecType = sys;
Protocols = NFSv4;
FSAL {
Name = VFS;
}
CLIENT {
Clients = *;
Access_Type = RW;
Squash = No_Root_Squash;
Protocols = NFSv4;
}
}
EXPORT {
Export_Id = 3;
Path = /disks/sub1;
Pseudo = /sub1;
SecType = sys;
Protocols = NFSv4;
FSAL {
Name = VFS;
}
CLIENT {
Clients = *;
Access_Type = RW;
Squash = No_Root_Squash;
Protocols = NFSv4;
}
}
LOG {
Default_Log_Level = INFO;
}
+20 -7
View File
@@ -69,13 +69,14 @@ spec:
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.
# /export, /disks/base and /disks/sub1 all mounted too, so the
# /proc/self/mounts snapshot it takes covers every path ganesha
# exports. ganesha's FSAL_VFS resolves each EXPORT's Path against
# this frozen /etc/mtab, not the live /proc/mounts - any exported
# path missing from it (e.g. this ran before mergerfs, or without
# that path mounted here at all) fails at startup with
# "resolve_posix_filesystem(<path>) ... No such file or directory"
# even though the path is mounted fine in every other container.
mtab-setup:
dependsOn:
- mergerfs
@@ -162,6 +163,12 @@ spec:
- path: /disks/base
fix-permissions:
- path: /disks/base
# exported directly as its own NFS share (Pseudo=/base, see
# configmap.yaml) alongside the merged /export view.
app:
- path: /disks/base
mtab-setup:
- path: /disks/base
sub1:
type: persistentVolumeClaim
accessMode: ReadWriteOnce
@@ -174,6 +181,12 @@ spec:
- path: /disks/sub1
fix-permissions:
- path: /disks/sub1
# exported directly as its own NFS share (Pseudo=/sub1, see
# configmap.yaml) alongside the merged /export view.
app:
- path: /disks/sub1
mtab-setup:
- path: /disks/sub1
merged:
type: emptyDir
advancedMounts:
@@ -95,6 +95,16 @@ spec:
existingClaim: nfs-photo-export
globalMounts:
- path: /webdav/photo/library
photo-base:
type: persistentVolumeClaim
existingClaim: nfs-photo-base
globalMounts:
- path: /webdav/photo/library-base
photo-sub1:
type: persistentVolumeClaim
existingClaim: nfs-photo-sub1
globalMounts:
- path: /webdav/photo/library-sub1
sda2:
type: persistentVolumeClaim
existingClaim: nas1-sda2
@@ -76,6 +76,78 @@ spec:
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-photo-base-nfs
spec:
capacity:
storage: 100Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: ""
mountOptions:
- nfsvers=4.1
nfs:
server: 10.43.166.34
path: /base
claimRef:
namespace: webdav
name: nfs-photo-base
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nfs-photo-base
namespace: webdav
annotations:
helm.sh/resource-policy: keep
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
volumeName: nfs-photo-base-nfs
resources:
requests:
storage: 100Gi
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-photo-sub1-nfs
spec:
capacity:
storage: 100Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: ""
mountOptions:
- nfsvers=4.1
nfs:
server: 10.43.166.34
path: /sub1
claimRef:
namespace: webdav
name: nfs-photo-sub1
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nfs-photo-sub1
namespace: webdav
annotations:
helm.sh/resource-policy: keep
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
volumeName: nfs-photo-sub1-nfs
resources:
requests:
storage: 100Gi
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: nas1-sda2-nfs
spec: