diff --git a/udev/13-dm-disk.rules.in b/udev/13-dm-disk.rules.in index 1920260af..f8e4ac6f4 100644 --- a/udev/13-dm-disk.rules.in +++ b/udev/13-dm-disk.rules.in @@ -17,6 +17,10 @@ ENV{DM_UDEV_DISABLE_DISK_RULES_FLAG}=="1", GOTO="dm_end" SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}" ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}" +# Save previously detected dev type. +IMPORT{db}="ID_FS_TYPE" +ENV{ID_FS_TYPE}=="?*", ENV{DM_ID_FS_TYPE_OLD}="$env{ID_FS_TYPE}", ENV{ID_FS_TYPE}="" + ENV{DM_SUSPENDED}=="1", GOTO="dm_end" (BLKID_RULE) diff --git a/udev/69-dm-lvm-metad.rules.in b/udev/69-dm-lvm-metad.rules.in index d5087e3a4..2d6720e6a 100644 --- a/udev/69-dm-lvm-metad.rules.in +++ b/udev/69-dm-lvm-metad.rules.in @@ -17,6 +17,9 @@ SUBSYSTEM!="block", GOTO="lvm_end" (LVM_EXEC_RULE) +# If the PV label got lost, inform lvmetad about it. +ENV{DM_ID_FS_TYPE_OLD}=="LVM2_member", ENV{DM_ID_FS_TYPE}!="LVM2_member", GOTO="lvm_scan" + # Only process devices already marked as a PV - this requires blkid to be called before. ENV{ID_FS_TYPE}!="LVM2_member|LVM1_member", GOTO="lvm_end"