본문 바로가기
IT/LINUX

[LINUX] 리눅스에서 HBA Slot 위치 찾기

by 양눈 2020. 12. 22.

LINUX 장비에서 사용하던 HBA포트가 문제가 생겼다 WWN으로 물리서버의 포트를 찾아야 한다 물리적으로 슬롯위치와 포트위치를 찾아보자. 

1. HBA 갯수 확인 

#  lspci | grep Fibre

02:00.0 Fibre Channel: Emulex Corporation Saturn-X: LightPulse Fibre Channel Host Adapter (rev 03)

02:00.1 Fibre Channel: Emulex Corporation Saturn-X: LightPulse Fibre Channel Host Adapter (rev 03)

04:00.0 Fibre Channel: Emulex Corporation Saturn-X: LightPulse Fibre Channel Host Adapter (rev 03)

04:00.1 Fibre Channel: Emulex Corporation Saturn-X: LightPulse Fibre Channel Host Adapter (rev 03)


해당명령으로 HBA카드가 대충 몇개인지 확인할 수 있다. 해당장비는 2포트짜리 HBA가 두개이다 

 

 

2. 문제가 생긴 HBA포트의 버스주소를 확인 

#  systool -c fc_host -v
Class = "fc_host"

  Class Device = "host12"
  Class Device path = "/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.1/host12/fc_host/host12"
    active_fc4s         = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "
    dev_loss_tmo        = "30"
    fabric_name         = "0x0"
    issue_lip           = <store method only>
    max_npiv_vports     = "255"
    maxframe_size       = "2048 bytes"
    node_name           = "0x200000109b1e1d8d"
    npiv_vports_inuse   = "0"
    port_id             = "0x000000"
    port_name           = "0x100000109b1e1d8d"
    port_state          = "Linkdown"
    port_type           = "Unknown"
    speed               = "unknown"
    supported_classes   = "Class 3"
    supported_fc4s      = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "
    supported_speeds    = "2 Gbit, 4 Gbit, 8 Gbit"
    symbolic_name       = "Emulex LPe12002 FV2.02A3 DV12.0.0.5. HN:gmfwlogpd01. OS:Linux
"
    tgtid_bind_type     = "wwpn (World Wide Port Name)"
    uevent              =
    vport_create        = <store method only>
    vport_delete        = <store method only>

    Device = "host12"
    Device path = "/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.1/host12"
      uevent              = "DEVTYPE=scsi_host"


  Class Device = "host13"
  Class Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:04:00.0/host13/fc_host/host13"
    active_fc4s         = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "
    dev_loss_tmo        = "30"
    fabric_name         = "0x1000000533c25400"
    issue_lip           = <store method only>
    max_npiv_vports     = "255"
    maxframe_size       = "2048 bytes"
    node_name           = "0x200000109b1f6ef4"
    npiv_vports_inuse   = "0"
    port_id             = "0x01a900"
    port_name           = "0x100000109b1f6ef4"
    port_state          = "Online"
    port_type           = "NPort (fabric via point-to-point)"
    speed               = "8 Gbit"
    supported_classes   = "Class 3"
    supported_fc4s      = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "
    supported_speeds    = "2 Gbit, 4 Gbit, 8 Gbit"
    symbolic_name       = "Emulex LPe12002 FV2.02A3 DV12.0.0.5. HN:gmfwlogpd01. OS:Linux
"
    tgtid_bind_type     = "wwpn (World Wide Port Name)"
    uevent              =
    vport_create        = <store method only>
    vport_delete        = <store method only>

    Device = "host13"
    Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:04:00.0/host13"
      uevent              = "DEVTYPE=scsi_host"


  Class Device = "host14"
  Class Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:04:00.1/host14/fc_host/host14"
    active_fc4s         = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "
    dev_loss_tmo        = "30"
    fabric_name         = "0x0"
    issue_lip           = <store method only>
    max_npiv_vports     = "255"
    maxframe_size       = "2048 bytes"
    node_name           = "0x200000109b1f6ef5"
    npiv_vports_inuse   = "0"
    port_id             = "0x000000"
    port_name           = "0x100000109b1f6ef5"
    port_state          = "Linkdown"
    port_type           = "Unknown"
    speed               = "unknown"
    supported_classes   = "Class 3"
    supported_fc4s      = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "
    supported_speeds    = "2 Gbit, 4 Gbit, 8 Gbit"
    symbolic_name       = "Emulex LPe12002 FV2.02A3 DV12.0.0.5. HN:gmfwlogpd01. OS:Linux
"
    tgtid_bind_type     = "wwpn (World Wide Port Name)"
    uevent              =
    vport_create        = <store method only>
    vport_delete        = <store method only>

    Device = "host14"
    Device path = "/sys/devices/pci0000:00/0000:00:03.0/0000:04:00.1/host14"
      uevent              = "DEVTYPE=scsi_host"


  Class Device = "host4"
  Class Device path = "/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host4/fc_host/host4"
    active_fc4s         = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "
    dev_loss_tmo        = "30"
    fabric_name         = "0x1000000533c24f00"
    issue_lip           = <store method only>
    max_npiv_vports     = "255"
    maxframe_size       = "2048 bytes"
    node_name           = "0x200000109b1e1d8c"
    npiv_vports_inuse   = "0"
    port_id             = "0x02a900"
    port_name           = "0x100000109b1e1d8c"       --> 문제가 있는 포트
    port_state          = "Online"
    port_type           = "NPort (fabric via point-to-point)"
    speed               = "8 Gbit"
    supported_classes   = "Class 3"
    supported_fc4s      = "0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 "
    supported_speeds    = "2 Gbit, 4 Gbit, 8 Gbit"
    symbolic_name       = "Emulex LPe12002 FV2.02A3 DV12.0.0.5. HN:gmfwlogpd01. OS:Linux
"
    tgtid_bind_type     = "wwpn (World Wide Port Name)"
    uevent              =
    vport_create        = <store method only>
    vport_delete        = <store method only>

    Device = "host4"
    Device path = "/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host4"     --> 문제가 있는 포트의 버스주소
      uevent              = "DEVTYPE=scsi_host"


3. 슬롯넘버 확인 

해당 버스의 주소로 부터 슬롯의 넘버를 찾는다 

# lspci -nv | more

.... 생략
02:00.0 0c04: 10df:f100 (rev 03)  --> 버스주소 확인, 포트넘버는 0번이다.  
        Subsystem: 10df:f100
        Physical Slot: 4               --> 슬롯넘버
        Flags: bus master, fast devsel, latency 0, IRQ 26, NUMA node 0
        Memory at fbc89000 (64-bit, non-prefetchable) [size=4K]
        Memory at fbc84000 (64-bit, non-prefetchable) [size=16K]
        Expansion ROM at fbc40000 [disabled] [size=256K]
        Capabilities: [58] Power Management version 3
        Capabilities: [60] MSI: Enable- Count=1/16 Maskable+ 64bit+
        Capabilities: [78] MSI-X: Enable+ Count=32 Masked-
        Capabilities: [84] Vital Product Data
        Capabilities: [94] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [12c] Power Budgeting <?>
        Kernel driver in use: lpfc
        Kernel modules: lpfc

02:00.1 0c04: 10df:f100 (rev 03)
        Subsystem: 10df:f100
        Physical Slot: 4
        Flags: bus master, fast devsel, latency 0, IRQ 63, NUMA node 0
        Memory at fbc88000 (64-bit, non-prefetchable) [size=4K]
        Memory at fbc80000 (64-bit, non-prefetchable) [size=16K]
        Expansion ROM at fbc00000 [disabled] [size=256K]
        Capabilities: [58] Power Management version 3
        Capabilities: [60] MSI: Enable- Count=1/16 Maskable+ 64bit+
        Capabilities: [78] MSI-X: Enable+ Count=32 Masked-
        Capabilities: [84] Vital Product Data
        Capabilities: [94] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [12c] Power Budgeting <?>
        Kernel driver in use: lpfc
        Kernel modules: lpfc

 04:00.0 0c04: 10df:f100 (rev 03)
        Subsystem: 10df:f100
        Physical Slot: 2
        Flags: bus master, fast devsel, latency 0, IRQ 29, NUMA node 0
        Memory at fbb89000 (64-bit, non-prefetchable) [size=4K]
        Memory at fbb84000 (64-bit, non-prefetchable) [size=16K]
        Expansion ROM at fbb40000 [disabled] [size=256K]
        Capabilities: [58] Power Management version 3
        Capabilities: [60] MSI: Enable- Count=1/16 Maskable+ 64bit+
        Capabilities: [78] MSI-X: Enable+ Count=32 Masked-
        Capabilities: [84] Vital Product Data
        Capabilities: [94] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [12c] Power Budgeting <?>
        Kernel driver in use: lpfc
        Kernel modules: lpfc

04:00.1 0c04: 10df:f100 (rev 03)
        Subsystem: 10df:f100
        Physical Slot: 2
        Flags: bus master, fast devsel, latency 0, IRQ 92, NUMA node 0
        Memory at fbb88000 (64-bit, non-prefetchable) [size=4K]
        Memory at fbb80000 (64-bit, non-prefetchable) [size=16K]
        Expansion ROM at fbb00000 [disabled] [size=256K]
        Capabilities: [58] Power Management version 3
        Capabilities: [60] MSI: Enable- Count=1/16 Maskable+ 64bit+
        Capabilities: [78] MSI-X: Enable+ Count=32 Masked-
        Capabilities: [84] Vital Product Data
        Capabilities: [94] Express Endpoint, MSI 00
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [12c] Power Budgeting <?>
        Kernel driver in use: lpfc
        Kernel modules: lpfc

..... 생략 

 

4. 슬롯넘버 확인, dmidecode 명령사용

dmidecode 명령어로도 슬롯위치를 찾을 수 있다. 

# dmidecode -t slot
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 3.0 present.

Handle 0x001A, DMI type 9, 17 bytes
System Slot Information
        Designation: SLOT 01
        Type: x16 PCI Express 3 x16
        Current Usage: In Use
        Length: Other
        ID: 1
        Characteristics:
                3.3 V is provided
                PME signal is supported
        Bus Address: 0000:01:00.0

Handle 0x001B, DMI type 9, 17 bytes
System Slot Information
        Designation: SLOT 02
        Type: x16 PCI Express 3 x16
        Current Usage: In Use
        Length: Other
        ID: 2
        Characteristics:
                3.3 V is provided
                PME signal is supported
        Bus Address: 0000:04:00.0

Handle 0x001D, DMI type 9, 17 bytes
System Slot Information
        Designation: SLOT 04       --> 슬롯의 위치를 찾았다 해당 포트의 슬롯은 04번이다
        Type: x8 PCI Express 3 x8
        Current Usage: In Use
        Length: Other
        ID: 4
        Characteristics:
                3.3 V is provided
                PME signal is supported
        Bus Address: 0000:02:00.0   --> 동일한 버스의 주소를 찾앗다

................ 생략 ...................

 

댓글0