verified with kernel 3.13.0-106-generic, the model, serial, and
firmware_rev files in sysfs are not present, and with kernel
3.13.0-107-generic (from -proposed) the model, serial, and firmware_rev
files are present, and they contain the expected strings.
ddstreet@test:/sys/block$ uname -a
Linux test 3.13.0-106-generic #153-Ubuntu SMP Tue Dec 6 15:44:32 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux
ddstreet@test:/sys/block$ ls -d nvme?n?
nvme0n1 nvme0n2 nvme0n3 nvme0n4
ddstreet@test:/sys/block$ ls -l nvme?n?/device/{model,serial,firmware_rev}
ls: cannot access nvme?n?/device/model: No such file or directory
ls: cannot access nvme?n?/device/serial: No such file or directory
ls: cannot access nvme?n?/device/firmware_rev: No such file or directory
ddstreet@test:/sys/block$ uname -a
Linux test 3.13.0-107-generic #154-Ubuntu SMP Tue Dec 20 09:57:27 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux
ddstreet@test:/sys/block$ ls -d nvme?n?
nvme0n1 nvme0n2 nvme0n3 nvme0n4
ddstreet@test:/sys/block$ ls -l nvme?n?/device/{model,serial,firmware_rev}
-r--r--r-- 1 root root 4096 Dec 22 16:50 nvme0n1/device/firmware_rev
-r--r--r-- 1 root root 4096 Dec 22 16:47 nvme0n1/device/model
-r--r--r-- 1 root root 4096 Dec 22 16:47 nvme0n1/device/serial
-r--r--r-- 1 root root 4096 Dec 22 16:50 nvme0n2/device/firmware_rev
-r--r--r-- 1 root root 4096 Dec 22 16:47 nvme0n2/device/model
-r--r--r-- 1 root root 4096 Dec 22 16:47 nvme0n2/device/serial
-r--r--r-- 1 root root 4096 Dec 22 16:50 nvme0n3/device/firmware_rev
-r--r--r-- 1 root root 4096 Dec 22 16:47 nvme0n3/device/model
-r--r--r-- 1 root root 4096 Dec 22 16:47 nvme0n3/device/serial
-r--r--r-- 1 root root 4096 Dec 22 16:50 nvme0n4/device/firmware_rev
-r--r--r-- 1 root root 4096 Dec 22 16:47 nvme0n4/device/model
-r--r--r-- 1 root root 4096 Dec 22 16:47 nvme0n4/device/serial
** Tags removed: verification-needed-trusty
** Tags added: verification-done-trusty
** Changed in: linux (Ubuntu Trusty)
Assignee: (unassigned) => Dan Streetman (ddstreet)
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1649635
Title:
export nvme drive model/serial strings via sysfs (trusty)
Status in linux package in Ubuntu:
Incomplete
Status in linux source package in Trusty:
Fix Committed
Bug description:
[Impact]
Without the model and serial strings for each nvme drive exported via
sysfs, udev cannot create the /dev/disk/by-id/ symlinks, since it
can't access the model/serial info. Without these symlinks, it's
difficult to uniquely identify a specific nvme drive.
[Test Case]
The udev rules to create the nvme symlinks need updating, per bug
1642903 and bug 1647485. With the udev package updated with
fixes/workarounds from those bugs, boot a kernel without this patch on
a system with nvme drive(s), and check the /dev/disk/by-id/ directory;
no symlinks to the nvme drives should be present. With this kernel
patch, check the directory, and symlinks to all nvme drives and their
partitions should be present, in the form of /dev/disk/by-id/nvme-
MODEL_SERIAL for the drive and /dev/disk/by-id/nvme-MODEL_SERIAL-partN
for each partition.
[Regression Potential]
Creating/managing sysfs files can result in problems ranging from
memory leaks to a kernel oops, if not managed correctly.
[Other Info]
This functionality is present in upstream kernels, but the change diff
between this kernel version and where this functionality appears
upstream is massive - the driver changes from manually managing its
userspace access over to using the standard device infrastructure, as
well as numerous other bugfixes and feature changes. So instead of
attempting to backport all those changes, this patch retains only a
small part of the upstream patch and adds direct sysfs file creation
using device_create_file(), which the upstream code never did. This
is by far the simplest way to update this very old kernel with the
functionality.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1649635/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp