LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Detecting WWID number of HBA on SLES11 (https://www.linuxquestions.org/questions/linux-general-1/detecting-wwid-number-of-hba-on-sles11-817687/)

shashij 07-02-2010 01:58 PM

Detecting WWID number of HBA on SLES11
 
Hi,

I have SLES11 installed on server. I have attached 2 SAS cables which are connected to External storage device.
I have connected 3 machines to external storage device. It shows total 6 ID’s. I want to know which 2 are from which machine.

I would like to find out the WWID number of HBA’s on SLES 11 machine.

Any idea; how can do this?

Thanks,
Shashank

MensaWater 07-02-2010 02:06 PM

cd /proc/scsi
Look for information on your HBAs (e.g. there will be qla2xxx/1 and qla2xxx2 for first two Qlogic 2340 HBAs). Cat those files and they'll give you a wealth of detail including "FC Port" information.

Also cat of /proc/scsi/scsi will show you information about SCSI devices detected including the disks over the SAN.

shashij 07-02-2010 02:26 PM

Thanks for reply.

I am serching for number similar to 500605b001415094 on server side. I see 6 numbers like ablove on storage device.

I think that 500605b001415094 is WWID.

How can I serch which 2 number (like 500605b001415094) belongs to any machine?

Thanks and Regards,
-Nilesh

MensaWater 07-02-2010 02:35 PM

You have to look at the /proc/scsi info as I mentioned.

What do you see when you type "ls /proc/scsi" on the servers?

For example on one of my servers I see:

Code:

# ls -l /proc/scsi

total 0
-r--r--r-- 1 root root 0 Jul  2 15:30 device_info
dr-xr-xr-x 2 root root 0 Jul  2 15:29 qla2xxx
-r--r--r-- 1 root root 0 Jul  2 15:30 scsi
dr-xr-xr-x 2 root root 0 Jul  2 15:30 sg

If I then cd to /proc/scsi/qla2xx and do the ls -l I see:
Code:

# ls -l

total 0
-rw-r--r-- 1 root root 0 Jul  2 15:31 1
-rw-r--r-- 1 root root 0 Jul  2 15:31 2

If I then cat out the contents of 1 I see:

Code:

# cat 1
QLogic PCI to Fibre Channel Host Adapter for QLE2460:
        Firmware version 4.00.26 [IP] , Driver version 8.01.07.15
ISP: ISP2432
Request Queue = 0x83e280000, Response Queue = 0x83e260000
Request Queue count = 4096, Response Queue count = 512
Total number of active commands = 0
Total number of interrupts = 601738049
    Device queue depth = 0x20
Number of free request entries = 3875
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 = 0x1a43
Dpc flags = 0x4000000
MBX flags = 0x0
Link down Timeout = 045
Port down retry = 045
Login retry count = 045
Commands retried with dropped frame(s) = 0
Product ID = 0000 0000 0000 0000


SCSI Device Information:
scsi-qla0-adapter-node=2000001b320031e4;
scsi-qla0-adapter-port=2100001b320031e4;
scsi-qla0-target-0=5006016041e0271a;
scsi-qla0-target-1=5006016841e0271a;

FC Port Information:
scsi-qla0-port-0=50060160c1e0271a:5006016041e0271a:611c13:81;
scsi-qla0-port-1=50060160c1e0271a:5006016841e0271a:612813:82;


SCSI LUN Information:
(Id:Lun)  * - indicates lun is not registered with the OS.
( 0: 0): Total reqs 32719431, Pending reqs 0, flags 0x0, 0:0:81 00
( 0: 1): Total reqs 221794191, Pending reqs 0, flags 0x0, 0:0:81 00
( 0: 2): Total reqs 1677061, Pending reqs 0, flags 0x0, 0:0:81 00
( 0: 3): Total reqs 52346194, Pending reqs 0, flags 0x0, 0:0:81 00
( 0: 4): Total reqs 1677061, Pending reqs 0, flags 0x0, 0:0:81 00
( 0: 5): Total reqs 52308794, Pending reqs 0, flags 0x0, 0:0:81 00
( 0: 6): Total reqs 2506160, Pending reqs 0, flags 0x0, 0:0:81 00
( 1: 0): Total reqs 1252459, Pending reqs 0, flags 0x0, 0:0:82 00
( 1: 1): Total reqs 1252447, Pending reqs 0, flags 0x0, 0:0:82 00
( 1: 2): Total reqs 197120249, Pending reqs 0, flags 0x0, 0:0:82 00
( 1: 3): Total reqs 1252453, Pending reqs 0, flags 0x0, 0:0:82 00
( 1: 4): Total reqs 44570903, Pending reqs 0, flags 0x0, 0:0:82 00
( 1: 5): Total reqs 4626576, Pending reqs 0, flags 0x0, 0:0:82 00
( 1: 6): Total reqs 1252444, Pending reqs 0, flags 0x0, 0:0:82 00

If I did the cat on 2 it would give me slightly different information. The information should be in the ...target and ...port lines.

The above is for Qlogic. For Emulex I don't know what it would be but is should have some sort of information in /proc/scsi.

shashij 07-02-2010 03:52 PM

This is what I see on my server:

cpt2:/proc/scsi # ll
total 0
-r--r--r-- 1 root root 0 Jul 2 16:46 device_info
dr-xr-xr-x 2 root root 0 Jul 2 16:46 mptsas
-r--r--r-- 1 root root 0 Jul 2 16:46 scsi
dr-xr-xr-x 2 root root 0 Jul 2 16:46 sg
cpt2:/proc/scsi # cd mptsas/
cpt2:/proc/scsi/mptsas # ls
0 1 2
cpt2:/proc/scsi/mptsas # cat 0
ioc0: LSISAS1068E B3, FwRev=011b5200h, Ports=1, MaxQ=277
cpt2:/proc/scsi/mptsas # cat 1
ioc1: LSISAS1068E B3, FwRev=011b5200h, Ports=1, MaxQ=277
cpt2:/proc/scsi/mptsas # cat 2
ioc2: LSISAS1068E B3, FwRev=011b5600h, Ports=1, MaxQ=277
cpt2:/proc/scsi/mptsas #

cpt2:/dev/disk # cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: IBM Model: 1726-2xx FAStT Rev: 0617
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi0 Channel: 00 Id: 00 Lun: 31
Vendor: IBM Model: Universal Xport Rev: 0617
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: IBM Model: 1726-2xx FAStT Rev: 0617
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 31
Vendor: IBM Model: Universal Xport Rev: 0617
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: IBM-ESXS Model: CBRCA146C3ETS0 N Rev: C370
Type: Direct-Access ANSI SCSI revision: 06
Host: scsi2 Channel: 00 Id: 01 Lun: 00
Vendor: IBM-ESXS Model: CBRCA146C3ETS0 N Rev: C370
Type: Direct-Access ANSI SCSI revision: 06
Host: scsi2 Channel: 01 Id: 01 Lun: 00
Vendor: LSILOGIC Model: Logical Volume Rev: 3000
Type: Direct-Access ANSI SCSI revision: 02
Host: scsi3 Channel: 00 Id: 00 Lun: 00
Vendor: HL-DT-ST Model: RW/DVD GCC-T20N Rev: 1.00
Type: CD-ROM ANSI SCSI revision: 05
cpt2:/dev/disk #

Is there anything I am missing?

Thanks and Regards,
-Shashank

shashij 07-02-2010 05:09 PM

Hi,

ctl1:/proc/scsi/mptsas # cat 1
ioc1: LSISAS1068E B3, FwRev=011b5200h, Ports=1, MaxQ=277
ctl1:/proc/scsi/mptsas # cat 2
ioc2: LSISAS1068E B3, FwRev=011b5600h, Ports=1, MaxQ=277
ctl1:/proc/scsi/mptsas #

These 2 are HBA's on my machine. But I not able to find WWID number till now.

Help is much appreciated.

Thanks and Regards,
-Shashank

shashij 07-02-2010 05:41 PM

Hi,

I could find the WWID of HBA's. It is manual process to see the exact number, but I am not blocked now.

cpt2:~ # find /sys -name sas_address

It gives lot of files. I went thr each file and could match the wwid that is available on storage.
e.g:
cpt2 #cat /sys/devices/pci0000:00/0000:00:07.0/0000:1a:00.0/host1/phy-1:3/sas_phy/phy-1:3/sas_address
0x500605b001413460
cpt2 #

Thanks all for help.

Regards,
-Shashank

MensaWater 07-06-2010 08:48 AM

Thanks for posting your solution.


All times are GMT -5. The time now is 04:21 AM.