출처 : 불량펭귄(http://blog.helperchoi.com/95)
Linux System에서는 아래와 같이 dmidecode 및 lspci 명령을 통해 PCI Slot 정보를 확인 가능하다.
1. 전체 PCI Slot 수와 Slot Type 확인
[root@TestDB01 ~]# dmidecode -t slot | grep Type | wc -l 16 [root@TestDB01 ~]# [root@TestDB01 ~]# dmidecode -t slot | grep Type Type: x4 PCI Express Gen 2 x8 Type: x4 PCI Express Gen 2 x8 Type: x8 PCI Express Gen 2 x16 Type: x4 PCI Express Gen 2 x8 Type: x8 PCI Express Gen 2 x16 Type: x4 PCI Express x8 Type: x8 PCI Express Gen 2 x16 Type: x8 PCI Express Gen 2 x16 Type: x4 PCI Express Gen 2 x8 Type: x8 PCI Express Gen 2 x16 Type: x8 PCI Express Gen 2 x16 Type: x8 PCI Express Gen 2 x16 Type: x8 PCI Express Gen 2 x16 Type: x4 PCI Express Gen 2 x8 Type: x8 PCI Express Gen 2 x16 Type: x8 PCI Express Gen 2 x16 [root@TestDB01 ~]# |
2. 가용 가능 여분 PCI Slot 확인
[root@TestDB01 ~]# dmidecode -t slot | grep -i "available" | wc -l 3 [root@TestDB01 ~]# [root@TestDB01 ~]# dmidecode -t slot | grep -i "available" -B2 -A5 Designation: PCI-E Slot 14 Type: x4 PCI Express Gen 2 x8 Current Usage: Available Length: Short Characteristics: 3.3 V is provided PME signal is supported Bus Address: 0000:a7:00.0 -- Designation: PCI-E Slot 15 Type: x8 PCI Express Gen 2 x16 Current Usage: Available Length: Short Characteristics: 3.3 V is provided PME signal is supported Bus Address: 0000:aa:00.0 -- Designation: PCI-E Slot 16 Type: x8 PCI Express Gen 2 x16 Current Usage: Available Length: Short Characteristics: 3.3 V is provided PME signal is supported Bus Address: 0000:ad:00.0 [root@TestDB01 ~]# [root@TestDB01 ~]# |
3. 현재 사용중인 PCI Slot과 해당 BUS 정보 확인
[root@TestDB01 ~]# [root@TestDB01 ~]# dmidecode -t slot | grep -i "in use" -B2 -A5 Designation: PCI-E Slot 7 Type: x4 PCI Express Gen 2 x8 Current Usage: In Use Length: Long Characteristics: 3.3 V is provided PME signal is supported Bus Address: 0000:05:00.0 -- Designation: PCI-E Slot 8 Type: x4 PCI Express Gen 2 x8 Current Usage: In Use Length: Long Characteristics: 3.3 V is provided PME signal is supported Bus Address: 0000:08:00.0 -- Designation: PCI-E Slot 9 Type: x8 PCI Express Gen 2 x16 Current Usage: In Use Length: Long Characteristics: 3.3 V is provided PME signal is supported Bus Address: 0000:0b:00.0 -- .
.
.
생략
|
4. 현재 PCI Slot에 장착된 HBA Card(FC-Card) 확인
[root@TestDB01 ~]# [root@TestDB01 ~]# lspci | grep -i "fibre channel" 05:00.0 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) 05:00.1 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) 08:00.0 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) 08:00.1 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) 0b:00.0 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) 0b:00.1 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) 55:00.0 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) 55:00.1 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) 58:00.0 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) 58:00.1 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) 5b:00.0 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) 5b:00.1 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) 5e:00.0 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) 5e:00.1 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) 61:00.0 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) 61:00.1 Fibre Channel: Emulex Corporation Zephyr-X LightPulse Fibre Channel Host Adapter (rev 02) [root@TestDB01 ~]# [root@TestDB01 ~]# [root@TestDB01 ~]# for LIST in `lspci | grep -i "fibre channel" | cut -d "." -f 1 | uniq`; do dmidecode -t slot | grep ${LIST} -B7 && echo "================"; done Designation: PCI-E Slot 7 Type: x4 PCI Express Gen 2 x8 Current Usage: In Use Length: Long Characteristics: 3.3 V is provided PME signal is supported Bus Address: 0000:05:00.0 ================ Designation: PCI-E Slot 8 Type: x4 PCI Express Gen 2 x8 Current Usage: In Use Length: Long Characteristics: 3.3 V is provided PME signal is supported Bus Address: 0000:08:00.0 ================ Designation: PCI-E Slot 9 Type: x8 PCI Express Gen 2 x16 Current Usage: In Use Length: Long Characteristics: 3.3 V is provided PME signal is supported Bus Address: 0000:0b:00.0 ================ Designation: PCI-E Slot 2 Type: x8 PCI Express Gen 2 x16 Current Usage: In Use Length: Long Characteristics: 3.3 V is provided PME signal is supported Bus Address: 0000:55:00.0 ================ Designation: PCI-E Slot 3 Type: x8 PCI Express Gen 2 x16 Current Usage: In Use Length: Long Characteristics: 3.3 V is provided PME signal is supported Bus Address: 0000:58:00.0 ================ Designation: PCI-E Slot 4 Type: x4 PCI Express Gen 2 x8 Current Usage: In Use Length: Long Characteristics: 3.3 V is provided PME signal is supported Bus Address: 0000:5b:00.0 ================ Designation: PCI-E Slot 5 Type: x8 PCI Express Gen 2 x16 Current Usage: In Use Length: Long Characteristics: 3.3 V is provided PME signal is supported Bus Address: 0000:5e:00.0 ================ Designation: PCI-E Slot 6 Type: x8 PCI Express Gen 2 x16 Current Usage: In Use Length: Long Characteristics: 3.3 V is provided PME signal is supported Bus Address: 0000:61:00.0 ================ [root@TestDB01 ~]# |
5. 상기 4번에서 확인된 HBA Card의 Bus 정보와 맵핑되는 FC Host 정보 확인
[root@TestDB01 ~]# [root@TestDB01 ~]# find /sys/class/fc_host/ -type l -name device -exec ls -l {} \; lrwxrwxrwx 1 root root 0 3월 5 22:09 /sys/class/fc_host/host17/device -> ../../../devices/pci0000:50/0000:50:09.0/0000:55:00.1/host17 lrwxrwxrwx 1 root root 0 3월 5 22:09 /sys/class/fc_host/host16/device -> ../../../devices/pci0000:50/0000:50:09.0/0000:55:00.0/host16 lrwxrwxrwx 1 root root 0 3월 5 22:09 /sys/class/fc_host/host15/device -> ../../../devices/pci0000:50/0000:50:07.0/0000:58:00.1/host15 lrwxrwxrwx 1 root root 0 3월 5 22:09 /sys/class/fc_host/host14/device -> ../../../devices/pci0000:50/0000:50:07.0/0000:58:00.0/host14 lrwxrwxrwx 1 root root 0 3월 5 22:09 /sys/class/fc_host/host13/device -> ../../../devices/pci0000:50/0000:50:05.0/0000:5e:00.1/host13 lrwxrwxrwx 1 root root 0 3월 5 22:09 /sys/class/fc_host/host12/device -> ../../../devices/pci0000:50/0000:50:05.0/0000:5e:00.0/host12 lrwxrwxrwx 1 root root 0 3월 5 22:09 /sys/class/fc_host/host11/device -> ../../../devices/pci0000:50/0000:50:03.0/0000:61:00.1/host11 lrwxrwxrwx 1 root root 0 3월 5 22:09 /sys/class/fc_host/host10/device -> ../../../devices/pci0000:50/0000:50:03.0/0000:61:00.0/host10 lrwxrwxrwx 1 root root 0 3월 5 22:09 /sys/class/fc_host/host9/device -> ../../../devices/pci0000:50/0000:50:01.0/0000:5b:00.1/host9 lrwxrwxrwx 1 root root 0 3월 5 22:09 /sys/class/fc_host/host8/device -> ../../../devices/pci0000:50/0000:50:01.0/0000:5b:00.0/host8 lrwxrwxrwx 1 root root 0 3월 5 22:09 /sys/class/fc_host/host7/device -> ../../../devices/pci0000:00/0000:00:0a.0/0000:05:00.1/host7 lrwxrwxrwx 1 root root 0 3월 5 22:09 /sys/class/fc_host/host6/device -> ../../../devices/pci0000:00/0000:00:0a.0/0000:05:00.0/host6 lrwxrwxrwx 1 root root 0 3월 5 22:09 /sys/class/fc_host/host5/device -> ../../../devices/pci0000:00/0000:00:09.0/0000:08:00.1/host5 lrwxrwxrwx 1 root root 0 3월 5 22:09 /sys/class/fc_host/host4/device -> ../../../devices/pci0000:00/0000:00:09.0/0000:08:00.0/host4 lrwxrwxrwx 1 root root 0 3월 5 22:09 /sys/class/fc_host/host3/device -> ../../../devices/pci0000:00/0000:00:07.0/0000:0b:00.1/host3 lrwxrwxrwx 1 root root 0 3월 5 22:08 /sys/class/fc_host/host2/device -> ../../../devices/pci0000:00/0000:00:07.0/0000:0b:00.0/host2 [root@TestDB01 ~]# [root@TestDB01 ~]# |