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

  1. Run discover to probe nodes and generate a drives.yaml file.
  2. Review and edit drives.yaml to select the drives you want to add.
  3. Run init to format and initialize the selected drives.

Repair a faulty drive

  1. Identify the drive using list drives --status=error.
  2. Suspend the drive using suspend drives.
  3. Run repair to attempt XFS filesystem recovery.
  4. Resume the drive using resume drives.

Schedule workloads to specific drives

  1. Add labels to drives using label drives.
  2. Configure your StorageClass to use label-based scheduling.

For details on scheduling strategies, see Scheduling and Schedule by Label.