Scheduling Commands
Use cordoning commands to manage drive availability for volume scheduling. These commands help you manage drives during maintenance, replacement, or troubleshooting.
For details on how DirectPV selects drives for volumes, see Volume Scheduling.
Commands
| Command | Description |
|---|---|
| cordon | Mark drives as unschedulable |
| uncordon | Mark drives as ready for scheduling |
Common workflows
Planned node maintenance
Before taking a node offline:
- Cordon all drives on the node to prevent scheduling new volumes to those drives:
kubectl directpv cordon --nodes=node1 - Perform maintenance tasks.
- Uncordon drives when maintenance is complete:
kubectl directpv uncordon --nodes=node1
Isolate drives with errors
When a drive reports errors:
- Cordon the drive immediately to prevent scheduling volumes:
kubectl directpv cordon --status=error - Investigate the issue.
- If repair is needed, suspend the drive using
kubectl directpv suspend drives.
Phase out a drive before replacement
When planning to replace a drive:
- Cordon the drive to prevent scheduling new volume:
kubectl directpv cordon --nodes=node1 --drives=sda - Migrate or delete existing volumes from the drive.
- Remove the drive from DirectPV using
kubectl directpv remove. - Replace the physical drive.
- Initialize the new drive using
kubectl directpv init.