Troubleshooting: Two active engines during volume live migration
| February 7, 2025
Cannot perform any operation (detach/attach/snapshotting/etc…) on a Longhorn volume.
The longhorn-manager logs is showing repeated errors like:
[longhorn-manager-v65nc longhorn-manager] time="2023-09-12T00:41:43Z" level=warning msg="Error syncing Longhorn volume longhorn-system/testvol" controller=longhorn-volume error="failed to sync longhorn-system/testvol: failed to reconcile engine/replica state for testvol: BUG: found the second active engine testvol-e-be829d4a besides testvol-e-6c787758" node=phan-v400-two-active-engines-pool2-de9b2523-jd6hd
This is a bug which could happen during Longhorn volume live migration. Longhorn manager accidentally marked the new engine as active but failed to delete the old engine. This leads to two active engines during volume live migration and blocks volume operations.
If you observe that Longhorn volume cannot perform operation like attach/detach.
Checking if there are multiple active engine CRs belong to the volume.
Check all longhorn-manager log to see if there are errors similar to BUG: found the second active engine testvol-e-be829d4a besides testvol-e-6c787758
.
If yes, you have hit the bug.
The bug has been fixed in Longhorn version >= v1.4.4 and >= v1.5.2. However, if you are hitting it in older Longhorn version. You can:
kubectl get volumes <volume-name> -n longhorn-system -oyaml
kubectl get engines -n longhorn-system | grep -i <volume-name>
volume.Status.CurrentNodeID
Recent articles
Troubleshooting: Two active engines during volume live migration© 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.