Compare commits

..

2 Commits

Author SHA1 Message Date
4c4a383425 add volume migration job util 2025-03-19 01:25:32 +01:00
5ee8569d96 remove comment 2025-03-19 01:25:11 +01:00
2 changed files with 35 additions and 1 deletions

View File

@@ -21,7 +21,7 @@ metadata:
spec: spec:
storageClassName: media-storage storageClassName: media-storage
accessModes: accessModes:
- ReadWriteMany # Longhorn supports RWO; if RWX is needed, enable RWX mode in Longhorn UI - ReadWriteMany
resources: resources:
requests: requests:
storage: 500Gi storage: 500Gi

34
utils/migrate.yaml Normal file
View File

@@ -0,0 +1,34 @@
apiVersion: batch/v1
kind: Job
metadata:
namespace: jellyfin # namespace where the PVC's exist
name: volume-migration
spec:
completions: 1
parallelism: 1
backoffLimit: 3
template:
metadata:
name: volume-migration
labels:
name: volume-migration
spec:
restartPolicy: Never
containers:
- name: volume-migration
image: ubuntu:xenial
tty: true
command: [ "/bin/sh" ]
args: [ "-c", "cp -r -v /mnt/old /mnt/new" ]
volumeMounts:
- name: old-vol
mountPath: /mnt/old
- name: new-vol
mountPath: /mnt/new
volumes:
- name: old-vol
persistentVolumeClaim:
claimName: media-pvc
- name: new-vol
persistentVolumeClaim:
claimName: media-rwx-pvc # change to data target PVC