Balancing options

The balancer tool is executed via the /usr/lib/storpool/balancer.sh wrapper; for details, see Rebalancing the cluster. The tool accepts the following options:

-A

Don’t only move data from fuller to emptier drives. Note that -A and -F are the reverse of each other and mutually exclusive.

-b placementGroup

Use disks in the specified placement group to restore replication in critical conditions.

This option could be used to move data between placementGroups (in most cases from SSDs to HDDs).

-c factor

Factor for how much data to try to move around, from 0 to 10. The default is 0, required parameter. In most cases -c is not needed. The main use case with -c 10 is for 3-node clusters, where data needs to be “rotated” through the cluster.

The -c value is basically the trade-off between the uniformity of the data on the disks and the amount of data moved to accomplish that. A lower factor means less data to be moved around, but sometimes more inequality between the data on the disks, a higher one - more data to be moved, but sometimes with a better result in terms of equality of the amount of data for each drive.

-d diskId [-d diskId]

Put data only on the selected disks.

-D diskId [-D diskId]

Don’t move data from those disks.

--do-whatever-you-can

Decrease the redundancy level.

Warning

The --do-whatever-you-can option is for emergency use only, after the balancer has failed!

-E 0-99

Don’t empty if below, in percents

--empty-down-disks

Proceed with balancing even when there are down disks, and remove all data from them.

-f percent

Allow drives to be filled up to this percentage, from 0 to 99. Default 90.

Note

This -f option is required on clusters whose drives are full above 90%. Extreme care should be used when balancing in such cases.

-F

Only move data from fuller to emptier drives. Note that -A and -F are the reverse of each other and mutually exclusive.

-g placementGroup

Work only on the specified placement group.

--ignore-down-disks

Proceed with balancing even when there are down disks, and do not remove data from them.

--ignore-src-pg-violations

Exactly what it says

-m maxAgCount

Limit the maximum allocation group count on drives to this (effectively their usable size).

On clusters with drives with unsupported size (HDDs > 4TB) the -m option is required. It will limit the data moved onto these drives to up to the set number of allocation groups. This is done as the performance per TB space of larger drives is lower, and it degrades the performance for the whole cluster for high performance use cases.

-M maxDataToAdd

Limit the amount of data to copy to a single drive, to be able to rebalance “in pieces”.

This option is useful when a full rebalancing would involve many tasks until completed and could impact other operations (such as remote transfers, or the time required for a currently running recovery to complete). With the -M option the amount of data loaded by the balancer for each disk may be reduced, and a more rebalanced state is achieved through several smaller rebalancing operations.

--max-disbalance-before-striping X

In percents.

--min-disk-full X

Don’t remove data from disk if it is not at least this X% full.

--min-replication R

Minimum replication required.

-o overridesPgName

Specify override placement group name (required only if override template is not created).

--only-empty-disk diskId

Like -D for all other disks.

-R

Only restore replication for degraded volumes.

--restore-state DIRECTORY

Revert to a previous state of the disks (before the balancer commit execution). DIRECTORY is the name of one of the directories created by the balancer during previous runs, with a name like 2025-05-28-16-14-20.

-S

Prefer tail SSD.

-V vagId [-V vagId]

Skip balancing vagId.

-v

Verbose output. Shows data how all drives in the cluster would be affected according to the balancer. This differs from the later output from storpool balancer disks (see Balancer) – which is the point of view of storpool_mgmt – as that also takes into account all currently loaded relocations.