From 03ec7e8a41d54efefb9c4beafa428498873a52f2 Mon Sep 17 00:00:00 2001 From: Angie Wang Date: Wed, 19 Aug 2020 18:18:15 -0400 Subject: [PATCH] Remove deprecated virtio by-path rules There is a set of duplicated by-path symlinks created if system boots with virtio emulation. ie... virtio-pci-0000:00:06.0 -> ../../vda virtio-pci-0000:00:06.0-part1 -> ../../vda1 virtio-pci-0000:00:06.0-part5 -> ../../vda5 virtio-pci-0000:00:06.0-part4 -> ../../vda4 virtio-pci-0000:00:06.0-part3 -> ../../vda3 virtio-pci-0000:00:06.0-part2 -> ../../vda2 These links are useless as there is another set of by-path symlinks set by the following common rules: ENV{DEVTYPE}=="disk", DEVPATH!="*/virtual/*", IMPORT{builtin}="path_id" ENV{DEVTYPE}=="disk", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}" ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n" Tested on hardware labs, QEMU/KVM and VirtualBox Story: 2007858 Task: 40724 Change-Id: I871ce1190022cb5b7914615a66e78699d5afe089 Signed-off-by: Angie Wang --- systemd-config/files/60-persistent-storage.rules | 4 ---- 1 file changed, 4 deletions(-) diff --git a/systemd-config/files/60-persistent-storage.rules b/systemd-config/files/60-persistent-storage.rules index f690034..60134c6 100644 --- a/systemd-config/files/60-persistent-storage.rules +++ b/systemd-config/files/60-persistent-storage.rules @@ -70,10 +70,6 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA # skip unpartitioned removable media devices from drivers which do not send "change" events ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end" -# legacy virtio-pci by-path links (deprecated) -KERNEL=="vd*[!0-9]", ENV{ID_PATH}=="pci-*", SYMLINK+="disk/by-path/virtio-$env{ID_PATH}" -KERNEL=="vd*[0-9]", ENV{ID_PATH}=="pci-*", SYMLINK+="disk/by-path/virtio-$env{ID_PATH}-part%n" - # probe filesystem metadata of optical drives which have a media inserted KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", \ IMPORT{builtin}="blkid --offset=$env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}"