DiskPool Expansion

Explore this Page

Overview

The DiskPool Expansion feature in DataCore Puls8 helps you prevent storage outages when a pool allocation approaches capacity. By allowing controlled growth of an existing DiskPool, you can avoid replica failures caused by “no space” (ENOSPC - Error No Space) conditions and keep applications running smoothly.

This feature introduces the maxExpansion parameter in the DiskPool Custom Resource (CR) for Replicated PV Mayastor, letting you define the maximum size to which a pool can grow, either as an absolute value or as a multiple of its initial capacity.

This document explains how to configure, and perform a DiskPool expansion, including the required CR settings, status fields, and supported expansion methods.

Pools cannot be expanded indefinitely. Each pool has a maximum expansion limit defined at creation. This limit is immutable after the pool is created, so pools created before this release may have limited growth capability.

Configuring Maximum Expansion

You can configure the maximum pool size with the maxExpansion field in the DiskPool CR:

  • Absolute Size: Specify an explicit size in MiB, GiB, or TiB (binary units). For example: 800GiB, 3.5TiB, or 1073741824B.
  • Factor: Specify a multiplier of the initial capacity, such as 1x, 2x, 5x, 8x. For example, a value of 5x allows the pool to be expanded to at least five times its initial capacity.

If no value is specified, the default is set to 1x.

Copy
Example: DiskPool Configuration with Factor-Based Expansion
apiVersion: "openebs.io/v1beta3"
kind: DiskPool
metadata:
  name: <pool-name>
  namespace: <namespace>
spec:
  node: <node-name>
  disks: ["/dev/disk/by-id/<id>"]
  maxExpansion: "20x"
Copy
Example: DiskPool Configuration with Absolute Size Expansion
apiVersion: "openebs.io/v1beta3"
kind: DiskPool
metadata:
  name: <pool-name>
  namespace: <namespace>
spec:
  node: <node-name>
  disks: ["/dev/disk/by-id/<id>"]
  maxExpansion: "6TiB"

Monitoring Pool Expansion Fields

Two new status fields appear in the DiskPool CR state:

  • maxExpandableSize: The absolute maximum size to which the pool can grow. Expansion beyond this size will fail.
  • The failure does not impact existing blobs or volumes serving application I/O. However, the pool expansion request fails, preventing the pool from reaching its maxExpandableSize.

  • diskCapacity: The current size of the underlying disk. capacity represents usable space after reserving metadata. When planning growth, consider both diskCapacity and maxExpandableSize.
  • Caution: The underlying disk can be expanded up to the defined maxExpandableSize. If the disk is grown beyond this value, the expansion request will fail.

Expanding the DiskPool

  1. Expand the underlying disk as needed, but do not grow it beyond the maxExpandableSize limit.
  2. Trigger the Replicated PV Mayastor pool expansion workflow by using one of the following methods:
    • Annotate the DSP CR
      • Add the annotation openebs.io/expand: true to the DSP CR to trigger the reconciliation loop.
      • Copy
        Annotate DSP CR
        kubectl annotate dsp <name> openebs.io/expand=true -n <ns>
      • The Operator removes the annotation once the expansion succeeds or when it encounters an unrecoverable error.
    • Use the DataCore Puls8 plugin
      • Run the following command to invoke the pool expansion API:
      • Copy
        Expand the Pool
        kubectl puls8 mayastor expand pool <pool-id>
  3. If expansion succeeds, you will see both capacity and diskCapacity updated accordingly.

Best Practices

  • Monitor usage trends to plan expansions before capacity is exhausted.
  • Always use binary units (MiB, GiB, TiB) to avoid ambiguity.
  • Verify maxExpandableSize before growing the underlying disk.

We recommend using multiple DiskPools instead of over-expanding a single DiskPool (for example, setting maxExpansion of 100 GiB to grow up to 50-60 TiB). Increasing the maxExpansion value reserves more metadata pages in the pool, which can lengthen pool creation and import times. However, larger pools may be appropriate if the volumes are relatively large.

Benefits of DiskPool Expansion

  • Allows More Expansion: Enables larger growth potential to accommodate future storage needs.
  • Prevents Application Downtime: Maintains service availability by eliminating ENOSPC risks.
  • Operational Flexibility: Supports stepwise disk growth without interrupting workloads.
  • Efficient Capacity Planning: Provides clear visibility through maxExpandableSize and diskCapacity fields for proactive scaling.

Learn More