39 lines
1.7 KiB
YAML
39 lines
1.7 KiB
YAML
# Dedicated StorageClass for model weights on worker-1's local NVMe.
|
|||
|
|
#
|
||
|
|
# Why not the default `longhorn` class (3 replicas, network-attached):
|
||
|
|
#
|
||
|
|
# 1. numberOfReplicas: 1 — model weights are re-downloadable from HuggingFace.
|
||
|
|
# Replicating them 3x buys nothing; losing a replica costs a re-pull, not
|
||
|
|
# data. The repo's "never delete a PVC without replicas/backups" rule exists
|
||
|
|
# for irreplaceable data, which this is not.
|
||
|
|
#
|
||
|
|
# 2. dataLocality: strict-local — keeps the single replica on the SAME node as
|
||
|
|
# the pod. All engines are pinned to worker-1, so weights are read from its
|
||
|
|
# local 751GB NVMe instead of over the network from a control-plane node.
|
||
|
|
# Removes ~60GB of network reads on every cold start.
|
||
|
|
#
|
||
|
|
# 3. diskSelector: llm — restricts this class to disks tagged `llm`, i.e. only
|
||
|
|
# worker-1's disk. Equally important, worker-1's disk carries that tag so
|
||
|
|
# UNTAGGED volumes (any ordinary cluster PVC) will not land on it. Before
|
||
|
|
# tagging, worker-1 had been silently hosting a replica of cicd/runner-dind,
|
||
|
|
# consuming GPU-node storage for general cluster workloads.
|
||
|
|
#
|
||
|
|
# The default 3-replica class also physically could not place this volume: all
|
||
|
|
# three control-plane disks were already at their over-provisioning ceiling
|
||
|
|
# (storage-over-provisioning-percentage=100, 30% reserved), so a 120Gi x3
|
||
|
|
# request failed with ReplicaSchedulingFailure on every node.
|
||
|
|
apiVersion: storage.k8s.io/v1
|
||
|
|
kind: StorageClass
|
||
|
|
metadata:
|
||
|
|
name: longhorn-llm-local
|
||
|
|
provisioner: driver.longhorn.io
|
||
|
|
allowVolumeExpansion: true
|
||
|
|
reclaimPolicy: Delete
|
||
|
|
volumeBindingMode: Immediate
|
||
|
|
parameters:
|
||
|
|
numberOfReplicas: "1"
|
||
|
|
dataLocality: "strict-local"
|
||
|
|
diskSelector: "llm"
|
||
|
|
staleReplicaTimeout: "30"
|
||
|
|
fsType: "ext4"
|