File bug-1028485_udev-also-create-dev-disk-by-part-label-uuid-and-gpt.patch of Package lvm2.7683
From b79b02449632bdbb18252c9aa290282ba3aee886 Mon Sep 17 00:00:00 2001
From: Peter Rajnoha <prajnoha@redhat.com>
Date: Mon, 10 Jul 2017 12:35:53 +0200
Subject: [PATCH] udev: also create /dev/disk/by-part{label,uuid} and
gpt-auto-root symlinks
Git-commit: c48149cf80c6582c2369bc7f8a33d794021d9dae
Patch-mainline: v2_02_173
References: bsc#1028485
The blkid we call in 13-dm-disk.rules also returns identifiers for
partitions based on which the /dev/disk/by-part{uuid,label} and
gpt-auto-root symlinks should be created in the same manner as we
already create symlinks for filesystem labels and uuids.
This is because we handle blkid calls and symlink creation under
/dev/disk ourselves in our 13-dm-disk.rules for device-mapper devices
for us to have more control over this process.
See also https://lists.freedesktop.org/archives/systemd-devel/2017-July/039220.html
and original report http://tracker.ceph.com/issues/19489 for
the exact case where these symlinks were missing.
---
WHATS_NEW_DM | 10 +++++++---
udev/13-dm-disk.rules.in | 3 +++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 0bd9c80..d0a3d34 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,6 +1,10 @@
-News within backported patches
-==============================
- Fix dm-event systemd service to make sure it is executed before mounting.
+Version 1.02.142 -
+=================================
+ Create /dev/disk/by-part{uuid,label} and gpt-auto-root symlinks with udev.
+
+Version 1.02.110 - 30th October 2015
+====================================
+Fix dm-event systemd service to make sure it is executed before mounting.
Version 1.02.97 - 15th May 2015
===============================
diff --git a/udev/13-dm-disk.rules.in b/udev/13-dm-disk.rules.in
index 4b64dd6..5355810 100644
--- a/udev/13-dm-disk.rules.in
+++ b/udev/13-dm-disk.rules.in
@@ -24,6 +24,9 @@ ENV{DM_NOSCAN}=="1", GOTO="dm_watch"
ENV{DM_UDEV_LOW_PRIORITY_FLAG}=="1", OPTIONS="link_priority=-100"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
+ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-partuuid/$env{ID_PART_ENTRY_UUID}"
+ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="?*", SYMLINK+="disk/by-partlabel/$env{ID_PART_ENTRY_NAME}"
+ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_GPT_AUTO_ROOT}=="1", SYMLINK+="gpt-auto-root"
# Add inotify watch to track changes on this device.
# Using the watch rule is not optimal - it generates a lot of spurious
--
2.10.2