systemd pull request submitted for removing obsolete udev by-id symlink rules
Bryan Gurney
bgurney at redhat.com
Wed May 22 14:28:36 PDT 2024
Hello,
I posted a pull request to the upstream systemd repository to remove
the udev rule in rules.d/60-persistent-storage.rules that would create
a symlink that would switch between the namespaces of a
multiple-namespace drive (as I demonstrated at LSF/MM/BPF 2024 last
week).
The URL to the pull request is here:
https://github.com/systemd/systemd/pull/32981
Ultimately, the commit in the pull request removes two rules, in six lines:
(Apologies ahead of time if my email client mangles the diff, but it
should be intact in the pull request to systemd:)
diff --git a/rules.d/60-persistent-storage.rules.in
b/rules.d/60-persistent-storage.rules.in
index 390c6e0034..b9933e5753 100644
--- a/rules.d/60-persistent-storage.rules.in
+++ b/rules.d/60-persistent-storage.rules.in
@@ -43,12 +43,6 @@ ATTRS{nsid}=="?*", ENV{ID_NSID}="$attr{nsid}"
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}"
-# 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_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}"
After removing those lines in my test system, I no longer see the
symlink with the "nvme-MODEL_SERIAL" name repoint to the different
multiple namespaces on the test drive. (The "nvme-MODEL_SERIAL_1",
"..._2" symlinks still exist, and are pointing to the correct
namespaces.)
Please let me know if this looks good, or if there's other testing or
changes I need to perform.
Thanks,
Bryan Gurney
Senior Software Engineer
Red Hat
More information about the Linux-nvme
mailing list