Pregunta: ¿Cómo busco la dirección wwn de mi tarjeta HBA instalada en el sistema Linux? Necesito esta información para crear zonificación en mi conmutador de canal de fibra.
Método 1:archivo /sys/class/scsi_host/host{n}/device/fc_host:host{n}/port_name
En Redhat 5 y superior (incluidos OEL y CentOS), el archivo /sys/class/scsi_host/host{n}/device/fc_host:host{n}/port_name contiene la información de HBA WWN como se muestra a continuación. Sustituya n con 0, 1 o 2 según su sistema.
Por ejemplo:
$ cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.3 (Tikanga) $ cat /sys/class/scsi_host/host1/device/fc_host:host1/port_name 0x2100001c111111c1
Método 2:/proc/scsi/{tipo de adaptador}/{n} archivo
En Redhat 4 y anteriores (incluidos OEL y CentOS), el archivo /proc/scsi/{adapter-type}/{n} contiene la información de HBA WWN como se muestra a continuación.
{adapter-type} puede ser qlaxxxx para adaptadores QLogic (o) lpfc para adaptadores Emulex.
Sustituya n con 0, 1 o 2 según su sistema.
El siguiente ejemplo muestra el número WWN del adaptador qlogic 2300 en RedHat 3.
$ cat /etc/redhat-release
Enterprise Linux Enterprise Linux AS release 3 (Update 9)
$ cat /proc/scsi/qla2300/1
QLogic PCI to Fibre Channel Host Adapter for QLA2460:
Firmware version: 4.00.23, Driver version 7.07.05
Entry address = f888d060
Request Queue = 0x37280000, Response Queue = 0x37270000
Request Queue count= 512, Response Queue count= 512
Total number of active commands = 2
Total number of interrupts = -1635473967
Total number of active IP commands = 0
Total number of IOCBs (used/max) = (0/0)
Total number of queued commands = 2
Device queue depth = 0x20
Number of free request entries = 454
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= , flags= 0x70013
Dpc flags = 0x0
MBX flags = 0x0
SRB Free Count = 4094
Link down Timeout = 045
Port down retry = 045
Login retry count = 045
Commands retried with dropped frame(s) = 0
Configured data rate: 4 Gb/sec
SCSI Device Information:
scsi-qla0-adapter-node=2000002c222c2cc2;
scsi-qla0-adapter-port=2100002c222c2cc2;
scsi-qla0-target-0=5006016022c22c2c;
scsi-qla0-target-1=5006016822c22c2c;
SCSI LUN Information:
(Id:Lun) * - indicates lun is not registered with the OS.
( 0: 0): Total reqs -877237672, Pending reqs 0, flags 0x0, 0:0:81,
( 0: 1): Total reqs 1074740881, Pending reqs 2, flags 0x0, 0:0:81,
( 0: 2): Total reqs 439861869, Pending reqs 0, flags 0x0, 0:0:81,
( 0: 3): Total reqs 417766757, Pending reqs 0, flags 0x0, 0:0:81,
( 1: 0): Total reqs 1174574, Pending reqs 0, flags 0x0, 0:0:82,
( 1: 1): Total reqs 1906876572, Pending reqs 0, flags 0x0, 0:0:82,
( 1: 2): Total reqs 1175529, Pending reqs 0, flags 0x0, 0:0:82,
( 1: 3): Total reqs 1173331, Pending reqs 0, flags 0x0, 0:0:82,