eudev creates wrong names under /dev/disk/by-uuid/ for the disk's WWN. The names created by eudev should match the WWN as printed on the drive. Reproducible: Always Steps to Reproduce: 1. Just install eudev Actual Results: wrong linknames Expected Results: correct (sane) linknames A simple example: hdparm -I: Logical Unit WWN Device Identifier: 50014ee1013ca11a NAA : 5 IEEE OUI : 0014ee Unique ID : 1013ca11a 50014ee1013ca11a<- that is what the WWN printed on the disk read (ignoring whitespace) smartctl -a: LU WWN Device Id: 5 0014ee 1013ca11a -- different spacing, same identifier-string. eudev: Link name created wwn-0x11608592348033929217x in particular: /lib/udev/ata_id -x spits out: ID_WWN=0x11608592348033929217x That at least explains why the name is created, but not why ata_id produces a wrong WWN string. BTW: udev had a similiar issue a while back, see: Bug #546946 After some version changes and a udevadm trigger the links were corrected.
Reference: https://cgit.freedesktop.org/systemd/systemd/commit/src/udev/ata_id/ata_id.c?id=ec62e858734a66130f68d036c55c2050bde1e52e
(In reply to Sven E. from comment #1) > Reference: > https://cgit.freedesktop.org/systemd/systemd/commit/src/udev/ata_id/ata_id. > c?id=ec62e858734a66130f68d036c55c2050bde1e52e Thanks, did you test that this fixes the issue?
(In reply to Anthony Basile from comment #2) > (In reply to Sven E. from comment #1) > > Reference: > > https://cgit.freedesktop.org/systemd/systemd/commit/src/udev/ata_id/ata_id. > > c?id=ec62e858734a66130f68d036c55c2050bde1e52e > > Thanks, did you test that this fixes the issue? Not yet. Didn't have time to modify the ebuild to apply the patch. But since it was a change to ata_id at the time when the problem disappeared and it changes the printf formatting, I thought it must have been the right one. Additionally, the commit has: https://bugzilla.redhat.com/show_bug.cgi?id=1227503 as reference Which describes ecatly the bug I am seeing, it seems the (wrong) output is a decimal representation of the hex WWN. Darn, now that I looked at it again, there's more to it, it seems this change only fixes the decimal (instead of correct hex) output, but the words are still in the wrong order. If it is okay for you, I'll look into this later today or tomorrow.
Created attachment 470986 [details, diff] Fix for WWN links under /dev/disk/by-id Patch fixing up ata_id's WWN output on which udev build it's /dev/disk/by-id/ links. Includes extra rules to keep the old faulty wwn links in place to make sure people using them don't run into problems.
Patch is based on: https://github.com/systemd/systemd/pull/651/commits/01f61d331bb5038f0c877ac03c54333328b6ea28 and https://github.com/keszybz/systemd/commit/c505b456a6b23ffe1d11b597f4aa82f5bead961f
With proposed patch ata_id outputs: ID_WWN=0x50014ee1013ca11a <- the result we really wanted. ID_WWN_WITH_EXTENSION=0x50014ee1013ca11a ID_WWN_WITH_EXTENSION_REVERSED_DO_NOT_USE=0x11608592348033929217x <- old broken name based on decimal representation
(In reply to Sven E. from comment #6) > With proposed patch ata_id outputs: > ID_WWN=0x50014ee1013ca11a <- the result we really wanted. > ID_WWN_WITH_EXTENSION=0x50014ee1013ca11a > ID_WWN_WITH_EXTENSION_REVERSED_DO_NOT_USE=0x11608592348033929217x <- old > broken name based on decimal representation the patch is in with eudev-3.2.2-r1. i have yet to add it to the git repo. let me know if there are any issues. it passed a compile test.
(In reply to Sven E. from comment #4) > Created attachment 470986 [details, diff] [details, diff] > Fix for WWN links under /dev/disk/by-id > > Patch fixing up ata_id's WWN output on which udev build it's > /dev/disk/by-id/ links. Includes extra rules to keep the old faulty wwn > links in place to make sure people using them don't run into problems. I used upstream's patch to fix this in eudev-3.2.3. Can you test that out and see if the problem is fixed there.
(In reply to Anthony Basile from comment #8) > (In reply to Sven E. from comment #4) > > Created attachment 470986 [details, diff] [details, diff] [details, diff] > > Fix for WWN links under /dev/disk/by-id > > > > Patch fixing up ata_id's WWN output on which udev build it's > > /dev/disk/by-id/ links. Includes extra rules to keep the old faulty wwn > > links in place to make sure people using them don't run into problems. > > I used upstream's patch to fix this in eudev-3.2.3. Can you test that out > and see if the problem is fixed there. I'm a little confused, aren't you part of the eudev upstream team? Anyhow, the ouput of ata_id seems correct and the links in /dev/disk/by-id/ look good too.
(In reply to Sven E. from comment #9) > (In reply to Anthony Basile from comment #8) > > (In reply to Sven E. from comment #4) > > > Created attachment 470986 [details, diff] [details, diff] [details, diff] [details, diff] > > > Fix for WWN links under /dev/disk/by-id > > > > > > Patch fixing up ata_id's WWN output on which udev build it's > > > /dev/disk/by-id/ links. Includes extra rules to keep the old faulty wwn > > > links in place to make sure people using them don't run into problems. > > > > I used upstream's patch to fix this in eudev-3.2.3. Can you test that out > > and see if the problem is fixed there. > > I'm a little confused, aren't you part of the eudev upstream team? I meant systemd's commit. So when *I* say upstream I mean systemd ;) > > Anyhow, the ouput of ata_id seems correct and the links in /dev/disk/by-id/ > look good too. Good. Note that 3.2.3 is currently masked because I got a report of a boot failure. I'm not sure its eudev's fault yet, but to be safe, I can leave it in the tree masked for a while until I'm convinced its okay.
(In reply to Anthony Basile from comment #10) > I meant systemd's commit. So when *I* say upstream I mean systemd ;) > Ah, makes sense ;-). > > > > Anyhow, the ouput of ata_id seems correct and the links in /dev/disk/by-id/ > > look good too. > > Good. Note that 3.2.3 is currently masked because I got a report of a boot > failure. I'm not sure its eudev's fault yet, but to be safe, I can leave it > in the tree masked for a while until I'm convinced its okay. Fine with me, I had the opportunity to reboot the system and I can definately state that all links for WWNS of (S)ATA-drives are created correctly and as expected. Thanks for your effort.