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