Drive Commands
Use drive commands to discover, initialize, and manage the lifecycle of DirectPV-managed drives on Kubernetes nodes.
For step-by-step procedures on common drive operations, see Managing Drives.
Commands
| Command | Description |
|---|---|
| label drives | Add, update, or remove labels on drives for scheduling |
| list drives | Display drive status, capacity, and volume information |
| repair | Repair XFS filesystem errors on drives |
| suspend drives | Suspend drives for maintenance (mounts volumes read-only) |
| resume drives | Resume suspended drives to restore normal operation |
Common workflows
Add drives to DirectPV
- Run
discoverto probe nodes and generate adrives.yamlfile. - Review and edit
drives.yamlto select the drives you want to add. - Run
initto format and initialize the selected drives.
Repair a faulty drive
- Identify the drive using
list drives --status=error. - Suspend the drive using
suspend drives. - Run
repairto attempt XFS filesystem recovery. - Resume the drive using
resume drives.
Schedule workloads to specific drives
- Add labels to drives using
label drives. - Configure your StorageClass to use label-based scheduling.
For details on scheduling strategies, see Scheduling and Schedule by Label.