Hello all,
I have a question about the WWN naming reported by /dev/disk/by-id, for example:
mercury:~ # ls -la /dev/disk/by-id/
total 0
drwxr-xr-x 2 root root 260 out 4 10:33 .
drwxr-xr-x 6 root root 120 out 4 10:31 …
lrwxrwxrwx 1 root root 9 out 4 10:31 ata-QEMU_DVD-ROM_QM00001 → …/…/sr0
lrwxrwxrwx 1 root root 9 out 4 10:31 scsi-0QEMU_QEMU_DVD-ROM_QM00001 → …/…/sr0
lrwxrwxrwx 1 root root 9 out 4 10:31 scsi-1ATA_QEMU_DVD-ROM_QM00001 → …/…/sr0
lrwxrwxrwx 1 root root 9 out 4 10:33 scsi-1LIO-ORGsbd:41b031be-0322-44c6-8314-eef8787f954f → …/…/sda
lrwxrwxrwx 1 root root 9 out 4 10:33 scsi-1LIO-ORGshared1:5ae9bb02-73e3-4af8-93d1-6893005657b1 → …/…/sdb
lrwxrwxrwx 1 root root 9 out 4 10:33 scsi-3600140541b031be032244c68314eef87 → …/…/sda
lrwxrwxrwx 1 root root 9 out 4 10:33 scsi-360014055ae9bb0273e34af893d168930 → …/…/sdb
lrwxrwxrwx 1 root root 9 out 4 10:33 scsi-SLIO-ORG_sbd_41b031be-0322-44c6-8314-eef8787f954f → …/…/sda
lrwxrwxrwx 1 root root 9 out 4 10:33 scsi-SLIO-ORG_shared1_5ae9bb02-73e3-4af8-93d1-6893005657b1 → …/…/sdb
lrwxrwxrwx 1 root root 9 out 4 10:33 wwn-0x600140541b031be032244c68314eef87 → …/…/sda
lrwxrwxrwx 1 root root 9 out 4 10:33 wwn-0x60014055ae9bb0273e34af893d168930 → …/…/sdb
the bold entries are the “correct” ones (the ones that mach the WWN as reported by targetcli - a redhat machine)
the result of this commands are the ‘culprit’:
mercury:~ # /lib/udev/scsi_id --page=0x83 --whitelisted --device=/dev/sda
3600140541b031be032244c68314eef87
mercury:~ # /lib/udev/scsi_id --page=0x80 --whitelisted --device=/dev/sda
SLIO-ORG sbd 41b031be-0322-44c6-8314-eef8787f954f
shouldn’t the numbers be the same? because forming a ’ wwn-0x60014055ae9bb0273e34af893d168930’ can lead to a wrong conclusion, in this case the WWN is
/backstores/block/sbd> ls â··············································
o- sbd … [/dev/cluster_lab/sbd (8.0MiB) write-thru activated]â·············································· o- alua … [ALUA Groups: 1]â··············································
o- default_tg_pt_gp … [ALUA state: Active/optimized]â··············································/backstores/block/sbd> info â··············································
dev: /dev/cluster_lab/sbd â··············································name: sbd â··············································
plugin: block â··············································readonly: False â··············································
write_back: False â··············································
wwn: 41b031be-0322-44c6-8314-eef8787f954f â··············································
/backstores/block/sbd>
as reported in the iscsi target machine.
Can someone explain this? Also, just for 2 LUN’s I get 8 entries:
lrwxrwxrwx 1 root root 9 out 4 10:33 scsi-1LIO-ORGsbd:41b031be-0322-44c6-8314-eef8787f954f → …/…/sda
lrwxrwxrwx 1 root root 9 out 4 10:33 scsi-1LIO-ORGshared1:5ae9bb02-73e3-4af8-93d1-6893005657b1 → …/…/sdb
lrwxrwxrwx 1 root root 9 out 4 10:33 scsi-3600140541b031be032244c68314eef87 → …/…/sda
lrwxrwxrwx 1 root root 9 out 4 10:33 scsi-360014055ae9bb0273e34af893d168930 → …/…/sdb
lrwxrwxrwx 1 root root 9 out 4 10:33 scsi-SLIO-ORG_sbd_41b031be-0322-44c6-8314-eef8787f954f → …/…/sda
lrwxrwxrwx 1 root root 9 out 4 10:33 scsi-SLIO-ORG_shared1_5ae9bb02-73e3-4af8-93d1-6893005657b1 → …/…/sdb
lrwxrwxrwx 1 root root 9 out 4 10:33 wwn-0x600140541b031be032244c68314eef87 → …/…/sda
lrwxrwxrwx 1 root root 9 out 4 10:33 wwn-0x60014055ae9bb0273e34af893d168930 → …/…/sdb
shouldn’t it be 4 at best? the man page for scsi_id states that it shoud try to fetch only the type 0x80 OR 0x83, not both.
Help?
Thank you.