Volume Commands
Use volume commands to view and manage the lifecycle of DirectPV-managed volumes on Kubernetes.
For step-by-step procedures on common volume operations, see Managing Volumes.
Commands
| Command | Description |
|---|---|
| list volumes | Display volume status, capacity, and pod assignments |
| label volumes | Add, update, or remove labels on volumes |
| suspend volumes | Suspend volumes for maintenance (mounts read-only) |
| resume volumes | Resume suspended volumes to restore normal operation |
Common workflows
View volumes by status
List all volumes or filter by status:
kubectl directpv list volumes --all
kubectl directpv list volumes --status=pending
Find volumes for a specific pod
Filter volumes by pod name or namespace:
kubectl directpv list volumes --pod-names=minio-{0...3}
kubectl directpv list volumes --pod-namespaces=production
Label volumes for identification
Add custom labels to volumes for organizational purposes:
kubectl directpv label volumes tier=hot --nodes=node1
For information on labeling, see label volumes.
Suspend and resume volumes
Suspend volumes to allow StatefulSet pods to start while addressing issues:
- Suspend the volume using
suspend volumes. - Address the underlying issue.
- Resume the volume using
resume volumes.
For details on volume scheduling, see Scheduling.