introduce disk/by-id (model_serial) symlinks for NVMe drives

Bug #1642903 reported by Dan Streetman on 2016-11-18
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Wishlist
Unassigned
Trusty
Wishlist
Unassigned
Xenial
Wishlist
Unassigned
Yakkety
Wishlist
Unassigned
Zesty
Wishlist
Unassigned

Bug Description

[Impact]

NVMe drives can't be identified/accessed via /dev/disk/by-id/nvme-SERIAL symlinks.

[Test Case]

On a system with an NVMe drive, check the /dev/disk/by-id/ directory; with the patch, it will contain link(s) named by the drive serial number. This should be the *only* change in `ls -l /dev/disk/*/*`.

On a system without NVMe, verify that `ls -l /dev/disk/*/*` is identical (aside from dates, of course) before and after the upgrade to the -proposed version.

[Regression Potential]

Errors in udev rules can lead to an unbootable or otherwise completely broken system if they unintentionally break or clobber existing /dev/disks/ symlinks.

[Other Info]

This patch is already included upstream and in zesty systemd.

Related bugs:
 * bug 1647485: NVMe symlinks broken by devices with spaces in model or serial strings
 * bug 1651602: NVMe driver regression for non-smp/1-cpu systems
 * bug 1649635: export nvme drive model/serial strings via sysfs (trusty)

Dan Streetman (ddstreet) wrote :

This is fixed with commit a5110c90303cf455db5062faef34d5724d12e2e9 from upstream systemd, which is already included in zesty.

Dan Streetman (ddstreet) wrote :
Dan Streetman (ddstreet) wrote :
Dan Streetman (ddstreet) wrote :
tags: added: sts sts-sponsor sts-sru

The attachment "lp1642903-yakkety.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Changed in systemd (Ubuntu):
importance: Undecided → Wishlist
Martin Pitt (pitti) wrote :

> [Regression Potential]
> None.

This is a vast underestimate -- touching udev rules can lead to an unbootable system in the worst case :-) I'll adjust the description.

Changed in systemd (Ubuntu Zesty):
status: New → Fix Released
description: updated
Martin Pitt (pitti) wrote :

Applied to yakkety packaging branch, with some reformatting (gbp pq and using gbp dch): :https://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?h=ubuntu-yakkety&id=9b4f59ff766d36

Changed in systemd (Ubuntu Yakkety):
importance: Undecided → Wishlist
status: New → In Progress
Martin Pitt (pitti) wrote :

Applied to xenial packaging branch, with similar small noise: https://anonscm.debian.org/cgit/pkg-systemd/systemd.git/commit/?h=ubuntu-xenial&id=71a4b81ffc

Changed in systemd (Ubuntu Xenial):
status: New → In Progress
Martin Pitt (pitti) wrote :

Comitted to trusty packaging git: https://git.launchpad.net/~ubuntu-core-dev/+git/systemd-trusty/commit/?id=482827

Note that there is a current SRU in trusty which blocks this. But this being "wishlist" it's not that urgent anyway, and my gut feeling is that it's okay to wait a bit until we get some more fixes queued up?

Changed in systemd (Ubuntu Trusty):
status: New → In Progress
Sven Mueller (smu-u) wrote :

This is likely the root cause for https://bugs.launchpad.net/bugs/1642710 (no automatic installation possible on NVMe-only systems), which is not just wishlist, I think.

Hello Dan, or anyone else affected,

Accepted systemd into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/231-9ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in systemd (Ubuntu Yakkety):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in systemd (Ubuntu Xenial):
status: In Progress → Fix Committed
Timo Aaltonen (tjaalton) wrote :

Hello Dan, or anyone else affected,

Accepted systemd into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/229-4ubuntu13 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Dan Streetman (ddstreet) wrote :

I verified that the -proposed package does create the NVMe disk/by-id/ serial number symlink for each drive. However, there's unfortunately a bug in the way it does it, which still exists upstream. I opened this upstream udev bug for the problem:
https://github.com/systemd/systemd/issues/4833

The issue is any NVMe drives that include whitespace will break the way udev creates symlinks; e.g. if the model string is "XYZ Corp NVMe drive" then instead of creating:
/dev/disk/by-id/nvme-XYZ Corp NVMe drive_SERIAL -> ../../nvme0n1
it creates:
/dev/disk/by-id/nvme-XYZ -> ../../nvme0n1
/dev/Corp -> nvme0n1
/dev/NVMe -> nvme0n1
/dev/drive_SERIAL -> nvme0n1

So for NVMe drives that *do not* contain spaces in their model and serial strings, the -proposed package works correctly, but for NVMe drives that *do* contain spaces (or other chars that shouldn't be in a symlink, e.g. /$%?,), the -proposed package will create incorrect symlinks.

Dan Streetman (ddstreet) wrote :

I opened bug 1647485 to track the spaces-in-symlink-value problem.

Separate from that bug, I have verified the -proposed udev package creates the /dev/disk/by-id/ model/serial string symlinks.

tags: added: verification-done
removed: verification-needed
Dan Streetman (ddstreet) wrote :

> Note that there is a current SRU in trusty which blocks this.

is that current SRU for bug 1562344?

> But this being "wishlist" it's not
> that urgent anyway,

This isn't really wishlist, this is needed to persistently identify NVMe drives on systems with multiple drives.

> and my gut feeling is that it's okay to wait a bit until we get some more
> fixes queued up?

I'd like to see this patch get started in trusty-proposed sooner than later, is it possible to go ahead with this for trusty? (and can we also add the workaround patch for bug 1647485?)

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 229-4ubuntu13

---------------
systemd (229-4ubuntu13) xenial; urgency=medium

  [ Martin Pitt ]
  * Backport graphical-session{,-pre}.target user units, for future usage from
    snaps. (LP: #1640293)
  * debian/rules: Clean up *.busname units. They are useless in 16.04 as they
    will always be "condition failed" as kdbus has never existed. But they add
    ordering constraints which make it impossible to start
    systemd-networkd.service during early boot, which is an upcoming
    requirement for cloud-init. (Part of LP: #1636912)
  * Drop systemd-networkd's "After=dbus.service" ordering so that it can start
    during early boot (for cloud-init.service). It will auto-connect to D-Bus
    once it becomes available later, and transient (from DHCP) hostname and
    timezone setting do not work in 16.04 anyway. (LP: #1636912)

  [ Dan Streetman ]
  * rules: introduce disk/by-id (wwid and model_serial) symlinks
    for NVMe drives (LP: #1642903)

 -- Martin Pitt <email address hidden> Thu, 24 Nov 2016 12:41:23 +0100

Changed in systemd (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for systemd has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 231-9ubuntu2

---------------
systemd (231-9ubuntu2) yakkety; urgency=medium

  [ Dan Streetman ]
  * rules: introduce disk/by-id (model_serial) symlinks for NVMe drives
    (LP: #1642903)

  [ Martin Pitt ]
  * Drop systemd-networkd's "After=dbus.service" ordering, so that it can
    start during early boot (for cloud-init.service). It will auto-connect to
    D-Bus once it becomes available later, and transient (from DHCP) hostname
    and timezone setting do not work in 16.10 anyway. (LP: #1636912)

 -- Martin Pitt <email address hidden> Thu, 24 Nov 2016 13:21:05 +0100

Changed in systemd (Ubuntu Yakkety):
status: Fix Committed → Fix Released

Hello Dan, or anyone else affected,

Accepted systemd into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/systemd/204-5ubuntu20.21 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in systemd (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: removed: verification-done
tags: added: verification-needed
Changed in systemd (Ubuntu Xenial):
importance: Undecided → Wishlist
Changed in systemd (Ubuntu Trusty):
importance: Undecided → Wishlist
Scott Moser (smoser) on 2017-01-09
description: updated
Dan Streetman (ddstreet) on 2017-01-09
description: updated
Dan Streetman (ddstreet) on 2017-01-12
tags: added: verification-done
removed: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package systemd - 204-5ubuntu20.21

---------------
systemd (204-5ubuntu20.21) trusty; urgency=medium

  [ Dan Streetman ]
  * rules: introduce disk/by-id (wwid and model_serial) symlinks
    for NVMe drives (LP: #1642903)

  [ Yu Ning ]
  * keymap: Some HP refactoring, add Probook 440 G3 keys (LP: #1562344)

 -- Steve Langasek <email address hidden> Thu, 15 Dec 2016 19:46:52 -0800

Changed in systemd (Ubuntu Trusty):
status: Fix Committed → Fix Released
Louis Bouchard (louis) on 2017-03-22
tags: added: sts-sru-done
removed: sts-sru
Dan Streetman (ddstreet) on 2019-03-20
tags: removed: sts-sponsor
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.