2013-07-17 97 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 

至於重新掃描總線,這幾乎是它。