Skip to main content

FAQ

如何確認 /dev/sda 是 Local Disk 還是 SAN DIsk

Solution:

#> lsscsi
[2:0:0:0]    cd/dvd  hp       DVD-ROM DTA0N    WBD0  /dev/sr0
  state=running queue_depth=1 scsi_level=6 type=5 device_blocked=0 timeout=0
[3:0:0:0]    tape    IBM      ULT3580-HH5      D2AD  /dev/st0
  state=running queue_depth=32 scsi_level=7 type=1 device_blocked=0 timeout=900
[3:0:1:0]    tape    IBM      ULT3580-HH5      D2AD  /dev/st1
  state=running queue_depth=32 scsi_level=7 type=1 device_blocked=0 timeout=900
[3:0:1:1]    mediumx IBM      3573-TL          C.20  -
  state=running queue_depth=32 scsi_level=6 type=8 device_blocked=0 timeout=0
[3:0:2:0]    disk    IBM      1726-4xx  FAStT  0617  /dev/sda            <======
  state=running queue_depth=32 scsi_level=6 type=0 device_blocked=0 timeout=60
[3:0:2:31]   disk    IBM      Universal Xport  0617  -
  state=running queue_depth=32 scsi_level=6 type=0 device_blocked=0 timeout=60

IBM FAStT 是 IBM Storage 產品識別

如果沒有 lsscsi 指令,執行 yum install lsscsi

如何找出 HBA Card 的 port WWN

方法一: 用 systool

# Install
yum install sysfsutils
#
systool -c fc_host -v
systool -c fc_transport -v 

方法二:/sys/class/fc_host/{host#}/port_name

#> cat /sys/class/fc_host/host5/port_name
0x2100001b32837bcd

方法三:/proc/scsi/{adapter-type}/{host#}

#> cat /proc/scsi/qla2xxx/2

SCSI Device Information:
scsi-qla0-adapter-node=5001438004253c81;
scsi-qla0-adapter-port=5001438004253c80; <---- WWN
scsi-qla0-target-0=50001fe1500e28fd;
scsi-qla0-target-1=50001fe1500e28f9;
scsi-qla0-target-2=500a09829140a66c;
如何查詢 mpathX 所對應的 Device Mapper(dm-X)