-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
rhel-10.2
-
None
-
No
-
None
-
rhel-storage-lvm
-
None
-
False
-
False
-
-
None
-
None
-
None
-
None
-
Unspecified
-
Unspecified
-
Unspecified
-
None
What were you trying to do that didn't work?
In the context of PR-based recovery in lvmlockd, there is a rare case in which the lvmlockd PR key may contain the incorrect host generation number.
1. In lockstart, lvmlockd reads the sanlock generation from the local host's host_id lease on disk, before calling add_lockspace. That generation is returned to the vgchange lockstart command as prev_generation.
2. In lockstart, lvmlockd then calls sanlock_add_lockspace which increments the local generation number on disk, so lockstart results in the host running with prev_generation+1.
3. vgchange lockstart ensures that the registered PR key for the host (when using a host_id+gen key) includes the generation prev_generation+1, so it matches the currently running generation.
On rare occasions, in sanlock_add_lockspace (step 2) the new generation number can be the previous ondisk generation +2, rather than the usual +1.