backport https://github.com/longhorn/longhorn/issues/12268
backport #12268