a52a419dfd
Why: The media apps must serve and manage the actual media library, not empty volumes. That library already exists on the puppet-managed CephFS filesystem mediafs (mounted by the VM/incus instances at /shared/media) and is in active use, so the k8s apps must mount it in place rather than provision fresh storage. How: - Replace the two fresh movies/tvseries PVCs with one static CephFS PersistentVolume bound to mediafs and a single RWX media-library claim the whole stack shares. - Set the PV reclaim policy to Retain and mark it staticVolume so ceph-csi only mounts the pre-existing storage and can never provision or reclaim it; deleting the PVC or PV cannot destroy the underlying library. - Reuse the live csi-cephfs cluster parameters (clusterID cephfs_csi_ssd_ec_4_1 for mon discovery, csi-cephfs/csi-cephfs-secret node-stage secret) with fsName mediafs and rootPath / (the mediafs root that maps to /shared/media). - Mount the library into each app by subPath so the tree matches the VM layout: sonarr /mnt/tvseries (tvseries), radarr /mnt/movies (movies), jellyfin and nzbget both subtrees; prowlarr keeps no library mount. The jellyfin transcode PVC stays a fresh scratch volume. - Whitelist PersistentVolume in the media AppProject so the cluster-scoped PV can sync.
42 lines
1.5 KiB
YAML
42 lines
1.5 KiB
YAML
---
|
|
# Static CephFS PersistentVolume bound to the pre-existing, ACTIVELY-USED
|
|
# puppet media library (ceph filesystem "mediafs", mounted by the VM/incus
|
|
# instances at /shared/media). ceph-csi only mounts this volume; staticVolume
|
|
# tells it the storage pre-exists and it must never provision or delete it.
|
|
#
|
|
# reclaimPolicy MUST stay Retain: deleting this PV or its PVC must NEVER be able
|
|
# to reclaim or destroy the underlying CephFS data that the VM instances use.
|
|
apiVersion: v1
|
|
kind: PersistentVolume
|
|
metadata:
|
|
name: media-apps-media-library
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteMany
|
|
capacity:
|
|
storage: 10Ti
|
|
# Load-bearing safety control. Do not change to Delete.
|
|
persistentVolumeReclaimPolicy: Retain
|
|
storageClassName: ""
|
|
volumeMode: Filesystem
|
|
# Pre-bind to the media-library claim so nothing else can grab this PV.
|
|
claimRef:
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
name: media-library
|
|
namespace: media-apps
|
|
csi:
|
|
driver: cephfs.csi.ceph.com
|
|
volumeHandle: media-apps-media-library-static
|
|
nodeStageSecretRef:
|
|
name: csi-cephfs-secret
|
|
namespace: csi-cephfs
|
|
volumeAttributes:
|
|
# clusterID maps (in the csi-cephfs ceph-csi-config) to the mon set that
|
|
# also serves mediafs; for a static volume only the mon lookup is used.
|
|
clusterID: cephfs_csi_ssd_ec_4_1
|
|
fsName: mediafs
|
|
staticVolume: "true"
|
|
# Filesystem-internal root of the library (mediafs root == /shared/media).
|
|
rootPath: /
|