sas-9211-8i Download
LSIUtil 1.57
lsiutil-1.57.tar.gz
LSIUtil 1.62
http://www.dzhang.com/blog/2013/03/22/where-to-get-download-lsiutil
LSIUtil_1.62.zip
LSIUtil 1.70
https://kb.nc.tc/lsi_sas_controllers
lsiutil_1.70_release_binaries.zip
LSIUtil 1.71
https://kb.nc.tc/lsi_sas_controllers
lsiutil-1.71.zip
Include Source Code: \LSIUtil Kit 1.71\Source\lsiutil.tar.gz
LSIUtil 1.72
lsiutil-1.72.tar.gz
lsiutil_1.72.bb
Installing LSI megaCLI in Ubuntu 12.04
http://www.linuxcat.org/showthread.php?tid=68
megactl
This project is a small collection of programs for examining configuration a
nd status of LSI megaraid adapters, especially Dell PERC RAID adapters,
and attached storage devices.
https://sourceforge.net/projects/megactl/?source=typ_redirect
//=================================================
LSIUtil 的第16個功能是有Bug的
16. Display attached devices
其 PhyNum
但 LSIUtil 卻是相反的
也就是說其對應要是相反的
第一條 SAS Cable 是 0到3
LSIUtil PhyNum LSI PHY Cable Port
3 => 0
2 => 1
1 => 2
0 => 3
第二條 SAS Cable 是 4到7
LSIUtil PhyNum LSI PHY Cable Port
7 => 4
6 => 5
5 => 6
4 => 7
if( LSIUtil PhyNum >=0 && LSIUtil PhyNum <= 3)
3-(LSIUtil PhyNum) = (LSI PHY Cable Port)
else if( LSIUtil PhyNum >= 4 && LSIUtil PhyNum <= 7)
7-(LSIUtil PhyNum) + 4 = (LSI PHY Cable Port)
else if( LSIUtil PhyNum >= 4 && LSIUtil PhyNum <= 7)
7-(LSIUtil PhyNum) + 4 = (LSI PHY Cable Port)
PHY P H T L
:=====================
: 0/ 0-[ 0 0 0]
: 1/ 0-[ 0 353 0]
: 2/ 0-[ 0 351 0]
: 3/ 0-[ 0 352 0]
: 4/ 0-[ 0 356 0]
: 5/ 0-[ 0 355 0]
: 6/ 0-[ 0 354 0]
: 7/ 0-[ 0 357 0]
:=====================
My Lsiutil
PhyNum PhyNum
[0:0:351:0] disk SEAGATE ST3500414SS 0006 /dev/sdb 2 1 [0:0:352:0] disk SEAGATE ST3500414SS 0006 /dev/sdc 3 0
[0:0:353:0] disk SEAGATE ST3500620SS 0001 /dev/sdd 1 2
[0:0:354:0] disk ATA ST3500413AS JC45 /dev/sde 6 5
[0:0:355:0] disk ATA ST1000VX000-1CU1 CV22 /dev/sdf 5 6
[0:0:356:0] disk ATA ST1000DM003-1CH1 CC44 /dev/sdg 4 7
[0:0:357:0] disk ATA ST1000DM003-9YN1 CC4D /dev/sdh 7 4
[1:0:0:0] disk ATA ST1000DM003-9YN1 CC4B /dev/sda
# lsscsi -t
[0:0:351:0] disk sas:0x5000c50041ea5265 /dev/sdb
[0:0:352:0] disk sas:0x5000c500418fac39 /dev/sdc
[0:0:353:0] disk sas:0x5000c5000d2161f1 /dev/sdd
[0:0:354:0] disk sas:0x4433221105000000 /dev/sde
[0:0:355:0] disk sas:0x4433221106000000 /dev/sdf
[0:0:356:0] disk sas:0x4433221107000000 /dev/sdg
[0:0:357:0] disk sas:0x4433221104000000 /dev/sdh
[1:0:0:0] disk sata: /dev/sda
//=================================================PhyNum PhyNum
[0:0:351:0] disk SEAGATE ST3500414SS 0006 /dev/sdb 2 1 [0:0:352:0] disk SEAGATE ST3500414SS 0006 /dev/sdc 3 0
[0:0:353:0] disk SEAGATE ST3500620SS 0001 /dev/sdd 1 2
[0:0:354:0] disk ATA ST3500413AS JC45 /dev/sde 6 5
[0:0:355:0] disk ATA ST1000VX000-1CU1 CV22 /dev/sdf 5 6
[0:0:356:0] disk ATA ST1000DM003-1CH1 CC44 /dev/sdg 4 7
[0:0:357:0] disk ATA ST1000DM003-9YN1 CC4D /dev/sdh 7 4
[1:0:0:0] disk ATA ST1000DM003-9YN1 CC4B /dev/sda
# lsscsi -t
[0:0:351:0] disk sas:0x5000c50041ea5265 /dev/sdb
[0:0:352:0] disk sas:0x5000c500418fac39 /dev/sdc
[0:0:353:0] disk sas:0x5000c5000d2161f1 /dev/sdd
[0:0:354:0] disk sas:0x4433221105000000 /dev/sde
[0:0:355:0] disk sas:0x4433221106000000 /dev/sdf
[0:0:356:0] disk sas:0x4433221107000000 /dev/sdg
[0:0:357:0] disk sas:0x4433221104000000 /dev/sdh
[1:0:0:0] disk sata: /dev/sda
LSIUtil 的第42個功能是有Bug的 (LSIUtil 1.71以前, 1.72的 Source Code還沒有時間研究)
42. Display operating system names for devices
在特定的時候, OS Devices Name 會取得失敗
因為 lsiutil 使用兩種方式
在 getOsDeviceNameEx(...)中
第一種是
n = readlink(pathName, linkName, (int)sizeof linkName);
這會取得失敗
例如:
"/sys/class/scsi_device/0:0:351:0/device/block/"
第二種是
n = ioctl(fd, SCSI_IOCTL_GET_IDLUN, id);
這個取得的 id[0] 會是錯誤的號碼.
所以兩種都得不正確的 OS Devices Name /dev/sdx
猜測 SCSI_IOCTL_GET_IDLUN 對於Target ID大於 254 會出問題
有時間再去查這部份的 Linux Source Code
請參考 lsscsi的 source Code
這是取得失敗的畫面
沒有留言:
張貼留言