[lvm-devel] [PATCH LVM2 v1 2/2] lvmlockctl: Automatically handle failure

Leo Yan leo.yan at linaro.org
Wed Mar 3 03:48:50 UTC 2021


Hi David,

On Tue, Mar 02, 2021 at 11:52:01AM -0600, David Teigland wrote:
> After some more changes this seems to be about done, please let me know if
> this works for you.  I'm thinking about holding off on the blkdeactivate
> change for a while to see if we can get a better alternative in the near
> term (to avoid carrying the temporary forcevg option.)
> 
> https://sourceware.org/git/?p=lvm2.git;a=shortlog;h=refs/heads/dev-dct-lvmlockctl-kill-2

I verified the patches on the branch "dev-dct-lvmlockctl-kill-2",
below is the testing result.

With setting the lvm.conf with config:

  lvmlockctl_kill_command = "blkdeactivate -l forcevg"

After the failure happened, the device-mapper will be set to "error"
target and the lockspace for the failed VG will be removed.  So I
can confirm the failure handling is expected.

But I found the building failure which is caused by the patch
"lvmlockctl: use lvm.conf lvmlockctl_kill_command", you should include
below change:

diff --git a/include/configure.h.in b/include/configure.h.in
index 812cacc..9e7b127 100644
--- a/include/configure.h.in
+++ b/include/configure.h.in
@@ -643,6 +643,9 @@
 /* Path to lvm binary. */
 #undef LVM_PATH
 
+/* Path to lvm binary dir. */
+#undef LVM_DIR
+
 /* Define to 1 if `major', `minor', and `makedev' are declared in <mkdev.h>.
    */
 #undef MAJOR_IN_MKDEV


Thank you a lot!

Leo




More information about the lvm-devel mailing list