Automatic Offline Replica Rebuilding

Longhorn currently does not support online replica rebuilding for volumes that use the V2 Data Engine. To overcome this limitation, an automatic offline replica rebuilding mechanism has been implemented. When a degraded volume is detached, Longhorn attaches the volume in maintenance mode and then initiates the rebuilding process. The volume is detached again once rebuilding is completed.


Global Settings

  • offline-replica-rebuilding: Setting that allows rebuilding of offline replicas for volumes using the V2 Data Engine. This setting is enabled by default.

Volume-Specific Settings

  • Volume.Spec.OfflineReplicaRebuilding: Setting that allows rebuilding of offline replicas for a specific volume. The default value is “ignored”, which allows Longhorn to apply the value of the global setting offline-replica-rebuilding. (Options: “ignored”, “disabled”, “enabled”)


Interruptions are possible during offline replica rebuilding because Longhorn ensures that critical tasks take precedence. When an application attempts to attach a volume that is undergoing rebuilding, the rebuilding task is canceled to make way for the higher-priority task.

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

© 2024 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.