Remote storage latency can slow high-frequency I/O such as training data shuffling and inference caching. Pass local NVMe disks on GPU-HPN nodes directly to GPU Pods as block devices, bypassing the file system layer for near-bare-metal performance.
How it works
GPU-HPN capacity reservation nodes include local NVMe disks. The acs-local-passthrough-controller component exposes these disks to GPU Pods as block devices, bypassing the file system layer for near-bare-metal I/O performance.
|
Dimension |
Implementation |
|
Mount type |
Block device ( |
|
Scheduling awareness |
Based on CSI |
|
Exclusivity |
Once a PVC is bound, it is permanently associated with a physical disk and exclusive to the Pod that references it. You can create multiple PVCs concurrently, each claiming one disk. |
|
Capacity |
The system allocates the entire physical disk, regardless of the value specified in the |
|
Lifecycle |
The controller automatically handles disk discovery, allocation, data erasure, and reclamation. When you delete the PVC, the |
Local disks provide ephemeral storage, and the data is not persistent. Do not store data that cannot be easily recreated, such as model checkpoints or training logs. For data that requires persistence, use NAS, OSS, or CPFS volumes.
The following table shows how local disk data is affected in different scenarios.
|
Event category |
Event |
Local disk data |
|
Pod operation |
The Pod is deleted and recreated, but the PVC is retained. |
Retained |
|
Resource reclamation |
Delete the PVC. |
Deleted |
|
Node |
Node failure, release, or local disk damage |
Lost |
Prerequisites
-
You have an ACS of version 1.33 or later.
-
You have created a GPU-HPN capacity reservation and associated it with your cluster. The reservation provides dedicated physical nodes with local NVMe disks. The scheduler only assigns Pods with the
compute-class: gpu-hpnlabel to these nodes. For more information, see GPU-HPN capacity reservation. -
The following components and versions are available only through an allowlist. You must first Submit a ticket to request access:
-
virtual-kubeletv2.18.0-rc.2 or later -
acs-local-passthrough-controller
-
Mount and use a local disk volume
Step 1: Check for available NVMe disks
Before creating a PVC, ensure your cluster has available local NVMe disks.
-
Run the following command to check for available local NVMe disks on each node:
kubectl get csistoragecapacities -n kube-system \ -l csi.storage.k8s.io/drivername=local-passthrough.csi.alibabacloud.com \ -o jsonpath='{range .items[?(@.capacity!="0")]}{.metadata.name}{"\t"}{.nodeTopology.matchLabels.csi\.alibabacloud\.com/node-name}{"\t"}{.maximumVolumeSize}{"\t"}{.capacity}{"\n"}{end}' \ | awk 'BEGIN{printf "%-14s %-50s %-16s %s\n","NAME","NODE","DISK-SIZE","AVAILABLE"} {split($3,a,"Ki");split($4,b,"Ki");printf "%-14s %-50s %-16s %d\n",$1,$2,$3,b[1]/a[1]}' -
Check the expected output:
NAME NODE DISK-SIZE AVAILABLE csisc-12345 cn-wulanchabu-c.cr-ovt2bz1uoiyoxxxxxxxxx 3750738264Ki 2 csisc-abcde cn-wulanchabu-b.cr-xyz123456789xxxxxxxxx 3750738264Ki 1-
DISK-SIZE: The capacity of a single disk (maximumVolumeSize). -
AVAILABLE: The number of remaining allocatable disks on the node (capacity / maximumVolumeSize).
NoteIf
AVAILABLEis 0 for all nodes, all disks are in use. You must wait for other PVCs to be released or scale out the nodes. -
Step 2: Create a PVC
-
Create a file named
pvc.yamlthat uses thelocal-passthroughStorageClass. Installing theacs-local-passthrough-controllercomponent creates thelocal-passthroughStorageClass by default. Its reclaim policy isreclaimPolicy: Deleteand its binding mode isWaitForFirstConsumer.apiVersion: v1 kind: PersistentVolumeClaim metadata: name: local-disk-pvc namespace: default spec: accessModes: - ReadWriteOncePod # Exclusive access by a single Pod. volumeMode: Block # Only the block device mode is supported. storageClassName: local-passthrough resources: requests: storage: 10Gi # Must be less than or equal to the DISK-SIZE from Step 1. The entire physical disk is allocated. -
Apply the configuration:
kubectl apply -f pvc.yamlBecause the StorageClass uses the
WaitForFirstConsumerbinding mode, the PVC remains in thePendingstate until a Pod references it.NoteIf the requested
storagevalue exceeds theDISK-SIZEfrom Step 1, the PVC creation fails.
Step 3: Create a GPU Pod and mount the disk
-
Create
pod.yamland usevolumeDevicesto attach a block device:apiVersion: v1 kind: Pod metadata: name: gpu-workload namespace: default labels: alibabacloud.com/compute-class: "gpu-hpn" # Required. Specifies the GPU-HPN compute type. spec: containers: - name: main # Example: alibaba-cloud-linux-3-registry.cn-hangzhou.cr.aliyuncs.com/alinux3/alinux3:latest image: <your-gpu-image> volumeDevices: # Use volumeDevices for block devices. - name: local-disk devicePath: /dev/xvda volumes: - name: local-disk persistentVolumeClaim: claimName: local-disk-pvc -
Apply the configuration:
kubectl apply -f pod.yaml
Step 4: Verify the mount and data persistence
-
Confirm that the PVC is bound:
kubectl get pvc local-disk-pvcExpected output:
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE local-disk-pvc Bound local-passthrough-d0cfcee6-734d-4d59-ae76-xxxxxxxxxxxx 3750738264Ki RWOP local-passthrough 1mA
STATUSofBoundconfirms that the PVC is bound to a local NVMe disk and ready for use. -
Confirm that the block device is visible inside the Pod:
kubectl exec gpu-workload -- lsblk -
Write data to the block device and then read it back:
# Write data to the block device. kubectl exec gpu-workload -- sh -c 'echo "test" > /dev/xvda' # Read the data to verify. kubectl exec gpu-workload -- head -c 5 /dev/xvdaExpected output:
test -
Verify that data persists after Pod recreation (delete only the Pod, not the PVC):
# Delete the Pod but keep the PVC. kubectl delete pod gpu-workload # Recreate the Pod by using the same configuration. kubectl apply -f pod.yaml # Wait for the Pod to be ready, then read the data. kubectl wait --for=condition=ready pod/gpu-workload --timeout=60s kubectl exec gpu-workload -- head -c 5 /dev/xvdaThe expected output is still:
test
As long as you do not delete the PVC, recreating the Pod schedules it back to the original node and reattaches it to the same disk, so the data persists. Deleting the PVC immediately erases the data.
Clean up resources
Deleting a PVC triggers the reclaimPolicy: Delete policy of the local-passthrough StorageClass, which erases disk data before returning the disk to the capacity pool.
# Clean up the Pod and PVC.
kubectl delete pod gpu-workload
kubectl delete pvc local-disk-pvc
Verify reclamation: After you recreate the PVC and Pod, the newly allocated disk should be empty:
# Recreate the PVC and Pod.
kubectl apply -f pvc.yaml
kubectl apply -f pod.yaml
# Wait for the Pod to be ready.
kubectl wait --for=condition=ready pod/gpu-workload --timeout=60s
# Read from the block device.
kubectl exec gpu-workload -- head -c 5 /dev/xvda
Expected result: No output (or null bytes), confirming that the allocated disk is empty.
-
The
reclaimPolicy: Deleteaction is irreversible. Before you delete a PVC, ensure that all necessary data is backed up to persistent storage. -
Recreating a PVC does not guarantee that the scheduler will place the new Pod on the original node. To verify data erasure on a specific node, you can add node affinity to your Pod, create enough Pods to occupy all disks on that node, and then verify each one.
Next steps
-
Configure your training or inference workload to read from and write to
/dev/xvda. If needed, you can runmkfs.ext4 /dev/xvdainside the container to format it and mount it as a file system, or you can use it directly for block I/O. Themkfscommand is a privileged operation and requires allowlist access. To request access, Submit a ticket. -
Evaluate your caching strategy. Store only reproducible intermediate data on the local disk. Keep model weights and checkpoints on persistent storage, such as CPFS.
-
Monitor disk usage. Periodically check the node-level capacity by running
kubectl get csistoragecapacities.
Quotas and limitations
-
Only the block device mode (
volumeMode: Block) is supported. To use a file system, you must runmkfsinside the container to format the device. Themkfscommand is a privileged operation and requires allowlist access. To request access, Submit a ticket. -
This feature supports only the
ReadWriteOncePodaccess mode. Only one Pod can mount a single disk exclusively at a time. Multi-Pod sharing is not available. -
Local disks are tightly coupled to their nodes and do not support cross-node access.
-
The physical disk size is fixed; you cannot scale it elastically.
-
Each GPU-HPN Pod can mount only one local NVMe disk.
FAQ
Why are my Pod and PVC stuck in the Pending state?
In WaitForFirstConsumer mode, PVC binding depends on successful Pod scheduling. First investigate why the Pod is failing to schedule.
kubectl describe pod gpu-workload
Common causes:
|
Symptom |
Cause |
Troubleshooting/solution |
|
|
No node satisfies both the GPU resource and available local NVMe disk requirements. |
Follow the instructions in Step 1 to confirm that a node with |
|
|
The Pod is missing the |
Add the label to the Pod specification. |
|
|
A custom |
Adjust the scheduling constraints. |
|
|
An issue exists with the PVC. |
Run |
Why do I get an "insufficient space" error when writing large files?
The actual writable capacity is the full physical capacity of the disk (DISK-SIZE), regardless of the storage request value in the PVC.
How can I make my data persistent?
Local disks do not provide a persistence guarantee. For data that requires persistence, use NAS, OSS, or CPFS volumes.