kubectl directpv resume volumes

The kubectl directpv resume volumes command restores suspended volumes to normal operation. When DirectPV resumes a volume, it returns to using its allocated drive storage with read-write access.

Use this command after completing maintenance tasks or when a suspended volume’s underlying drive has been repaired.

For information on suspending volumes, see kubectl directpv suspend volumes. For information on volume operations, see Managing Volumes.

Syntax

Aliases

The following aliases have the same function:

  • kubectl directpv resume volume
  • kubectl directpv resume vol

Parameters

VOLUME

Optional

The name of one or more volumes to resume. Specify multiple volume names separated by spaces. Use kubectl directpv list volumes --all to find volume names.

--nodes

Optional

Resume volumes on specific nodes. Specify multiple nodes as a comma-separated list or by repeating the flag. Supports ellipsis expansion notation.

Short form: -n

--drives

Optional

Resume volumes on specific drives by name. Specify multiple drives as a comma-separated list or by repeating the flag. Supports ellipsis expansion notation.

Short form: -d

--pod-names

Optional

Resume volumes by pod name. Specify multiple names as a comma-separated list or by repeating the flag. Supports ellipsis expansion notation.

--pod-namespaces

Optional

Resume volumes by pod namespace. Specify multiple namespaces as a comma-separated list or by repeating the flag. Supports ellipsis expansion notation.

--dry-run

Optional

Display what volumes would be resumed without making changes.

Global flags

This command supports the following global flags:

Flag Description
--kubeconfig Path to the kubeconfig file to use for CLI requests.
--quiet Suppress printing error messages.

Examples

Resume a volume by name

Restore a specific volume to normal operation:

kubectl directpv resume volumes pvc-0700b8c7-85b2-4894-b83a-274484f220d0

Resume all volumes on a node

Restore all suspended volumes on node1:

kubectl directpv resume volumes --nodes=node1

Resume volumes on a specific drive

Resume all volumes on drive sda on node1:

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

Preview resume operation

Check which volumes would be resumed without making changes:

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

Behavior

What happens when resuming a volume?

When you resume a suspended volume:

  1. DirectPV remounts the volume to use its allocated drive storage.
  2. The volume returns to read-write access.
  3. The Suspended flag is removed from the volume status.

Selection requirements

You must specify at least one selection method:

  • One or more VOLUME arguments
  • --nodes flag
  • --drives flag
  • --pod-names flag
  • --pod-namespaces flag

When you specify multiple selection flags, DirectPV resumes only volumes that match all criteria (AND logic).

Verify volume status

After resuming, verify the volume is operational:

kubectl directpv list volumes --all

Volumes that resumed successfully no longer show the Suspended flag in their status.