10.2. Enabling reclaim space operation using ReclaimSpaceJob


ReclaimSpaceJob is a namespaced custom resource (CR) designed to invoke reclaim space operation on the target volume. This is a one time method that immediately starts the reclaim space operation. You have to repeat the creation of ReclaimSpaceJob CR to repeat the reclaim space operation when required.

注意
  • Recommended interval between the reclaim space operations is weekly.
  • Ensure that the minimum interval between each operation is at least 24 hours.
  • Schedule the reclaim space operation during off-peak, maintenance window, or when the workload input/output is expected to be low.

Procedure

  1. Create and apply the following custom resource for reclaim space operation:

    apiVersion: csiaddons.openshift.io/v1alpha1
    kind: ReclaimSpaceJob
    metadata:
      name: sample-1
    spec:
      target:
        persistentVolumeClaim: pvc-1
      timeout: 360

    where,

    target
    Indicates the volume target on which the operation is performed.
    persistentVolumeClaim
    Name of the PersistentVolumeClaim.
    backOfflimit
    Specifies the maximum number of retries before marking the reclaim space operation as failed. The default value is 6. The allowed maximum and minimum values are 60 and 0 respectively.
    retryDeadlineSeconds
    Specifies the duration in which the operation might retire in seconds and it is relative to the start time. The value must be a positive integer. The default value is 600 seconds and the allowed maximum value is 1800 seconds.
    timeout
    Specifies the timeout in seconds for the grpc request sent to the CSI driver. If the timeout value is not specified, it defaults to the value of global reclaimspace timeout. Minimum allowed value for timeout is 60.
  2. Delete the custom resource after completion of the operation.
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

关于红帽文档

Legal Notice

Theme

© 2026 Red Hat
返回顶部