在Linux上重新扫描LUN

时间:2013-07-17 18:57:17

标签: linux storage scsi

我们已经在EMC存储上花费了现有的LUN大小,现在我想在主机端重新扫描,但我不知道如何找出该特定LUN的SCSI ID。我是新来的存储..这就是我正在做的但不知道它是否是正确的方式

Pseudo name=emcpowerj
CLARiiON ID=APM00112500570 [Oracle_Cluster]
Logical device ID=200601602E002900B6BCA114C9F8E011 [LUN01]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0;
Owner: default=SP A, current=SP A       Array failover mode: 1
==============================================================================
--------------- Host ---------------   - Stor -   -- I/O Path --  -- Stats ---
###  HW Path               I/O Paths    Interf.   Mode    State   Q-IOs Errors
==============================================================================
   2 qla2xxx                  sdaj      SP A1     active  alive       0      1
   2 qla2xxx                  sdaw      SP B1     active  alive       0      4
   1 qla2xxx                  sdj       SP A0     active  alive       0      1
   1 qla2xxx                  sdw       SP B0     active  alive       0      4

这里我在sdX设备上运行find命令找出SCSI ID,我可以echo 1 > /sys/bus/scsi/drivers/X:X:X:X/rescan重新扫描LUN

$ find /sys/devices -name "*block*" | grep -e "sdaj" -e "sdaw" -e "sdj" -e "sdw"
/sys/devices/pci0000:00/0000:00:09.0/0000:05:00.1/host2/rport-2:0-1/target2:0:1/**2:0:1:8**/block:sdaw
/sys/devices/pci0000:00/0000:00:09.0/0000:05:00.1/host2/rport-2:0-0/target2:0:0/**2:0:0:8**/block:sdaj
/sys/devices/pci0000:00/0000:00:09.0/0000:05:00.0/host1/rport-1:0-1/target1:0:1/**1:0:1:8**/block:sdw
/sys/devices/pci0000:00/0000:00:09.0/0000:05:00.0/host1/rport-1:0-0/target1:0:0/**1:0:0:8**/block:sdj

还是有替代或其他方式来扫描LUN?

1 个答案:

答案 0 :(得分:2)

我喜欢使用“lsscsi”程序,该程序可能适合您的发行。

% lsscsi
[0:0:0:0]    cd/dvd  NECVMWar VMware IDE CDR00 1.00  /dev/sr0
[2:0:0:0]    disk    VMware,  VMware Virtual S 1.0   /dev/sda
[2:0:1:0]    disk    VMware,  VMware Virtual S 1.0   /dev/sdb

至于重新扫描公交车,这就是它。