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

Resume all volumes on a node:

kubectl directpv resume volumes --nodes=node1

Output:

Volume node1/pvc-a1b2c3d4-e5f6-7890-abcd-ef123456 resumed
Volume node1/pvc-b2c3d4e5-f6a7-8901-bcde-f1234567 resumed
kubectl directpv resume volumes [VOLUME ...]            \
                                [-d|--drives "string"]  \
                                [--dry-run]             \
                                [-n|--nodes "string"]   \
                                [--pod-names "string"]  \
                                [--pod-namespaces "string"]
  • VOLUME is the name of the volume to resume.
  • Brackets [] indicate optional parameters.

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:

FlagDescription
--kubeconfigPath to the kubeconfig file to use for CLI requests.
--quietSuppress 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.

On this page