2013-07-17 59 views
1

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

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?

回答

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 

至于重新扫描总线,这几乎是它。