Linux fiber channel driver

Linux Fibre Channel SCSI Target using SCST

Fibre channel or Fiber Channel is also another way to present SCSI devices over a network medium using a complete different protocol suite then my previous article on iSCSI. With Fiber Channel transfer speeds and protocol delivery is much faster than iSCSI. The fundamental difference between the two is iSCSI uses TCP/IP protocol suite to deliver SCSI messages, and Fiber Channel uses Fiber channel to deliver SCSI message. This means that you will have to have network equipment that is Fiber Channel capable, such as Fiber Channel switches, Fiber Channel HBA (similar to TCP/IP NICs), etc. For the purposes of this article I will not go into how Fiber Channel works, or how it does it’s job of delivering SCSI messages two and from SCSI initiators and SCSI targets. This article will step through how to turn a Linux machine into a Fiber channel SCSI Target. There are a few things you will need to even attempt this:

  • A Linux machine running Kernel 3.2+
  • SCST and SCSTAdmin (see below steps)
  • A separate machine that will act as a Fiber channel initiator, this can be another Linux machine, or an ESX host, etc
  • At least two(2) Fiber channel HBA’s with one physical WWN port each installed in both machines
  • A OM2 or 3 Multi-mode Fiber cable with connectors capable of being used with the HBAs
  • Enough disk space to create a Virtual Disk so we may present it as a LUN
  • And lastly, some excitement!! you are about to enter the new world of Fiber Channel!!

Preparing the builds

Identify card Qlogic card

dmesg | grep Fibre dmesg | Fiber

Download firmware and copy to firmware directory

wget http://ldriver.qlogic.com/firmware/ql2400_fw.bin cp ql2400_fw.bin /lib/firmware/
# preferred wget http://ftp.us.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-qlogic_0.36+wheezy.1_all.deb dpkg -i firmware-qlogicf_0.36+wheezy.1_all.deb

Remove the current qla2xxx module

rmmod qla2xxx echo blacklist qla2xxx >/etc/modprobe.d/blacklist-qla2xxx.conf update-initramfs -u reboot

Download dependencies to build scst and Patch the kernel

apt-get install fakeroot kernel-wedge build-essential makedumpfile kernel-package libncurses5 libncurses5-dev gcc libncurses5-dev linux-headers-$(uname -r) lsscsi patch subversion

Get Kernel and SCST Source:

Источник

Читайте также:  Get folder permissions linux

Linux fiber channel driver

Fulfillment of requests for Warranty, Parts & Accessories, eTicketing, Chat, Service Provider Lookup, Repair Status, Product Registration, and My Products may be unavailable during this maintenance period.
If you need immediate technical support during this scheduled maintenance you may call your local Customer Engagement Center.
We apologize for any inconveniences this may cause.

Dear Lenovo India Customer,
Due to the rise in COVID-19 cases across the country, different locations have announced varying levels of restrictions. While we shall try our best to deliver service to our usual high standards, these restrictions, along with the necessary safety protocols, could impact our ability to complete your repair.
Additionally, if you are planning to visit a local service centre, we strongly recommend you contact them first and confirm their availability.

PÉRIODE D’ENTRETIEN
15 juillet 2023 2:00 UTC ~ 16 juillet 2023 1:00 UTC
L’utilisation des fonctions suivantes pourrait être affectée pendant cette période: l’accès à l’information sur la garantie de votre appareil, la recherche de pièces et d’accessoires, la soumission de demande de service, le clavardage, la recherche de centre de service, l’état d’une réparation en cours, le téléchargement de logiciels et systèmes d’exploitation, certaines options de communications, l’enregistrement de produits et l’accès à votre liste de produits dans votre profil Lenovo.

Pour de l’assistance technique immédiate, prière de nous joindre par téléphone.
Nous sommes désolés de tout inconvénient que cette période d’entretien pourrait vous causer.

예정된 웹 사이트 유지 보수
기간 : 2023년 7월 15일 2:00 UTC ~ 2023년 7월 16일 1:00 UTC
보증, 부품, 액세서리 주문, 전자 티켓, 서비스 조회 (상업), 수리 상태, 제품 등록,이 유지 보수 기간 동안 내 제품을 사용하지 못할 수 있습니다.
불편을 드려 죄송합니다.

官網維護通知
維護時間自2023年7月15日 2:00 UTC ~ 2023年7月16日 1:00 UTC
官網維護期間,產品序號及保固查詢功能將暫停使用
受影響範圍包含:保固資訊查詢,下載應用程式,系統還原服務以及聯繫方式查詢
如果您需要技術支援服務,請於正常服務時間使用Lenovo Line Chat服務 (官方帳號請搜尋 :Lenovo 台灣客服或搜尋ID:@lenovo_service_tw) 取得線上即時支援服務
官網維護期間照成您的不便,敬請見諒

MANUTENÇÃO PROGRAMADA DO SITE
DO DIA 15/7/23 ÀS 2AM (UTC) ATÉ O DIA 16/7/23 ÀS 1AM (UTC).
O atendimento para solicitações de garantia, peças e acessórios, eTicketing, chat, status de reparo, registro de produto e afins pode não estar disponível durante este período de manutenção. Se você precisar de suporte técnico imediato durante essa manutenção programada, acesse nosso canal no You Tube: Lenovo Suporte. Pedimos desculpas pela inconveniência.

Читайте также:  Astra linux tcpdump deb

El cumplimiento de las solicitudes de garantía, piezas y accesorios, emisión de tickets electrónicos, chat, búsqueda de proveedores de servicios, estado de reparación, registro de productos y Mis productos puede no estar disponible durante este período de mantenimiento.
Si necesitas soporte técnico inmediato durante este mantenimiento programado, puedes llamar a nuestro Contact Center.
Pedimos disculpas por cualquier inconveniente que esto pueda causar

MANUTENZIONE PROGRAMMATA DEL SITO
15 luglio 2023 2:00 UTC ~ 16 luglio 2023 1:00 UTC
Le funzioni di Garanzia, Ricambi & Accessori, eTicketing, Chat, Stato di Riparazione, Registrazione del Prodotto e accessi ai Miei Prodotti potrebbero non essere disponibili durante questo periodo di manutenzione.
Se hai bisogno di supporto tecnico immediato durante questa manutenzione programmata, puoi chiamare il Centro di Assistenza locale.
Ci scusiamo per eventuali disagi.

(Standard) GEPLANTE STANDORTWARTUNG
15. Juli 2023 2:00 UTC ~ 16. Juli 2023 1:00 UTC
Die Erfüllung von Anfragen bezüglich Garantie, Teile und Zubehör, eTicketing, Chat, Dienstleistersuche, Reparaturstatus, Produktregistrierung und Meine Produkte wird während dieses Wartungszeitraums möglicherweise nicht verfügbar sein.
Wenn Sie während dieser geplanten Wartung sofortigen technischen Support benötigen, können Sie Ihr lokales Kundenkontaktcenter anrufen.
Wir entschuldigen uns für eventuelle Unannehmlichkeiten, die dadurch entstehen können.

Источник

How to check Fibre Channel HBAs in Linux

Fibre Channel (FC) Host Bus Adapters (HBA) are interface cards that connects the host system to a fibre channel network or devices. The two major manufacturers of FC HBAs are QLogic and Emulex and the drivers for many HBAs are distributed in-box with the Operating Systems. If the drivers are not available on your Linux version, you need to install them manually and load the modules in kernel

Here is a step by step guide to verify that your FC HBAs installed and configured correctly.

Step-1: Determine the Manufacturer and Model of the HBAs.

# lspci | grep "Fibre Channel" 07:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02) 0a:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02) 

The above output shows the system bus has detected two QLogic HBAs.

Читайте также:  Linux find files bigger than

Step-2: Get the Vendor and Device IDs for the HBAs installed.

# vi /usr/share/hwdata/pci.ids . 1077 QLogic Corp. 2532 ISP2532-based 8Gb Fibre Channel to PCI Express HBA . 

The vendor id for QLogic is 1077 and the device id is 2532. You could confirm this using the lspci -nn command as shown below

# lspci -nn | grep "Fibre Channel" 07:00.0 Fibre Channel [0c04]: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA [1077:2532] (rev 02) 0a:00.0 Fibre Channel [0c04]: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA [1077:2532] (rev 02) 

Step-3: Check if the driver modules are installed.

This can be done by searching the list of available modules. (Replace 2.6.18-308.el5PAE with your kernel version in the command below)

# grep 1077 /lib/modules/2.6.18-308.el5PAE/modules.* | grep 2532 /lib/modules/2.6.18-308.el5PAE/modules.alias:alias pci:v00001077d00002532sv*sd*bc*sc*i* qla2xxx /lib/modules/2.6.18-308.el5PAE/modules.pcimap:qla2xxx 0x00001077 0x00002532 0xffffffff 0xffffffff 0x00000000 0x00000000 0x0 

The above output shows that this HBA is supported by the module qla2xxx

Step-4: Check if the drivers for these HBAs are loaded in the kernel.

# lsmod | grep qla2xxx qla2xxx 1205905 0 scsi_transport_fc 44745 1 qla2xxx scsi_mod 144277 16 be2iscsi, ib_iser, iscsi_tcp, bnx2i, libcxgbi, libiscsi2, scsi_transport_iscsi2, scsi_dh, sr_mod, sg, usb_storage, qla2xxx, scsi_transport_fc, libata,cciss, sd_mod 

The output shows the module qla2xxx is loaded by the kernel. If you don’t see any output for lsmod command then you can load the module using modprobe command

Step-5: Getting detailed information

You can find detailed information about the fibre channel adapters in the location /sys/class/fc_host/

# ll /sys/class/fc_host/ drwxr-xr-x 3 root root 0 Feb 5 11:28 host3 drwxr-xr-x 3 root root 0 Feb 5 11:28 host4 

The directories host3 and host4 in the example above contains information specific to each adapter like node name (WWN), port name (WWN), type, speed,state etc.,

An easier way to get this information is to use the systool command.

# systool -c fc_host Class = "fc_host" Class Device = "host3" Device = "host3" Class Device = "host4" Device = "host4" 
# systool -c fc_host -v host3 Class = "fc_host" Class Device = "host3" Class Device path = "/sys/class/fc_host/host3" fabric_name = "0x50014380272531e9" issue_lip = node_name = "0x50014380281412e9" port_id = "0x0000e8" port_name = "0x50014380281412e8" port_state = "Online" port_type = "LPort (private loop)" speed = "8 Gbit" supported_classes = "Class 3" supported_speeds = "1 Gbit, 2 Gbit, 4 Gbit, 8 Gbit" symbolic_name = "HPAK344A FW:v5.06.03 DVR:v8.03.07.09.05.08-k" system_hostname = "" tgtid_bind_type = "wwpn (World Wide Port Name)" uevent = Device = "host3" Device path = "/sys/devices/pci0000:00/0000:00:01.0/0000:07:00.0/host3" edc = fw_dump = nvram = "ISP " optrom_ctl = optrom = reset = sfp = "" uevent = vpd = "&" 

Источник

Оцените статью
Adblock
detector