CAFE

filesystem/disk

어떻게 RHEL 5에서 FC ID (WWN) 와 disk/LUN 정보를 확인할 수 있나?

작성자이누기|작성시간09.11.25|조회수2,852 목록 댓글 0

어떻게 RHEL 5에서 FC ID (WWN) 와 disk/LUN 정보를 확인할 수 있나?

Article ID: 19446 - Created on: May 22, 2009 10:54 AM - Last Modified:  Sep 27, 2009 12:12 PM

http://kbase.redhat.com/faq/docs/DOC-19446

 

Release Found: Red Hat Enterprise Linux 5

 

Problem

 

multiple SAN들이 연결된 시스템에서는 , 어떤 디스크가 어떤 SAN인지, 어떤 포트 어떤 연결인지 확인하기 어렵니다.

 

Resolution

On Red Hat Enterprise Linux 5 에서는 모든 데이타가  /sys 에 저장되어 있고, Fibre Channel 별로 찾을 수 있다..

 

1) 서버에서 HBA의  Fibre Channel 주소를 찾기위해서는 아래와 같이 실행해라:

 

# systool -c fc_host -v (output trimmed for clarity)   Class Device path = "/sys/class/fc_host/host8"     port_name           = "0x10000000c9802436"     node_name           = "0x20000000c9802436"   Class Device path = "/sys/class/fc_host/host9"     port_name           = "0x10000000c9802437"     node_name           = "0x20000000c9802437"

 

 

각 서버에서, 현재 두개를 가지는 HBA가 현재  host8 와 host9로 동작하는 것을 알 수 있다. (please notice that these numbers can change, they change every time the fibre channel driver is unloaded, reloaded, and can change across reboots). 이  host숫자는   HBTL SCSI addressing 에서의 H-value 이다.

 

2) 아래의 명령으로 또한 우리는 triplet HBT ( HBTL SCSI addressing) 에 대한 fibre channel target WWN을 확인할 수 있다..

 

# systool -c fc_transport -v (output trimmed for clarity) Class = "fc_transport"   Class Device path = "/sys/class/fc_transport/target8:0:0"     node_name           = "0x50060160ba601693"     port_name           = "0x500601683a601693"   Class Device path = "/sys/class/fc_transport/target9:0:0"     node_name           = "0x50060160ba601693"     port_name           = "0x500601683a601693"   Class Device path = "/sys/class/fc_transport/target8:0:1"     node_name           = "0x50060160ba601693"     port_name           = "0x500601603a601693"   Class Device path = "/sys/class/fc_transport/target9:0:1"     node_name           = "0x50060160ba601693"     port_name           = "0x500601603a601693"

 

Where node_name, is the FC WWN of the Storage System, and port_name is the FC WWID of the Storage Processor Port.

 

3) With the following command, we can determine the mapping between SCSI HBTL addresses and the disks:

 

(sg_map is part of sg3_utils, and before running sg_map, it is necessary to have the sg module loaded on the system)

 

# sg_map -x (output trimmed for clarity) /dev/sg4  8 0 0 0  0  /dev/sdd /dev/sg5  8 0 0 1  0  /dev/sde /dev/sg6  8 0 0 2  0  /dev/sdf /dev/sg7  8 0 1 0  0  /dev/sdg /dev/sg8  8 0 1 1  0  /dev/sdh /dev/sg9  8 0 1 2  0  /dev/sdi /dev/sg10  9 0 0 0  0  /dev/sdj /dev/sg11  9 0 0 1  0  /dev/sdk /dev/sg12  9 0 0 2  0  /dev/sdl /dev/sg13  9 0 1 0  0  /dev/sdm /dev/sg14  9 0 1 1  0  /dev/sdn /dev/sg15  9 0 1 2  0  /dev/sdo

 

4) From commands on (1), (2) and (3) we have the mapping from disk to HBTL SCSI addresses, and the mapping of SCSI address to fibre channel address. If, for instance, we want to see where the following multipath device is hosted, we do:

 

disc01 (3600601608e661a01486cd3c7f53ede11) dm-1 DGC,RAID 5 [size=10G][features=0][hwhandler=1 emc][rw] \_ round-robin 0 [prio=2][active] \_ 8:0:1:0 sdg 8:96  [active][ready] \_ 9:0:1:0 sdm 8:192 [active][ready] \_ round-robin 0 [prio=0][enabled] \_ 8:0:0:0 sdd 8:48  [active][ready] \_ 9:0:0:0 sdj 8:144 [active][ready]

 

5) We know already that it's an EMC Clariion because the vendor is DGC, but I could have LUNs from more than one Clariion on this system, so let's pick /dev/sdj as an example:

 

/dev/sg10  9 0 0 0  0  /dev/sdj /dev/sdj = H:B:T:L = 9:0:0:0

 

Therefore for sdj we have, H=9 and HBT=9:0:0. From (1) and (2) we have:

 

Host HBA WWN:           0x20000000c9802437 Host HBA WWP:           0x10000000c9802437 Storage System WWN:     0x50060160ba601693 Storage Processor WWP:  0x500601683a601693

 

6) Doing for all disks:

 

 

              Local Port          Remote port          STORAGE 8:0:1:0 sdg    0x10000000c9802436  0x500601603a601693   0x50060160ba601693 9:0:1:0 sdm    0x10000000c9802437  0x500601603a601693   0x50060160ba601693 8:0:0:0 sdd    0x10000000c9802436  0x500601683a601693   0x50060160ba601693 9:0:0:0 sdj    0x10000000c9802437  0x500601683a601693   0x50060160ba601693

 

ATTENTION: look carefully at the 'Remote port' values, they normally differ only in a few bits.

 

In this particular case, we see that both sdd and sdj are on the same remote port, and sdg and sdm are on the same ports as well.

 

7) A storage system can have many ports. In most cases 2 or 4, but the Storage ID should remain the same. In sysfs we have 0x50060160ba601693, which maps perfectly to the storage WWN from the storage admin interface.

 

Current Storage System Name:      AX150 Storage System World Wide Name:      50:06:01:60:BA:60:16:93

다음검색
현재 게시글 추가 기능 열기

댓글

댓글 리스트
맨위로

카페 검색

카페 검색어 입력폼