From c212019f3ac76d8b8e3f2afcda45fcf7ca9d9656 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Tue, 2 Aug 2011 10:49:57 +0000 Subject: [PATCH] Change DEFAULT_UDEV_SYNC to 1 so udev_sync is used even without any config. This should be set by default! Normally we have "activation/udev_sync = 1" in lvm.conf (example.conf.in). But if we use lvm2 without any config file (or without a definition within '--config' option) the DEFAULT_UDEV_SYNC is used instead. Together with verify_udev_operations=0 (when we rely on udev fully), this can cause races as the node could be missing when needed. (See also https://bugzilla.redhat.com/show_bug.cgi?id=723144) --- WHATS_NEW | 1 + lib/config/defaults.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index 858e1298f..f039f5f2d 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.87 - =============================== + Change DEFAULT_UDEV_SYNC to 1 so udev_sync is used even without any config. Add systemd unit file to provide lvm2 monitoring. Compare also file size to detect changed config file. diff --git a/lib/config/defaults.h b/lib/config/defaults.h index afd8dc1aa..7793d3216 100644 --- a/lib/config/defaults.h +++ b/lib/config/defaults.h @@ -77,7 +77,7 @@ #define DEFAULT_LABELSECTOR UINT64_C(1) #define DEFAULT_READ_AHEAD "auto" #define DEFAULT_UDEV_RULES 1 -#define DEFAULT_UDEV_SYNC 0 +#define DEFAULT_UDEV_SYNC 1 #define DEFAULT_VERIFY_UDEV_OPERATIONS 0 #define DEFAULT_ACTIVATION_CHECKS 0 #define DEFAULT_EXTENT_SIZE 4096 /* In KB */