RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2185048 - Document NVMe udev naming change
Summary: Document NVMe udev naming change
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: Documentation
Version: 9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Michal Stubna
QA Contact: RHEL DPM
Michal Stubna
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-04-06 15:46 UTC by Jenifer Abrams
Modified: 2023-05-05 16:36 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
.udev rule change for NVMe devices There is a udev rule change for NVMe devices that adds `OPTIONS="string_escape=replace"` parameter. This leads to a disk by-id naming change for some vendors, if the serial number of your device has leading whitespace.
Clone Of:
Environment:
Last Closed: 2023-05-05 16:35:54 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-154195 0 None None None 2023-04-06 15:48:58 UTC

Description Jenifer Abrams 2023-04-06 15:46:40 UTC
Document URL: 
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html-single/managing_file_systems/index#device-identifiers_assembly_overview-of-persistent-naming-attributes

(Or any other docs that mention udev naming for NVMe devices)

Section Number and Name: 

13.3. Device names managed by the udev mechanism in /dev/disk/

Describe the issue: 

Starting in RHEL 9 there is a udev rule change for NVMe devices that adds: OPTIONS="string_escape=replace"

RHEL 9:

$ grep -nr 'SYMLINK.*nvme-' /usr/lib/udev/rules.d/
/usr/lib/udev/rules.d/60-persistent-storage.rules:33:KERNEL=="nvme*[0-9]n*[0-9]", ATTR{wwid}=="?*", SYMLINK+="disk/by-id/nvme-$attr{wwid}"
/usr/lib/udev/rules.d/60-persistent-storage.rules:34:KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ATTRS{wwid}=="?*", SYMLINK+="disk/by-id/nvme-$attr{wwid}-part%n"
/usr/lib/udev/rules.d/60-persistent-storage.rules:41:  OPTIONS="string_escape=replace", ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}"
/usr/lib/udev/rules.d/60-persistent-storage.rules:47:  OPTIONS="string_escape=replace", ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}-part%n"

RHEL 8:

$ grep -nr 'SYMLINK.*nvme-' /usr/lib/udev/rules.d/
/usr/lib/udev/rules.d/60-persistent-storage.rules:19:KERNEL=="nvme*[0-9]n*[0-9]", ATTR{wwid}=="?*", SYMLINK+="disk/by-id/nvme-$attr{wwid}"
/usr/lib/udev/rules.d/60-persistent-storage.rules:20:KERNEL=="nvme*[0-9]n*[0-9]p*[0-9]", ENV{DEVTYPE}=="partition", ATTRS{wwid}=="?*", SYMLINK+="disk/by-id/nvme-$attr{wwid}-part%n"
/usr/lib/udev/rules.d/60-persistent-storage.rules:26:  ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}"
/usr/lib/udev/rules.d/60-persistent-storage.rules:31:  ENV{ID_SERIAL}="$env{ID_MODEL}_$env{ID_SERIAL_SHORT}", SYMLINK+="disk/by-id/nvme-$env{ID_SERIAL}-part%n"

This change is due to: https://github.com/systemd/systemd/commit/5118e8e71dda211d20e34ec8d3012186ba27d3d3

and discussion ongoing in: https://github.com/systemd/systemd/issues/27155 

When running RHEL 9.x, this leads to a disk by-id naming change for some vendors, if the device serial num has leading whitespace, for ex:

8.x:  /dev/disk/by-id/nvme-Vendor_model__Serial
9.x: /dev/disk/by-id/nvme-Vendor_model_______Serial

The existence of any leading whitespace can be seen in the device serial:
$ cat /sys/class/block/nvm*/device/serial

Suggestions for improvement: 

Document this by-id naming change from RHEL 8, for certain NVMe devices (depending on vendor serial number format).


Additional information: 
Related bug: https://issues.redhat.com/browse/OCPBUGS-11375


Note You need to log in before you can comment on or make changes to this bug.