Offline Replica Rebuilding
Starting with v1.9.0, Longhorn supports offline replica rebuilding, allowing degraded volumes to automatically rebuild replicas while detached.
offline-replica-rebuilding
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.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 |
---|---|---|
true | ignored | Yes |
false | ignored | No |
true | enabled | Yes |
false | enabled | Yes |
true | disabled | No |
false | disabled | No |
When offline rebuilding starts, degraded volumes can get stuck in the attached state if rebuilding conditions are not met. To prevent this, if the necessary conditions are not satisfied, offline rebuilding will not start or will be canceled.
Benefits:
Required conditions:
Offline rebuilding automatically starts for degraded volumes once the required conditions are met. These conditions include:
When offline rebuilding is enabled, Longhorn determines whether it should start.
Longhorn determines if a rebuilding process should be canceled while in progress.
Scheduled
condition status becomes False
, the offline rebuilding is canceled, and the volume is detached.Scheduled
condition status becomes False
.Offline rebuilding is not supported for 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.