From 97e77078e9f3cfd9327997dbdd6137e67af5772e Mon Sep 17 00:00:00 2001 From: Mayne0213 Date: Sat, 27 Dec 2025 02:37:46 +0900 Subject: [PATCH] REFACTOR(longhorn): migrate longhorn - to dedicated 50gb disks - Update defaultDataPath to /mnt/longhorn-storage - Add Node CRs for all nodes with new disk configuration - Evict data from old /var/lib/longhorn disks to new disks - Nodes: mayne-vcn, mayne-worker-1, mayne-worker-2 --- longhorn/helm-values/longhorn.yaml | 2 +- longhorn/kustomization.yaml | 3 +++ longhorn/nodes/mayne-vcn.yaml | 21 +++++++++++++++++++++ longhorn/nodes/mayne-worker-1.yaml | 21 +++++++++++++++++++++ longhorn/nodes/mayne-worker-2.yaml | 21 +++++++++++++++++++++ 5 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 longhorn/nodes/mayne-vcn.yaml create mode 100644 longhorn/nodes/mayne-worker-1.yaml create mode 100644 longhorn/nodes/mayne-worker-2.yaml diff --git a/longhorn/helm-values/longhorn.yaml b/longhorn/helm-values/longhorn.yaml index 7a05922..3499bb8 100644 --- a/longhorn/helm-values/longhorn.yaml +++ b/longhorn/helm-values/longhorn.yaml @@ -16,7 +16,7 @@ persistence: defaultSettings: # Storage defaultReplicaCount: 3 # Default number of replicas for volumes - defaultDataPath: /var/lib/longhorn # Data storage path on nodes + defaultDataPath: /mnt/longhorn-storage # Data storage path on nodes (NEW: dedicated 50GB disks) # Backup settings backupTarget: "" # S3/NFS backup target (configure later if needed) diff --git a/longhorn/kustomization.yaml b/longhorn/kustomization.yaml index dc0b675..0953ada 100644 --- a/longhorn/kustomization.yaml +++ b/longhorn/kustomization.yaml @@ -5,3 +5,6 @@ namespace: longhorn-system resources: - ingress/longhorn-ingress.yaml + - nodes/mayne-vcn.yaml + - nodes/mayne-worker-1.yaml + - nodes/mayne-worker-2.yaml diff --git a/longhorn/nodes/mayne-vcn.yaml b/longhorn/nodes/mayne-vcn.yaml new file mode 100644 index 0000000..dbacd9e --- /dev/null +++ b/longhorn/nodes/mayne-vcn.yaml @@ -0,0 +1,21 @@ +apiVersion: longhorn.io/v1beta2 +kind: Node +metadata: + name: mayne-vcn + namespace: longhorn-system +spec: + disks: + default-disk: + allowScheduling: false + diskType: filesystem + evictionRequested: true + path: /var/lib/longhorn + storageReserved: 10737418240 + tags: [] + new-disk: + allowScheduling: true + diskType: filesystem + evictionRequested: false + path: /mnt/longhorn-storage + storageReserved: 5368709120 + tags: [] diff --git a/longhorn/nodes/mayne-worker-1.yaml b/longhorn/nodes/mayne-worker-1.yaml new file mode 100644 index 0000000..b5d901d --- /dev/null +++ b/longhorn/nodes/mayne-worker-1.yaml @@ -0,0 +1,21 @@ +apiVersion: longhorn.io/v1beta2 +kind: Node +metadata: + name: mayne-worker-1 + namespace: longhorn-system +spec: + disks: + default-disk: + allowScheduling: false + diskType: filesystem + evictionRequested: true + path: /var/lib/longhorn + storageReserved: 10737418240 + tags: [] + new-disk: + allowScheduling: true + diskType: filesystem + evictionRequested: false + path: /mnt/longhorn-storage + storageReserved: 5368709120 + tags: [] diff --git a/longhorn/nodes/mayne-worker-2.yaml b/longhorn/nodes/mayne-worker-2.yaml new file mode 100644 index 0000000..b5eee6d --- /dev/null +++ b/longhorn/nodes/mayne-worker-2.yaml @@ -0,0 +1,21 @@ +apiVersion: longhorn.io/v1beta2 +kind: Node +metadata: + name: mayne-worker-2 + namespace: longhorn-system +spec: + disks: + default-disk: + allowScheduling: false + diskType: filesystem + evictionRequested: true + path: /var/lib/longhorn + storageReserved: 10737418240 + tags: [] + new-disk: + allowScheduling: true + diskType: filesystem + evictionRequested: false + path: /mnt/longhorn-storage + storageReserved: 5368709120 + tags: []