We've determined this to be due to using disks with mixed sector sizes
(i.e. different physical and logical sector sizes). The mentioned patch
[0] enables lvmlockd to create shared leases in mixed sector sized
disks, but additional support is needed in sanlock for these to work
correctly.

The required sanlock patches are:
* d5e4def0d087 - sanlock: add flags to specify sector size [1]
* 445e86700fa3 - configurable sector size and align size [2]

If we don't have these additional sanlock patches, sanlock isn't able to
find the written leases due to alignment issues and ultimately those are
handled as invalid. Unfortunately, both sanlock patches are extensive
and change a lot of low-level internal structures, so providing them as
SRU updates would be prone to backporting errors and regressions.

Since both lvm2 and sanlock are working as expected with non-mixed
sector sizes, and the current versions actively prevent leases to be
written to mixed sector disks, we can consider that things are working
correctly. Support for mixed sector sizes should be considered a
"feature" instead, which is available starting with the versions below:

- lvm2: 2.03.10
- sanlock: 3.8.0

These versions are available in Ubuntu releases starting with Hirsute,
and have been provided as backports in focal-backports and groovy-
backports. Please refer to bug #1929432 and bug #1928708 for further
details on the -backports versions.

[0] https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=2d1fe38d84d4
[1] https://pagure.io/sanlock/c/d5e4def0d087
[2] https://pagure.io/sanlock/c/445e86700fa3


** Changed in: lvm2 (Ubuntu Focal)
       Status: Confirmed => Won't Fix

** Changed in: lvm2 (Ubuntu Groovy)
       Status: Confirmed => Won't Fix

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1920047

Title:
  sanlock global lock creation fail

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lvm2/+bug/1920047/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to