Sie sind auf Seite 1von 4

get the LUN ID at AIX, in RedHat. The following is what I usually do to get the LUN ID from AIX. 1.

lscfg -v > /tmp/lscfg.out 2. cat lscfg.out and look for IBM ESS LUN as following. In below, I take the LUN ID as 213 ( the first 3 digit of Serial Number). hdisk2 U787B.001.DNW0661-P1-C4-T1-W5005076300C1A7CA-L5213000000000000 IBM MPIO FC 2105 Manufacturer................IBM Machine Type and Model......2105800 Serial Number...............21327186 EC Level.....................112 Device Specific.(Z0)........10 Device Specific.(Z1)........000C Device Specific.(Z2)........0075 Device Specific.(Z3)........31603 Device Specific.(Z4)........05 Device Specific.(Z5)........00 Supposed that the same type of IBM disk is attached to RedHat and how can I find out that LUN ID? I try to find out as you advised but I am not able to identify myself what to look for. Our Storage admin said that the LUN ID 10D is attached to the following RedHat System but I can't verify that info. [root@DSYSMKT1 proc]# ls -alR scsi scsi: total 0 dr-xr-xr-x 3 root root 0 Jun 25 15:02 . dr-xr-xr-x 157 root root 0 Jun 22 14:46 .. -r--r--r-- 1 root root 0 Jun 25 15:02 device_info dr-xr-xr-x 2 root root 0 Jun 25 15:02 qla2xxx -r--r--r-- 1 root root 0 Jun 25 15:02 scsi scsi/qla2xxx: total 0 dr-xr-xr-x 2 root root 0 Jun 25 15:02 . dr-xr-xr-x 3 root root 0 Jun 25 15:02 .. -rw-r--r-- 1 root root 0 Jun 25 15:02 0 [root@DSYSMKT1 qla2xxx]# pwd /proc/scsi/qla2xxx [root@DSYSMKT1 qla2xxx]# ls -al total 0 dr-xr-xr-x 2 root root 0 Jun 25 14:51 . dr-xr-xr-x 3 root root 0 Jun 25 14:43 .. -rw-r--r-- 1 root root 0 Jun 25 14:54 0 [root@DSYSMKT1 qla2xxx]# more 0 QLogic PCI to Fibre Channel Host Adapter for QLA2340: Firmware version 3.03.20 IPX, Driver version 8.01.04-d8 ISP: ISP2312, Serial# F40882 Request Queue = 0x7cc00000, Response Queue = 0x7d3f0000 Request Queue count = 2048, Response Queue count = 512 Total number of active commands = 0 Total number of interrupts = 117587 Device queue depth = 0x20 Number of free request entries = 899 Number of mailbox timeouts = 0 Number of ISP aborts = 0 Number of loop resyncs = 0 Number of retries for empty slots = 0 Number of reqs in pending_q= 0, retry_q= 0, done_q= 0, scsi_retry_q= 0

Host adapter:loop state = <READY>, flags = 0x1a03 Dpc flags = 0x4000000 MBX flags = 0x0 Link down Timeout = 008 Port down retry = 016 Login retry count = 016 Commands retried with dropped frame(s) = 0 Product ID = 4953 5020 2020 0002 SCSI Device Information: scsi-qla0-adapter-node 0000e08b88d240; scsi-qla0-adapter-port=210000e08b88d240; scsi-qla0-target-0=5005076300c1a7ca; FC Port Information: scsi-qla0-port-0 000000c92ba231:10000000c92ba231:061a00:81; scsi-qla0-port-1=5005076300c0a7ca:5005076300c1a7ca:060000:82; SCSI LUN Information: (Id:Lun) * - indicates lun is not registered with the OS. ( 0: 0): Total reqs 3, Pending reqs 0, flags 0x0*, 0:0:82 00 ( 0: 1): Total reqs 118185, Pending reqs 0, flags 0x0, 0:0:82 00 ------------- amslunremapping bash-3.00# lscfg -vl hdisk232 hdisk232 U787B.001.DNWG61D-P1-C1-T2-W50060E801002E1D7-L0 Other FC SCS I Disk Drive

Manufacturer................HITACHI Machine Type and Model......DF600F Part Number................. ROS Level and ID............30303030 Serial Number...............77011805 EC Level.................... FRU Number.................. Device Specific.(Z0)........00000312B3001102 Device Specific.(Z1)........0048 Device Specific.(Z2)......... Device Specific.(Z3)......... Device Specific.(Z4).........l.. Device Specific.(Z5)........ Device Specific.(Z6)........ U787B.001.DNWG61D-P1-C1-T2-W50060E801002E1D7-L0L0maplun idDevice Sp -----------Online LUN Detection in RHEL Online LUN Detection in RedHat Enterprise Linux Release: RedHat Enterprise Linux Problem: Detect Newly assigned LUN in RHEL without reboot the server Solution: 1) Install the required packages # yum install sysfsutils sg3_utils

2)

We need the below parameters to rescan the scsi bus H C T L C C C C HBA Number Channel on the HBA SCSI target id LUN id

3) We can get the above said parameters using the different command, for m e I am using systool and sg_map command # systool -c fc_host -v Class Device = "host3" Class Device path = "/sys/class/fc_host/host3" port_name = "0x2100001b32882e82" Note : In the above sample output class device path is host3. So 3 is the HBA number , if dual channel HBA means like the above host4 also will displayed. Here port name is the HBA's wwn id. # systool -c fc_transport -v Class Device = "0:0" Class Device path = "/sys/class/fc_transport/target3:0:0" port_name = "0x200400a0b84889b5" Note: In the above command output, class device path is 3:0:0, that is in the order of HBA number:channel on HBA:SCSI Target id (H:C:T). Here port name is the storage' s wwpn id. # sg_map -x /dev/sg0 /dev/sg1 /dev/sg2 /dev/sg3 /dev/sg4 /dev/sg5 /dev/sg6 /dev/sg7 /dev/sg8 0 0 0 3 3 3 3 3 3 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 1 2 2 0 0 0 0 31 0 1 0 1 0 0 0 /dev/sda 0 0 0 /dev/sdb 0 /dev/sdc 0 /dev/sdd 0 /dev/sde

Note: In the above command output, first four digits as represents H C T L also know n as Host, Bus, Target, Lun (H B T L). From this we can identify how many luns are already mapped. 4) Now rescan the SCSI bus using the said parameters # echo C T L > /sys/class/scsi_host/HostH/scan Note: If u are having dual channel HBA card means scan both the HBA numbers usin g the above command . 5) Now check with the fdisk command, whether the LUN is detected or not. If not means use the below command # echo 1 > /sys/class/fc_host/hostH/issue_lip Note: The above command instruct the driver to rediscover the remote ports. LIP

(Loop Initialization Protocol). 6) Now confirm with the fdisk command and use the LUN as usual.

Das könnte Ihnen auch gefallen