summaryrefslogtreecommitdiff
path: root/udev
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-02-02 00:28:12 +0900
committerPeter Rajnoha <prajnoha@redhat.com>2023-02-07 09:37:27 +0100
commit94f77a4d8d9737fca05fb4e451678ec440c68670 (patch)
treedf9e47170c1c48321bc83b2de50b45ea9aea1224 /udev
parentdc99f0def17b936f95c63612a56ae2a6ae81db0e (diff)
downloadlvm2-94f77a4d8d9737fca05fb4e451678ec440c68670.tar.gz
udev: import previous results of blkid when in suspended state
Follow-up for e10f67e91728f1e576803df884049ecbd92874d0. The commit e10f67e91728f1e576803df884049ecbd92874d0 tries to keep device node symlinks even if the device is in the suspended state. However, necessary properties that may previously obtained by the blkid command were not imported at least in the .rules file. So, unless ID_FS_xyz properties are imported by another earlier .rules file, the device node symlinks are still lost when event is processed in the suspended state. Let's explicitly import the necessary properties. RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=2158628 GHPR: https://github.com/lvmteam/lvm2/pull/105
Diffstat (limited to 'udev')
-rw-r--r--udev/13-dm-disk.rules.in14
1 files changed, 12 insertions, 2 deletions
diff --git a/udev/13-dm-disk.rules.in b/udev/13-dm-disk.rules.in
index 5cc08121e..dca00bc01 100644
--- a/udev/13-dm-disk.rules.in
+++ b/udev/13-dm-disk.rules.in
@@ -17,12 +17,22 @@ 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}"
-ENV{DM_SUSPENDED}=="1", ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}=="1", GOTO="dm_link"
-ENV{DM_NOSCAN}=="1", ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}=="1", GOTO="dm_link"
+ENV{DM_SUSPENDED}=="1", ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}=="1", GOTO="dm_import"
+ENV{DM_NOSCAN}=="1", ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}=="1", GOTO="dm_import"
ENV{DM_SUSPENDED}=="1", GOTO="dm_end"
ENV{DM_NOSCAN}=="1", GOTO="dm_watch"
(BLKID_RULE)
+GOTO="dm_link"
+
+LABEL="dm_import"
+IMPORT{db}="ID_FS_USAGE"
+IMPORT{db}="ID_FS_UUID_ENC"
+IMPORT{db}="ID_FS_LABEL_ENC"
+IMPORT{db}="ID_PART_ENTRY_NAME"
+IMPORT{db}="ID_PART_ENTRY_UUID"
+IMPORT{db}="ID_PART_ENTRY_SCHEME"
+IMPORT{db}="ID_PART_GPT_AUTO_ROOT"
LABEL="dm_link"
ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS="link_priority=-100"