mirror of
https://github.com/systemd/systemd.git
synced 2024-11-27 04:03:36 +08:00
Merge pull request #34482 from bgurney-rh/alt-nvme-multins-symlink-fix
Pin obsolete NVMe symlinks to namespace 1
This commit is contained in:
commit
548360817e
@ -45,9 +45,9 @@ ENV{ID_WWN}=="?*", SYMLINK+="disk/by-id/nvme-$env{ID_WWN}$env{.PART_SUFFIX}"
|
||||
|
||||
# obsolete symlink with non-escaped characters, kept for backward compatibility
|
||||
ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", ENV{ID_MODEL}!="*/*", ENV{ID_SERIAL_SHORT}!="*/*", \
|
||||
ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}$env{.PART_SUFFIX}"
|
||||
ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", ENV{ID_NSID}=="1", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}$env{.PART_SUFFIX}"
|
||||
# obsolete symlink that might get overridden on adding a new nvme controller, kept for backward compatibility
|
||||
ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", OPTIONS="string_escape=replace", \
|
||||
ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", ENV{ID_NSID}=="1", OPTIONS="string_escape=replace", \
|
||||
ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}$env{.PART_SUFFIX}"
|
||||
ENV{ID_MODEL}=="?*", ENV{ID_SERIAL_SHORT}=="?*", ENV{ID_NSID}=="?*", OPTIONS="string_escape=replace", \
|
||||
ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}_$env{ID_NSID}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}$env{.PART_SUFFIX}"
|
||||
|
@ -219,6 +219,7 @@ testcase_nvme_basic() {
|
||||
for i in "${expected_symlinks[@]}"; do
|
||||
udevadm wait --settle --timeout=30 "$i"
|
||||
done
|
||||
test ! -e /dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_deadbeef
|
||||
|
||||
lsblk --noheadings | grep "^nvme"
|
||||
[[ "$(lsblk --noheadings | grep -c "^nvme")" -ge 20 ]]
|
||||
@ -227,7 +228,6 @@ testcase_nvme_basic() {
|
||||
testcase_nvme_subsystem() {
|
||||
local expected_symlinks=(
|
||||
# Controller(s)
|
||||
/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_deadbeef
|
||||
/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_deadbeef_16
|
||||
/dev/disk/by-id/nvme-QEMU_NVMe_Ctrl_deadbeef_17
|
||||
# Shared namespaces
|
||||
|
Loading…
Reference in New Issue
Block a user