Comment 1 for bug 1920047

Revision history for this message
Heitor Alves de Siqueira (halves) wrote :

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