<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont; background-color: rgb(255, 255, 255)">
Hey all,</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont; background-color: rgb(255, 255, 255)">
We've been running into the issue where lblk -O outputs the wwn instead of the serial for scsi devices. After some debugging I've come to the conclusing that /lib/udev/scsi_id is the underlying cause. It outputs the wwn of a disk in the ID_SERIAL_SHORT field,
but does also export the actual serial in a separate field (ID_SCSI_SERIAL).</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont; background-color: rgb(255, 255, 255)">
sample output during udevadm test:</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont; background-color: rgb(255, 255, 255)">
<span style="margin: 0px">IMPORT 'scsi_id --export --whitelisted -d /dev/sdas' /lib/udev/rules.d/60-persistent-storage.rules:50<br>
</span>
<div style="margin: 0px">starting 'scsi_id --export --whitelisted -d /dev/sdas'<br>
</div>
<div style="margin: 0px">'scsi_id --export --whitelisted -d /dev/sdas'(out) 'ID_SCSI=1'<br>
</div>
<div style="margin: 0px">'scsi_id --export --whitelisted -d /dev/sdas'(out) 'ID_VENDOR=HGST'<br>
</div>
<div style="margin: 0px">'scsi_id --export --whitelisted -d /dev/sdas'(out) 'ID_VENDOR_ENC=HGST\x20\x20\x20\x20'<br>
</div>
<div style="margin: 0px">'scsi_id --export --whitelisted -d /dev/sdas'(out) 'ID_MODEL=HUS726060ALS640'<br>
</div>
<div style="margin: 0px">'scsi_id --export --whitelisted -d /dev/sdas'(out) 'ID_MODEL_ENC=HUS726060ALS640\x20'<br>
</div>
<div style="margin: 0px">'scsi_id --export --whitelisted -d /dev/sdas'(out) 'ID_REVISION=A280'<br>
</div>
<div style="margin: 0px">'scsi_id --export --whitelisted -d /dev/sdas'(out) 'ID_TYPE=disk'<br>
</div>
<div style="margin: 0px">'scsi_id --export --whitelisted -d /dev/sdas'(out) 'ID_SERIAL=35000cca232ab84ac'<br>
</div>
<div style="margin: 0px">'scsi_id --export --whitelisted -d /dev/sdas'(out) 'ID_SERIAL_SHORT=5000cca232ab84ac'<br>
</div>
<div style="margin: 0px">'scsi_id --export --whitelisted -d /dev/sdas'(out) 'ID_WWN=0x5000cca232ab84ac'<br>
</div>
<div style="margin: 0px">'scsi_id --export --whitelisted -d /dev/sdas'(out) 'ID_WWN_WITH_EXTENSION=0x5000cca232ab84ac'<br>
</div>
<span style="margin: 0px">'scsi_id --export --whitelisted -d /dev/sdas'(out) 'ID_SCSI_SERIAL= 1EK1A65J'</span><br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont; background-color: rgb(255, 255, 255)">
<span style="margin: 0px"><br>
</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont; background-color: rgb(255, 255, 255)">
<span style="margin: 0px">ata devices to not have this issue because they use ata_id:</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont; background-color: rgb(255, 255, 255)">
<span style="margin: 0px">IMPORT 'ata_id --export /dev/sdad' /lib/udev/rules.d/60-persistent-storage.rules:38<br>
</span>
<div style="margin: 0px">starting 'ata_id --export /dev/sdad'<br>
</div>
<div style="margin: 0px">'ata_id --export /dev/sdad'(out) 'ID_ATA=1'<br>
</div>
<div style="margin: 0px">'ata_id --export /dev/sdad'(out) 'ID_TYPE=disk'<br>
</div>
<div style="margin: 0px">'ata_id --export /dev/sdad'(out) 'ID_BUS=ata'<br>
</div>
<div style="margin: 0px">'ata_id --export /dev/sdad'(out) 'ID_MODEL=HGST_HDN726060ALE614'<br>
</div>
<div style="margin: 0px">'ata_id --export /dev/sdad'(out) 'ID_MODEL_ENC=HGST\x20HDN726060ALE614\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'<br>
</div>
<div style="margin: 0px">'ata_id --export /dev/sdad'(out) 'ID_REVISION=APGNW7JH'<br>
</div>
<div style="margin: 0px">'ata_id --export /dev/sdad'(out) 'ID_SERIAL=HGST_HDN726060ALE614_NAHTWX0X'<br>
</div>
<div style="margin: 0px">'ata_id --export /dev/sdad'(out) 'ID_SERIAL_SHORT=NAHTWX0X'<br>
</div>
<div style="margin: 0px"><snip></div>
<div style="margin: 0px">'ata_id --export /dev/sdad'(out) 'ID_WWN=0x5000cca242d96928'<br>
</div>
<div style="margin: 0px">'ata_id --export /dev/sdad'(out) 'ID_WWN_WITH_EXTENSION=0x5000cca242d96928'<br>
</div>
<span style="margin: 0px"></span><br>
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont; background-color: rgb(255, 255, 255)">
<span style="margin: 0px"><br>
</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont; background-color: rgb(255, 255, 255)">
<span style="margin: 0px">I am unsure if the fix should be in udev or lsblk, but I wanted to bring it up for discussion because the serial not being displayed properly.</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont; background-color: rgb(255, 255, 255)">
<span style="margin: 0px"><br>
</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont; background-color: rgb(255, 255, 255)">
<span style="margin: 0px">Kind regards,</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont; background-color: rgb(255, 255, 255)">
<span style="margin: 0px">Sven Wiltink</span></div>
<br>
</div>
</body>
</html>