From 35cefa50fad511cc91001e79621aa03436bf2791 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Thu, 2 Nov 2023 12:10:56 -0500 Subject: [PATCH] device_id: change default search_for_devnames to all Problematic scenario: . the device for a PV has no wwid, so it's identified in system.devices with IDTYPE=devname IDNAME=/dev/foo . user adds/enables a wwid for the device . on reboot, the device name changes, e.g. now /dev/bar . the code that searches for the new device name includes an optimization to skip looking on devs that have a wwid, on the basis that a device with a wwid won't have IDTYPE=devname . this optimization causes lvm to not look for the PV on /dev/bar since that device now has a wwid, so the PV is not found . the optimization is enabled by search_for_devnames="auto" . change the default to search_for_devnames="all" which does not use the problematic optimization --- lib/config/defaults.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/config/defaults.h b/lib/config/defaults.h index 2a97baded..8f713b12e 100644 --- a/lib/config/defaults.h +++ b/lib/config/defaults.h @@ -330,7 +330,7 @@ #define DEFAULT_DEVICES_FILE "system.devices" -#define DEFAULT_SEARCH_FOR_DEVNAMES "auto" +#define DEFAULT_SEARCH_FOR_DEVNAMES "all" #define DEFAULT_WWIDS_FILE "/etc/multipath/wwids"