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:

  1. Cordon all drives on the node to prevent scheduling new volumes to those drives:
    kubectl directpv cordon --nodes=node1
    
  2. Perform maintenance tasks.
  3. Uncordon drives when maintenance is complete:
    kubectl directpv uncordon --nodes=node1
    

Isolate drives with errors

When a drive reports errors:

  1. Cordon the drive immediately to prevent scheduling volumes:
    kubectl directpv cordon --status=error
    
  2. Investigate the issue.
  3. If repair is needed, suspend the drive using kubectl directpv suspend drives.

Phase out a drive before replacement

When planning to replace a drive:

  1. Cordon the drive to prevent scheduling new volume:
    kubectl directpv cordon --nodes=node1 --drives=sda
    
  2. Migrate or delete existing volumes from the drive.
  3. Remove the drive from DirectPV using kubectl directpv remove.
  4. Replace the physical drive.
  5. Initialize the new drive using kubectl directpv init.