Offline Replica Rebuilding

Starting with v1.9.0, Longhorn supports offline replica rebuilding, allowing degraded volumes to automatically rebuild replicas while detached.​

Global Setting offline-replica-rebuilding

  • When enabled, Longhorn automatically initiates offline rebuilding for eligible volumes.​
  • For more information, see settings.

Per-Volume Override

  • You can override the global Offline Replica Rebuilding setting for each volume individually using the Longhorn UI or by running kubectl -n longhorn-system edit volume [volume-name] and modifying the Spec.OfflineRebuilding field.
  • When set to enabled or disabled, this per-volume setting takes precedence over the global configuration. The default value is ignored.
Global Setting (offline-replica-rebuilding)Per-Volume Setting (spec.offlineRebuilding)Offline Rebuilding Enabled
trueignoredYes
falseignoredNo
trueenabledYes
falseenabledYes
truedisabledNo
falsedisabledNo

Rebuilding Process

  • When triggered, Longhorn attaches the volume without activating the frontend, rebuilds any missing replicas, and then detaches the volume upon completion.
  • This process can be interrupted if the workload scales up.

Limitations

It does not apply to faulted volumes.​


© 2019-2025 Longhorn Authors | Documentation Distributed under CC-BY-4.0


© 2025 The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Usage page.