After reattachment and remount complete, users may need to manually restart the related workload containers for the volume restoration if the following recommended setup is not applied.
Longhorn will reattach the volume if the volume engine fails unexpectedly.
Longhorn will detect and remount filesystem for the volume after the reattachment.
But the auto remount does not work for xfs filesystem.
Since mounting one more layers with xfs filesystem is not allowed and will trigger the error XFS (sdb): Filesystem has duplicate UUID <filesystem UUID> - can't mount.
Users need to manually unmount then mount the xfs filesystem on the host. The device path on host for the attached volume is /dev/longhorn/<volume name>
Recommended setup when using Longhorn volumes
In order to recover unexpectedly detached volumes automatically, users can set restartPolicy to Always then add livenessProbe for the workloads using Longhorn volumes.
Then those workloads will be restarted automatically after reattachment and remount.