kubectl directpv resume drives

The kubectl directpv resume drives command restores suspended drives to normal operation. When DirectPV resumes a drive, its volumes return to using the actual drive storage instead of the temporary read-only mount.

Use this command after completing maintenance tasks such as drive repair.

For information on suspending drives, see kubectl directpv suspend drives.

Syntax

Resume a drive by its ID:

kubectl directpv resume drives af3b8b4c-73b4-4a74-84b7-1ec30492a6f0

Output:

┌────────────────────────────────────────┬─────────────────────────────┐
│ DRIVE                                  │ MESSAGE                     │
├────────────────────────────────────────┼─────────────────────────────┤
│ af3b8b4c-73b4-4a74-84b7-1ec30492a6f0   │ Resumed                     │
└────────────────────────────────────────┴─────────────────────────────┘
kubectl directpv resume drives [DRIVE_ID ...]           \
                               [-d|--drives "string"]   \
                               [--dry-run]              \
                               [-n|--nodes "string"]
  • DRIVE_ID is the unique identifier of the drive to resume.
  • Brackets [] indicate optional parameters.

Parameters

DRIVE_ID

Optional

The unique identifier of one or more drives to resume. Specify multiple drive IDs separated by spaces. Use kubectl directpv list drives --all to find drive IDs.

--nodes

Optional

Resume drives on specific nodes. Supports ellipsis expansion notation.

Short form: -n

--drives

Optional

Resume drives by name. Supports ellipsis expansion notation.

Short form: -d

--dry-run

Optional

Display what drives would be resumed without making changes.

Global flags

This command supports the following global flags:

FlagDescription
--kubeconfigPath to the kubeconfig file to use for CLI requests.
--quietSuppress printing error messages.

Examples

Resume a drive by ID

Restore a specific drive to normal operation after maintenance:

kubectl directpv resume drives af3b8b4c-73b4-4a74-84b7-1ec30492a6f0

Resume all suspended drives on a node

Restore all suspended drives on node1 to normal operation:

kubectl directpv resume drives --nodes=node1

Resume a specific drive on a specific node

Resume drive sda on node1:

kubectl directpv resume drives --nodes=node1 --drives=sda

Preview resume operation

Check which drives would be resumed without making changes:

kubectl directpv resume drives --nodes=node1 --dry-run

Behavior

What happens when resuming a drive?

When you resume a suspended drive:

  1. The drive status changes from Suspended to Ready.
  2. Volumes on the drive use the actual drive storage, with read-write access, the next time they are mounted.
  3. Pods that are still running keep the temporary read-only directory. Restart the pods that use the drive's volumes, so they use the drive again.

Selection requirements

You must specify at least one selection method:

  • One or more DRIVE_ID arguments
  • --nodes flag
  • --drives flag

Verify drive status

After resuming, verify the drive is operational:

kubectl directpv list drives --all

Drives that resumed successfully show Ready status without the Suspended flag.

On this page