rpk cluster partitions balancer-status

Queries cluster for partition balancer status:

If continuous partition balancing is enabled, Redpanda will continuously reassign partitions from both unavailable nodes and from nodes using more disk space than the configured limit.

Use this command to monitor the partition balancer status and the partition distribution across brokers in the cluster.

Usage

rpk cluster partitions balancer-status [flags]

Fields

Value Description

Status

Either off, ready, starting, in progress, or stalled.

Seconds Since Last Tick

The last time the partition balancer ran.

Current Reassignments Count

Current number of partition reassignments in progress.

Unavailable Nodes

The nodes that have been unavailable after a time set by the "partition_autobalancing_node_availability_timeout_sec" cluster property.

Over Disk Limit Nodes

The nodes that surpassed the threshold of used disk percentage specified in the "partition_autobalancing_max_disk_usage_percent" cluster property.

Balancer Status

Value Description

off

The balancer is disabled.

ready

The balancer is active but there is nothing to do.

starting

The balancer is starting but has not run yet.

in_progress

The balancer is active and is in the process of scheduling partition movements.

stalled

Violations have been detected and the balancer cannot correct them.

Stalled Balancer

A stalled balancer can occur for a few reasons and requires a bit of manual investigation. A few areas to investigate:

  • Are there are enough healthy nodes to which to move partitions? For example, in a three node cluster, no movements are possible for partitions with three replicas. You will see a stall every time there is a violation.

  • Does the cluster have sufficient space? If all nodes in the cluster are utilizing more than 80% of their disk space, rebalancing cannot proceed.

  • Do all partitions have quorum? If the majority of a partition’s replicas are down, the partition cannot be moved.

  • Are any nodes in maintenance mode? Partitions are not moved if any node is in maintenance mode.

Global flags

Value Type Description

--config

string

Redpanda or rpk config file; default search paths are ~/.config/rpk/rpk.yaml, $PWD/redpanda.yaml, and /etc/redpanda/redpanda.yaml.

-X, --config-opt

stringArray

Override rpk configuration settings; -X help for detail or -X list for terser detail.

--ignore-profile

bool

Ignore rpk.yaml and redpanda.yaml; use default settings.

--profile

string

rpk profile to use.

-v, --verbose

bool

Enable verbose logging.