lsidrivemap icon indicating copy to clipboard operation
lsidrivemap copied to clipboard

WWN from MegaCli not always match with /dev/disk/by-id

Open tclh123 opened this issue 11 years ago • 6 comments

tclh123 avatar Nov 05 '14 03:11 tclh123

Can't reproduce this on my system and don't have access to any other systems. Feel free to add additional information an reopen this but on my system it's fine.

louwrentius avatar Nov 05 '14 20:11 louwrentius

Here is the output on my machine,

$ sudo megacli -pdlist -a0 | grep -E 'WWN|SAS A|Inquiry Data'
WWN: 5000C500588C2354
SAS Address(0): 0x5000c500588c2355
SAS Address(1): 0x0
Inquiry Data: SEAGATE ST3000NM0023    GS0DZ1Y1QY19
WWN: 5000039528E913D5
SAS Address(0): 0x5000039528e913d6
SAS Address(1): 0x0
Inquiry Data: TOSHIBA MG03SCA300      DG02Y3R0A1EUFVL9
WWN: 5000039528E91AE9
SAS Address(0): 0x5000039528e91aea
SAS Address(1): 0x0
Inquiry Data: TOSHIBA MG03SCA300      DG02Y3R0A1ITFVL9
WWN: 5000C50057AB6824
SAS Address(0): 0x5000c50057ab6825
SAS Address(1): 0x0
Inquiry Data: SEAGATE ST3000NM0023    GS0AZ1Y1115J
WWN: 5000039528E96471
SAS Address(0): 0x5000039528e96472
SAS Address(1): 0x0
Inquiry Data: TOSHIBA MG03SCA300      DG02Y3R0A2EIFVL9
WWN: 5000039528E913B1
SAS Address(0): 0x5000039528e913b2
SAS Address(1): 0x0
Inquiry Data: TOSHIBA MG03SCA300      DG02Y3R0A1EPFVL9
WWN: 5000039528E91EC9
SAS Address(0): 0x5000039528e91eca
SAS Address(1): 0x0
Inquiry Data: TOSHIBA MG03SCA300      DG02Y3R0A1NNFVL9
WWN: 5000039528E91B29
SAS Address(0): 0x5000039528e91b2a
SAS Address(1): 0x0
Inquiry Data: TOSHIBA MG03SCA300      DG02Y3R0A1J0FVL9
WWN: 5000039528E91EA1
SAS Address(0): 0x5000039528e91ea2
SAS Address(1): 0x0
Inquiry Data: TOSHIBA MG03SCA300      DG02Y3R0A1NCFVL9
WWN: 5000C50057DC251C
SAS Address(0): 0x5000c50057dc251d
SAS Address(1): 0x0
Inquiry Data: SEAGATE ST3000NM0023    GS0DZ1Y1DQLT
WWN: 5000039528E90EE1
SAS Address(0): 0x5000039528e90ee2
SAS Address(1): 0x0
Inquiry Data: TOSHIBA MG03SCA300      DG02Y3R0A1C5FVL9
WWN: 5000C5005910C97C
SAS Address(0): 0x5000c5005910c97d
SAS Address(1): 0x0
Inquiry Data: SEAGATE ST3000NM0023    GS0DZ1Y20LJ9
$ ls -l /dev/disk/by-id | grep -E 'wwn-[0-9a-z]* '
lrwxrwxrwx 1 root root  9 May 23 18:02 wwn-0x5000039528e90ee0 -> ../../sdk
lrwxrwxrwx 1 root root  9 May 23 18:02 wwn-0x5000039528e913b0 -> ../../sdf
lrwxrwxrwx 1 root root  9 May 23 18:02 wwn-0x5000039528e913d4 -> ../../sdb
lrwxrwxrwx 1 root root  9 May 23 18:02 wwn-0x5000039528e91ae8 -> ../../sdc
lrwxrwxrwx 1 root root  9 May 23 18:02 wwn-0x5000039528e91b28 -> ../../sdh
lrwxrwxrwx 1 root root  9 Jul 10 20:52 wwn-0x5000039528e91ea0 -> ../../sdi
lrwxrwxrwx 1 root root  9 May 23 18:02 wwn-0x5000039528e91ec8 -> ../../sdg
lrwxrwxrwx 1 root root  9 May 23 18:02 wwn-0x5000039528e96470 -> ../../sde
lrwxrwxrwx 1 root root  9 May 23 18:02 wwn-0x5000c50057ab6827 -> ../../sdd
lrwxrwxrwx 1 root root  9 Jul 10 20:53 wwn-0x5000c50057dc251f -> ../../sdj
lrwxrwxrwx 1 root root  9 Aug 21 18:38 wwn-0x5000c500588c2357 -> ../../sda
lrwxrwxrwx 1 root root  9 Oct 28 13:53 wwn-0x5000c5005910c97f -> ../../sdl

Do you have any idea about this difference?

tclh123 avatar Nov 06 '14 02:11 tclh123

Frankly I'm amazed, I don't know. A WWN should be unique. I would think that either this is a kernel module driver bug, or something is wrong with the utility. Maybe you can do this:

hdparm -I /dev/sda | grep -i wwn Logical Unit WWN Device Identifier: 5000cca23dd45619

And see what kind of WWNs you get then. I'm probably not able to do anything about this in the script.

louwrentius avatar Nov 24 '14 19:11 louwrentius

@louwrentius Have you been able to retrieve temperature data through other non-MegaCli utilities?

naisanza avatar Mar 31 '16 22:03 naisanza

You can also use smartctl data. It is a bit slower.

On 1 apr. 2016, at 00:34, Eric [email protected] wrote:

@louwrentius Have you been able to retrieve temperature data through other non-MegaCli utilities?

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub

louwrentius avatar Apr 01 '16 06:04 louwrentius

@louwrentius Few things that i would like to point out for this project.

  • First and foremost is that a license should also be included in your project which is quite useful about how your code should be used.
  • You should follow some common standard for your project like you can put all your source codes in a separate directory named src
  • I saw that code does not follow a code style like PEP8 that should also be fixed so that it could be more readable. :smile_cat: :smile_cat:

arpit1997 avatar Oct 29 '16 17:10 arpit1997