KGPSA-CA PCI Fibre Channel adapter

Table of Contents


General description

CHARON-AXP supports emulation of DEC-KGPSA-CA PCI Fibre Channel adapter.

Every instance of KGPSA-CA works in one of the two following modes:

Loading KGPSA storage adapter

Syntax for loading KGPSA-CA storage adapter:

load KGPSA <name>

Example:

load KGPSA FGA


In AlphaStation 400 configuration use the following syntax for KGPSA-CA storage adapter loading:

load KGPSA FGA irq_bus=isa

The adapter instance name ("FGA" in the example above) is used then for parametrization, for example:

set FGA container[100]="/my_disks/vms_distributive.vdisk"

Numbers in the square brackets represent KGPSA-CA units. They can be in the range 0..32766, but no more than 255 units can be configured on a single controller.

By default KGPSA-CA adapter uses first available PCI slot. If instead some particular slot is needed, refer to this section for details of specific placement of PCI peripherals on CHARON-AXP PCI bus.


Configuration parameters

The KGPSA-CA PCI FC adapter emulation has the following configuration parameters:

host_bus_location

Parameterhost_bus_location
TypeText String
Value

(warning) Pass Through mode only !

Establish connection between virtual DEC-KGPSA-CA PCI FC adapter and physical EMULEX LightPulse PCI/PCI-X/PCIe FC adapter (Pass Through mode)

Syntax:

load KGPSA <controller name> host_bus_location="/dev/kgpsa<X>"

Example:

load KGPSA FGA host_bus_location="/dev/kgpsa0"


wwid

Parameter

wwid[N]

N is 0..32766 (no more than 255 units)

TypeText String
Value

Sets WWID for emulated KGPSA adapter unit.

Syntax:

set <controller name> wwid[unit-number]="XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX-XXXX"

Example:

set FGA wwid[2]="6008-05F3-0005-2950-BF8E-0B86-A0C7-0001"


container

Parameter

container[N]

N is 0..32766 (no more than 255 units)

Type

Text String

Value

Possible values of the parameter are strings in one of the following forms:

  • Physical disk
    • "/dev/sd<L>", where "L" is letter, for example "/dev/sdb"
    • "/dev/disk/by-id/..." - addressing by the disk ID, for example "/dev/disk/by-id/ata-ST1000DM003-9YN162_S1D01QJ4"
    • "/dev/disk/by-label/..." - addressing by the disk label, for example "/dev/disk/by-label/MyStorage"
    • "/dev/disk/by-uuid/..." - addressing by the disk UUID, for example "/dev/disk/by-uuid/0e808a2f-cdd3-4944-a245-f729ffd73882"
      (warning) Please note that existing data on such a disk may be destroyed, depending on how it is used in the emulator.

      "/dev/sd<L>" addressing is not persistent, so it is strongly recommended to use "/dev/disk/by-id/wwn-*" syntax instead to refer the disk by its WWID - especially in the enviroments utilizing FC and SAN storages.

      These disks must not be formatted by the host OS.

      Example:

      set FGA container[0]="/dev/disk/by-id/ata-ST1000DM003-9YN162_S1D01QJ4"

      It is also possible to use not a whole disk, but previously created partitions on it. In this case the syntax is the following: "/dev/sd<L><N>" where N is the number of partition to be used.

      Example:

      set FGA container[0]="/dev/sdc3"
  • Loop (virtual block) devices
    • "/dev/loop<N>"
      Example:

      set FGA container[100]="/dev/loop0"

  • Multipath disk
    • "/dev/dm-<N>"
    • "/dev/mapper/mpath<N>"
    • "/dev/mapper/disk<N>"
      (warning) Be careful not to destroy all the information from the disk dedicated to CHARON-AXP by mistake.  

      These disks must not be formatted by the host OS.

      Example:

      set FGA container[200]="/dev/dm-0"

  • File representing a physical disk of the HP Alpha system (disk image)
    • [<drive>":\"<path-name>”\”]<file-name>[“.vdisk”]
      These files can be created from scratch with "mkdskcmd" utility. Data and OS disk backups are transferred from the original system via tapes or network and restored into these container files. 

      Mapping may also include the full path (recommended), for example: "/my_disks/my_boot_disk.vdisk"

      Example:

      set FGA container[401]="my_dka401.vdisk"

This parameter is initially not set, thus creating NO storage elements on the controller.



media_type

Parameter

media_type[N]

N is 0..32766 (no more than 255 units)

Type

Text String

Value

Instructs CHARON-AXP to use the supplied value as the PRODUCT field in the FC INQUIRY data returned to a software running on virtual HP Alpha system in response to FC INQUIRY command.

If not specified, CHARON-AXP attempts to guess the FC INQUIRY data based on virtual FC device type and underlying container (which is specified in the corresponding container configuration parameter).

Initially is not specified.

Example:

set FGA media_type[0]="HSZ70"

removable

Parameter

removable[N]

N is 0..32766 (no more than 255 units)

TypeBoolean
Value

When set to "true", the removable configuration parameter instructs CHARON-AXP to report the corresponding virtual FC device as removable.

By default the removable configuration parameter is set to "false".

Example:

set FGA removable[400]=true


geometry

Parameter

geometry[N]

N is 0..32766 (no more than 255 units)

Type

Text String

Value

This formatted string value specifies the explicit geometry of the disk storage element.

The string format is <X>”/”<Y>[“/”<Z>] or <X>”,”<Y>[“,”<Z>][“,”<B>] where:

  • X corresponds to the number of sectors per track
  • Y corresponds to the number of tracks per cylinder
  • Z corresponds the number of cylinders on the unit. If omitted, Z is calculated based on X, Y and the total number of sectors on the unit that reflects the size of the disk storage element. This is an optional parameter.
  • B corresponds to the total size of the disk (in blocks) reported to the guest OS. If omitted it is calculated automatically. This is an optional parameter.

If this parameter is not set, CHARON-AXP will configure the geometry based on the most probable disk type.

Initially not set.

Example:

set FGA geometry[201] = "255/255"

(info) It is possible to specify each parameter independently of another one. The following syntax is used for that:  set FGA geometry[300]="*,*,*,16777210"

use_io_file_buffering

Parameter

use_io_file_buffering[N]

N is 0..32766 (no more than 255 units)

Type

Boolean

Value

When set to "true", instructs CHARON-AXP to enable host operating system I/O cache on read/write operations.

(info) Note that this caching has a significant effect only in case of mapping to disk containers, not physical drives. 

When enabled, host operating system I/O cache may significantly improve I/O performance of the virtual system. At the same time maintaining I/O cache requires additional host resources (CPU and memory) which may negatively affect overall performance of the virtual system.

Initially is set to "false".

Example:

set FGA use_io_file_buffering[300]=true


io_queue_depth

Parameter

io_queue_depth[N]

N is 0..32766 (no more than 255 units)

TypeNumeric
Value

Specifies KGPSA I/O requests (read or write) for a given unit in a range 2..128

Setting this parameter enables KGPSA instance to run up-to the specified numbers of I/O requests (read or write) for unit N in parallel, thus improving the performance.

The default value set by controller is optimal for most of the cases. It may be needed to enlarge this number if guest OS I/O queue for a certain unit contains too much pending entries. In this case the value should be equal to an average size of the queue, collected statistically.

Please do not set this parameter without clear understanding of the purpose.

By default parallel execution of I/O requests is disabled.

Example:

set FGA io_queue_depth[603]=4

min_n_of_threads

Parameter

min_n_of_threads

TypeNumeric
Value

Instructs KGPSA I/O to reserve a given number of working threads in a range 1..64, thus improving the performance.

All units of KGPSA instance share the I/O threads.

The default value is equal to number of units plus 2.

For optimization it is possible to set this parameter to sum of the "io_queue_depth" parameters for each unit plus 2. This assumption seems optimal for most of the cases.

Please do not set this parameter without clear understanding the purpose.

Example:

set FGA min_n_of_threads=16

When a disk image connected to an emulated KGPSA-CA controller is dismounted by OpenVMS, it is disconnected from CHARON-AXP and can be manipulated. It can be replaced with a different disk image if it keeps the same name. This capability may be useful when designing back-up and restore procedures. When copying CHARON-AXP disk images while CHARON-AXP is running, please take care to minimize the risk of overloading a heavily loaded CHARON-AXP host system. For example, using a sequential series of simple ftp binary copies is less resource intensive and thus less disruptive than multiple, simultaneous copies.

Empty disk images are created with the "mkdskcmd" utility.

CHARON-AXP is able to boot from disk images of any OpenVMS/Alpha and Tru64 version.


Mapping to host resources

Fabric virtualization mode

In this mode KGPSA-CA PCI FC adapter can be directly mapped to physical disks (both local and iSCSI) and disk images as shown in the following example:

set FGA container[0]="/my_disks/my_dka401.vdisk"
set FGA container[100]="/dev/sdb"
set FGA container[200]="/dev/sdc2"
set FGA container[300]="/dev/dm-0"

See the "Configuration parameters" section for details.

Pass Through mode

The CHARON PCI Pass Through mode allows connection between virtual DEC-KGPSA-CA PCI FC adapter and physical EMULEX LightPulse PCI/PCI-X/PCIe FC adapter plugged into host’s PCI/PCI-X/PCIe slot.

Syntax:

load <controller name> host_bus_location="/dev/kgpsa<N>"

Example:

load KGPSA FGA host_bus_location="/dev/kgpsa0"

The following is a list of EMULEX LightPulse PCI/PCI-X/PCIe FC adapters supported by CHARON-AXP PCI Pass Through driver and suitable for emulation of KGPSA-CA PCI FC adapter in CHARON PCI Pass Through mode:

Supported
Not Supported
Not tested

LP8000
LP9000
LP9002
LP9802
LP10000
LP10000DC
LP10000-S
LPX1000
LP11002
LPe11002 (FC2242SR, A8003A)
LPe1105
LPe12002 (AJ762B)

LPe1150 (FC2142SR, A8002A)LPe11000


Pass Through mode establishing sequence

To establish "pass through" mode do the following:

  1. Install the EMULEX LightPulse PCI/PCI-X/PCIe FC adapter (see above for a list of supported models) to some spare PCI/PCI-X/PCIe slot of the host system
  2. Build PPT driver for EMULEX LightPulse PCI/PCI-X/PCIe FC
  3. Install PPT driver for EMULEX LightPulse PCI/PCI-X/PCIe FC
  4. Add PPT driver for EMULEX LightPulse PCI/PCI-X/PCIe FC to Linux startup
  5. Map KGPSA-CA adapter(-s) to EMULEX LightPulse PCI/PCI-X/PCIe FC adapter instance(-s) in CHARON-AXP configuration file

If kernel of the host system has been upgraded or reinstalled all the steps of the PPT KGPSA driver installation must be repeated

Building PPT driver for EMULEX LightPulse PCI/PCI-X/PCIe FC

To build PPT driver for EMULEX LightPulse PCI/PCI-X/PCIe FC do the following:

StepDescription
1

Make sure that the required building tools and include files are installed. If they are absent install them:

yum groupinstall "Development Tools"

yum install kernel kernel-headers kernel-devel

The kernel version must match the version of the installed kernel-headers (i.e. this packages must have same versions. It can be verified via "rpm -q -a | grep kernel-" )

Check that the "kernel", the "kernel-devel" and the "kernel-headers" have the same version, and ensure that system is booted from this kernel version (not from some older one and etc) with "uname -a" command.

2

Open xterm and change the default directory to "/opt/charon/drivers/kgpsa":

cd /opt/charon/drivers/kgpsa

3

Issue "make clean; make" commands to build kernel object:

make clean; make

(warning) It is prohibited to use a module built on a certain version of kernel on another one.

4Check that there are no compilation errors and the file "ppt_kgpsa.ko" has been built


Installation of PPT driver for EMULEX LightPulse PCI/PCI-X/PCIe FC

To install PPT driver for EMULEX LightPulse PCI/PCI-X/PCIe FC do the following:

StepDescription
1

Unload standard "lpfc" driver; to do that issue the following command:

rmmod lpfc

2

Load "ppt_kgpsa.ko" driver; to do that issue the following command:

insmod ppt_kgpsa.ko

3

Issue "dmesg" command and check that no error appeared during the driver loading, also check that the driver has found all KGPSA devices.

Example:

dmesg | grep KGPSA; ls -la /dev/kgpsa*
Found KGPSA with VENDOR_ID=10DF DEVICE_ID=FE00
Found KGPSA with VENDOR_ID=10DF DEVICE_ID=FE00
crw-------. 1 root root 240, 0 Nov 28 17:47 /dev/kgpsa0
crw-------. 1 root root 240, 1 Nov 28 17:47 /dev/kgpsa1

Adding PPT driver for EMULEX LightPulse PCI/PCI-X/PCIe FC to Linux startup

To add PPT driver for EMULEX LightPulse PCI/PCI-X/PCIe FC to Linux startup do the following:

StepDescription
1Disable auto-loading of Linux standard "lpfc" driver on boot. To do that add "blacklist lpfc" to the black list file "/etc/modprobe.d/blacklist.conf"
2

Copy the KGPSA-CA kernel module to the location of Linux kernel modules, for example:

cp /opt/charon/drivers/kgpsa/ppt_kgpsa.ko /lib/modules/3.10.9-200.fc20.x86_64/kernel/drivers/scsi/

(warning) The particular path may be different, depending on the kernel version and Linux distribution.

3

Enable auto load of the module:

echo ppt_kgpsa > /etc/modules-load.d/ppt_kgpsa.conf

4

Regenerate new "initramfs" image with "mkinitrd":

mkinitrd -f /boot/initramfs-3.10.9-200.fc20.x86_64.img 3.10.9-200.fc20.x86_64

(warning) The particular path may be different, depending on the kernel version and Linux distribution.

Configuration of KGPSA-CA in pass through mode

FCMGR utility description

To configure KGPSA-CA adapter in pass through mode a special SRM console utility "FCMGR" is used (it has the same functionality as the "WWIDMGR" utility of the native HP Alpha hardware).


It provides the following functionality:

CommandDescription

fc rescan {/verbose} 

Scans connected SAN using FC adapters, discovers FC ports, storage controllers, logical units and then builds volatile FC database.

The "/verbose" qualifier enables FC communication trace on console (for diagnostic and troubleshooting).

fc show {adapter | port | device} 

Displays corresponding part of volatile FC database.

fc set {boot | dump} udid <X> 

Fills the environment variables wwid0..wwid3 and n1..n4 to identify path(s) to logical unit with the specified UDID.

These variables are later used by "INIT" to create device database entries and by OpenVMS/Tru64 to get access to boot and dump disks.

This command does NOT make any change to other environment variables.

fc set {boot | dump} wwid <X>

Fills the environment variables wwid0..wwid3 and n1..n4 to identify path(s) to logical unit with the specified WWID. 

These variables are later used by "INIT" to create device database entries and by OpenVMS/Tru64 to get access to boot and dump disks.

This command does NOT make any change to other environment variables.

This parameter is useful if UDID is absent.

Only right part of the displayed WWID is used for specification, for example:

P00>>>fc res
polling for units on kgpsa0, slot 2, bus 0, hose 0 ...
    pga0.0.0.2.0                 PGA0          F/W Rev 2.72A2
                                               WWN 1000-0000-0263-0040
           fabric                              WWN 2003-0060-0263-0040
                directory                      WWN 20fc-0060-0263-0040
                port 020100                    CED 8GSH 0 F88V
                                               WWN 5000-1fe0-0000-0bf1
                  lun 0000000000000000         DEC HSG80CCL V88F
             UDID:-1                 WWID:01000010:6000-1fe0-0000-0bf0-3030-3030-373f-3f3f
                  lun 0000000000000100         COMPAQ RZ1ED 0000
             UDID:-1                 WWID:01000010:6000-1fe0-0000-0bf0-3030-3030-3030-3030
P00>>>fc set boot wwid 6000-1fe0-0000-0bf0-3030-3030-3030-3030

fc clear

Clears environment variables wwid0..wwid3 and n1..n4, which automatically disable (but do NOT delete) device database entries representing FC attached devices.

This command does NOT affect volatile FC database.

Example of usage:

P00>>>fc show devices
     UDID:110 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0081 (ev:none)
                                               via adapter     via fc_port         con
[0]                   pga0.0.0.5.1    5000-1fe1-000b-6bf1 yes (ev:none)
[1]                   pga0.0.0.5.1    5000-1fe1-000b-6bf4 yes (ev:none)
     UDID:108 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0039 (ev:none)
                                               via adapter     via fc_port         con
[12]                  pga0.0.0.5.1    5000-1fe1-000b-6bf1 yes (ev:none)
[13]                  pga0.0.0.5.1    5000-1fe1-000b-6bf4 yes (ev:none)


Configuration steps using FCMGR utility

Once the configuration steps described above are done, start the CHARON VM and wait for the P00>>> prompt.

Please refer to the following example with two FC adapters PGA and PGB defined:

initializing ...

polling for units on kzpba0, slot 4, bus 0, hose 0 ...
   pka0.0.0.4.0         PKA0            Q-Logic/ISP PCI SCSI HBA

polling for units on kgpsa0, slot 5, bus 0, hose 0 ...
   pga0.0.0.5.0         PGA0            WWN 1000-0000-C92E-97C9
      fabric                            WWN 2003-0060-6920-4682
         directory                      WWN 20fc-0060-6920-4682
         port 021400                    WWN 5000-1fe1-000b-6bf1
            lun 0000000000000100        DEC     HSG80           V88F
         UDID:100       WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0038
            lun 0000000000000200        DEC     HSG80           V88F
         UDID:200       WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0074
            lun 0000000000000300        DEC     HSG80           V88F
         UDID:300       WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-007b
            lun 0000000000000400        DEC     HSG80           V88F
         UDID:400       WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0080
            lun 0000000000006c00        DEC     HSG80           V88F
         UDID:108       WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0039
            lun 0000000000006d00        DEC     HSG80           V88F
         UDID:208       WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-003a
            lun 0000000000000000

         port 021500                    WWN 5000-1fe1-000b-6bf4
            lun 0000000000000100        DEC     HSG80           V88F
         UDID:100       WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0038
            lun 0000000000000200        DEC     HSG80           V88F
         UDID:200       WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0074
            lun 0000000000000300        DEC     HSG80           V88F
         UDID:300 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-007b
            lun 0000000000000400        DEC     HSG80           V88F
         UDID:400 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0080
            lun 0000000000006c00        DEC     HSG80           V88F
         UDID:108 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0039
            lun 0000000000006d00        DEC     HSG80           V88F
         UDID:208 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-003a
            lun 0000000000000000

polling for units on kgpsa1, slot 6, bus 0, hose 0 ...
   pgb0.0.0.6.0         PGB0            WWN 1000-0000-C92D-8D00
      fabric                            WWN 2003-0060-6920-45ff
         directory                      WWN 20fc-0060-6920-45ff
         port 011400                    WWN 5000-1fe1-000b-6bf2
            lun 0000000000000100        DEC     HSG80           V88F
         UDID:100 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0038
            lun 0000000000000200        DEC     HSG80           V88F
         UDID:200 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0074
            lun 0000000000000300        DEC     HSG80           V88F
         UDID:300 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-007b
            lun 0000000000000400        DEC     HSG80           V88F
         UDID:400 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0080
            lun 0000000000006c00        DEC     HSG80           V88F
         UDID:108 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0039
            lun 0000000000006d00        DEC     HSG80           V88F
         UDID:208 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-003a
            lun 0000000000000000
         port 011500                    WWN 5000-1fe1-000b-6bf3
            lun 0000000000000100        DEC     HSG80           V88F
         UDID:100 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0038
            lun 0000000000000200        DEC     HSG80           V88F
         UDID:200 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0074
            lun 0000000000000300        DEC     HSG80           V88F
         UDID:300 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-007b
            lun 0000000000000400        DEC     HSG80           V88F
         UDID:400 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0080
            lun 0000000000006c00        DEC     HSG80           V88F
         UDID:108 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0039
            lun 0000000000006d00        DEC     HSG80           V88F
         UDID:208 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-003a
            lun 0000000000000000
         port 011100                    failed port login

... enter console

CHARON-AXP (AlphaServer ES40) emulator. Version 4.11
Copyright (C) 2020, STROMASYS (www.stromasys.com)

P00>>>


The next step is to configure paths for the FC storage:

P00>>>fc show devices

     UDID:100 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0038 (ev:none)
                        via adapter     via fc_port         con
[0]                     pga0.0.0.5.0    5000-1fe1-000b-6bf1 no (ev:none)
[1]                     pga0.0.0.5.0    5000-1fe1-000b-6bf4 yes (ev:none)
[2]                     pgb0.0.0.6.0    5000-1fe1-000b-6bf2 no (ev:none)
[3]                     pgb0.0.0.6.0    5000-1fe1-000b-6bf3 yes (ev:none)
     UDID:200 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0074 (ev:none)
                        via adapter     via fc_port         con
[4]                     pga0.0.0.5.0    5000-1fe1-000b-6bf1 no (ev:none)
[5]                     pga0.0.0.5.0    5000-1fe1-000b-6bf4 yes (ev:none)
[6]                     pgb0.0.0.6.0    5000-1fe1-000b-6bf2 no (ev:none)
[7]                     pgb0.0.0.6.0    5000-1fe1-000b-6bf3 yes (ev:none)
     UDID:300 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-007b (ev:none)
                        via adapter     via fc_port         con
[8]                     pga0.0.0.5.0    5000-1fe1-000b-6bf1 no (ev:none)
[9]                     pga0.0.0.5.0    5000-1fe1-000b-6bf4 yes (ev:none)
[10]                    pgb0.0.0.6.0    5000-1fe1-000b-6bf2 no (ev:none)
[11]                    pgb0.0.0.6.0    5000-1fe1-000b-6bf3 yes (ev:none)
     UDID:400 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0080 (ev:none)
                        via adapter     via fc_port         con
[12]                    pga0.0.0.5.0    5000-1fe1-000b-6bf1 no (ev:none)
[13]                    pga0.0.0.5.0    5000-1fe1-000b-6bf4 yes (ev:none)
[14]                    pgb0.0.0.6.0    5000-1fe1-000b-6bf2 no (ev:none)
[15]                    pgb0.0.0.6.0    5000-1fe1-000b-6bf3 yes (ev:none)
     UDID:108 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0039 (ev:none)
                        via adapter     via fc_port         con
[16]                    pga0.0.0.5.0    5000-1fe1-000b-6bf1 yes (ev:none)
[17]                    pga0.0.0.5.0    5000-1fe1-000b-6bf4 no (ev:none)
[18]                    pgb0.0.0.6.0    5000-1fe1-000b-6bf2 yes (ev:none)
[19]                    pgb0.0.0.6.0    5000-1fe1-000b-6bf3 no (ev:none)
     UDID:208 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-003a (ev:none)
                        via adapter     via fc_port         con
[20]                    pga0.0.0.5.0    5000-1fe1-000b-6bf1 yes (ev:none)
[21]                    pga0.0.0.5.0    5000-1fe1-000b-6bf4 no (ev:none)
[22]                    pgb0.0.0.6.0    5000-1fe1-000b-6bf2 yes (ev:none)
[23]                    pgb0.0.0.6.0    5000-1fe1-000b-6bf3 no (ev:none)

P00>>>fc set boot udid 400

P00>>>INIT

initializing ...

polling for units on kzpba0, slot 4, bus 0, hose 0 ...
   pka0.0.0.4.0         PKA0            Q-Logic/ISP PCI SCSI HBA

polling for units on kgpsa0, slot 5, bus 0, hose 0 ...
   pga0.0.0.5.0         PGA0            WWN 1000-0000-C92E-97C9
      fabric                            WWN 2003-0060-6920-4682
         directory                      WWN 20fc-0060-6920-4682
         port 021400                    WWN 5000-1fe1-000b-6bf1
            lun 0000000000000100        DEC     HSG80           V88F
         UDID:100       WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0038
            lun 0000000000000200        DEC     HSG80           V88F
         UDID:200       WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0074
            lun 0000000000000300        DEC     HSG80           V88F
         UDID:300       WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-007b
            lun 0000000000000400        DEC     HSG80           V88F
         UDID:400       WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0080
            lun 0000000000006c00        DEC     HSG80           V88F
         UDID:108       WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0039
            lun 0000000000006d00        DEC     HSG80           V88F
         UDID:208       WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-003a
            lun 0000000000000000
         port 021500                    WWN 5000-1fe1-000b-6bf4
            lun 0000000000000100        DEC     HSG80           V88F
         UDID:100       WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0038
            lun 0000000000000200        DEC     HSG80           V88F
         UDID:200       WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0074
            lun 0000000000000300        DEC     HSG80           V88F
         UDID:300 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-007b
            lun 0000000000000400        DEC     HSG80           V88F
         UDID:400 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0080
            lun 0000000000006c00        DEC     HSG80           V88F
         UDID:108 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0039
            lun 0000000000006d00        DEC     HSG80           V88F
         UDID:208 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-003a
            lun 0000000000000000

polling for units on kgpsa1, slot 6, bus 0, hose 0 ...
   pgb0.0.0.6.0         PGB0            WWN 1000-0000-C92D-8D00
      fabric                            WWN 2003-0060-6920-45ff
         directory                      WWN 20fc-0060-6920-45ff
         port 011400                    WWN 5000-1fe1-000b-6bf2
            lun 0000000000000100        DEC     HSG80           V88F
         UDID:100 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0038
            lun 0000000000000200        DEC     HSG80           V88F
         UDID:200 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0074
            lun 0000000000000300        DEC     HSG80           V88F
         UDID:300 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-007b
            lun 0000000000000400        DEC     HSG80           V88F
         UDID:400 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0080
            lun 0000000000006c00        DEC     HSG80           V88F
         UDID:108 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0039
            lun 0000000000006d00        DEC     HSG80           V88F
         UDID:208 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-003a
            lun 0000000000000000
         port 011500                    WWN 5000-1fe1-000b-6bf3
            lun 0000000000000100        DEC     HSG80           V88F
         UDID:100 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0038
            lun 0000000000000200        DEC     HSG80           V88F
         UDID:200 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0074
            lun 0000000000000300        DEC     HSG80           V88F
         UDID:300 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-007b
            lun 0000000000000400        DEC     HSG80           V88F
         UDID:400 WWID:01000010:6000-1fe1-000b-6bf0-0009-9081-1283-0080
            lun 0000000000006c00        DEC     HSG80           V88F
         UDID:108 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-0039
            lun 0000000000006d00        DEC     HSG80           V88F
         UDID:208 WWID:01000010:6000-1fe1-000b-6bf0-0009-0440-4014-003a
            lun 0000000000000000
         port 011100                    failed port login

... enter console

CHARON-AXP (AlphaServer ES40) emulator. Version 4.11
Copyright (C) 2020, STROMASYS (www.stromasys.com)

P00>>>SHOW DEV

sys0.0.0.0.0            SYS0          System ROOT Device
ewa0.0.0.3.0            EWA0          00-51-71-F5-8E-D8
pka0.0.0.4.0            PKA0          Q-Logic/ISP PCI SCSI HBA
pga0.0.0.5.0            PGA0          WWN 1000-0000-C92E-97C9
pgb0.0.0.6.0            PGB0          WWN 1000-0000-C92D-8D00
pqa0.0.0.15.0           PQA0          ALi 1553C Integrated IDE Controller
pqb0.0.1.15.0           PQB0          ALi 1553C Integrated IDE Controller
dqa0.0.0.15.0           DQA0          Virtual ATAPI - TEAC DW-224E-V
dka0.0.0.4.0            DKA0          Virtual SCSI Disk (C)SRI
dga400.1001.0.5.0       $1$DGA400     DEC     HSG80           V88F
dga400.1002.0.5.0       $1$DGA400     DEC     HSG80           V88F
dgb400.1003.0.6.0       $1$DGA400     DEC     HSG80           V88F
dgb400.1004.0.6.0       $1$DGA400     DEC     HSG80           V88F

P00>>>BOOT $1$DGA400

dga400.1001.0.5.0: failed to open device
(boot dga400.1002.0.5.0)
jumping to bootstrap code

    OpenVMS (TM) Alpha Operating System, Version V7.3-2
      © Copyright 1976-2003 Hewlett-Packard Development Company, L.P.
%SMP-I-CPUTRN, CPU #02 has joined the active set.
%SMP-I-CPUTRN, CPU #03 has joined the active set.
%SMP-I-CPUTRN, CPU #01 has joined the active set.
Please enter date and time (DD-MMM-YYYY HH:MM)

Fabric presentation mode

The CHARON-AXP FC Fabric presentation mode allows to use Linux FC HBA directly. When using this mode, there is no need to load KGPSA adapter(s) as it was described before. The following syntax has to be used instead:

Example:

load kgpsa_generic_storage PGA interface="host3"

Below please find step-by-step explanation on how to configure "kgpsa_generic_storage" instance.

This mode is available only for CHARON-AXP on RHEL and CentOS 7.x (and later versions) platforms 

FC HBA interfaces finding

First we need to find Linux FC HBA for mapping.

List available adapters

# lspci | grep Fibre
03:00.0 Fibre Channel: Emulex Corporation Lancer-X: LightPulse Fibre Channel
Host Adapter (rev 30)
03:00.1 Fibre Channel: Emulex Corporation Lancer-X: LightPulse Fibre Channel
Host Adapter (rev 30)
0a:04.0 Fibre Channel: Emulex Corporation LP8000 Fibre Channel Host Adapter (rev 02)

So, 2 HBAs, 3 ports are available.


Load HBA's kernel modules (drivers)

# lspci -vvnn -s 03:00.0 | grep modules
        Kernel modules: lpfc

# modprobe -v lpfc

Discover the Linux SCSI hosts the FC HBAs are mapped to

# ll /sys/class/fc_host/
..
lrwxrwxrwx 1 root root 0 &#1086;&#1082;&#1090; 22 14:29 host3 ->
../../devices/pci0000:00/0000:00:01.0/0000:03:00.0/host3/fc_host/host3
lrwxrwxrwx 1 root root 0 &#1086;&#1082;&#1090; 22 14:29 host4 ->
../../devices/pci0000:00/0000:00:01.0/0000:03:00.1/host4/fc_host/host4
lrwxrwxrwx 1 root root 0 &#1086;&#1082;&#1090; 22 14:29 host6 ->
../../devices/pci0000:00/0000:00:1e.0/0000:0a:04.0/host6/fc_host/host6

So, the available ports are mapped to hosts 3, 4 and 6.

Discover the connected FC HBAs (ports)

# lsscsi
..
[2:0:0:0] disk ATA Hitachi HDS72101 A610 /dev/sda
[3:0:0:0] storage HP MSA CONTROLLER 7.20 -
[3:0:0:2] disk HP MSA VOLUME 7.20 /dev/sdb
...
[5:0:0:2] disk Generic- USB3.0 CRW-MS/HG 1.00 /dev/sdi
[6:0:0:0] storage HP MSA CONTROLLER 7.20 -

So the connected hosts are 3 and 6 ("MSA CONTROLLER").

Discover the HBAs port/node names

# cat /sys/class/fc_host/host3/port_name
0x10000090faa00a31
# cat /sys/class/fc_host/host4/port_name
0x10000090faa00a32
# cat /sys/class/fc_host/host6/port_name
0x10000000c923ea51

So the names are:

HostMappingPort name
3

Lancer-X, port 0 ("3:0:0:0")

0x10000090faa00a31
4Lancer-X, port 1 ("3:0:0:1")
0x10000090faa00a32
6

LP8000 single port

0x10000000c923ea51



Charon Configuration

2 ways of specification in Charon configuration file are available:

By port name

Specify Linux port name "0x10000090faa00a31" in Charon configuration file:

load kgpsa_generic_storage PGA interface="0x10000090faa00a31"

The configuration given with port name is independent on hardware change, modules load order, etc

By host id name

load kgpsa_generic_storage PGA interface="fc_host3"

or

load kgpsa_generic_storage PGA interface="host3"

The configuration given with host id name might change on hardware change, modules load order, etc

Configuration parameters

Never use the following parameters (except the "interface") without well defined reason. Most of the parameters are implemented for solving possible problems and tracing at customer sites, so they might harm if not used appropriately.

interface

Name of FC, SCSI host or adapter's port/node name, defining a connection to Linux FC HBA, for example:

MappingDescription
fc_host6

Emulation over Linux SG (FC) host 6

host6
Emulation over Linux SG (FC) host 6
2000-0000-C923-EA51 

Emulation over Linux SG (FC) host given with port/node name

0x20000000C923EA51
Emulation over Linux SG (FC) host given with port/node name
wwn-0x20000000C923EA51
Emulation over Linux SG (FC) host given with port/node name

Example:

load kgpsa_generic_storage PGA interface="host3"


trace_level

 ValueDescription

0

none (default)

1

All failures and suspects

2SCSI, ELS/CT request flow

3

MB/IOCB request flow

Example:

load kgpsa_generic_storage PGA trace_level=1

io_model

I/O model is used for request processing.

This parameter is needed for debugging puproses only, so it is strongly recommended not to specify any value without particular instructions from Stromasys.

 ValueDescription

sync

synchronous

async

asynchronous (default)

Example:

load kgpsa_generic_storage PGA io_model="sync"

port_name

The port name in format: %04x-%04x-%04x-%04x. Option to fake guest's port name.

This parameter is needed for debugging puproses only, so it is strongly recommended not to specify any value without particular instructions from Stromasys.

Example:

load kgpsa_generic_storage PGA port_name=2000-0000-C923-EA51

By default this value is obtained from the specified hardware port (see above).


node_name

The node name in format: %04x-%04x-%04x-%04x. Option to fake guest's node name.

This parameter is needed for debugging puproses only, so it is strongly recommended not to specify any value without particular instructions from Stromasys.

Example:

load kgpsa_generic_storage PGA node_name=2000-0000-C923-EA51

By default this value is obtained from the specified hardware port (see above).

The delay in seconds, port suspend reporting the link up waiting for Linux FC infrastructure creation. Default is 120 seconds.

When FC wire is removed and then plugged in, Linux rebuilds all the FC objects with new devices names, etc. Fabric presentation mode senses the link up and down events, but optionally it may delay reporting the event (for the given amount of seconds) to let Linux fully initialize FC. If delay is 0, guest OS may start initialization too early and thus fail to find some or all objects.

Example:

load kgpsa_generic_storage PGA link_up_delay=80

The link check poill interval in seconds Default is 1 second.

When FC wire is removed and then plugged in, Linux rebuilds all the FC objects with new devices names, etc. Fabric presentation mode senses the link up and down events, but optionally it may delay reporting the event (for the given amount of seconds) to let Linux fully initialize FC. If delay is 0, guest OS may start initialization too early and thus fail to find some or all objects.

Example:

load kgpsa_generic_storage PGA link_poll_period=2

emu_fabric

The way the emulation deals with fabric:

 ValueDescription

auto

Delegates to Linux if supported, otherwise emulates

no

Delegates to Linux (real physical fabric port connected too)
yesEmulates

Qlogic does not map SG devices for ELS/CT traffic. To work around this, Fabric presentation mode implements emulation of the whole non FCP (scsi) communication over fabric. If fabric is emulated, guest OS will not see non FCP target ports (for example initiators) and will not be able to communicate with ELS/CT over fabric.

Example:

load kgpsa_generic_storage PGA emu_fabric="no"


lun_exclude

The list of the LUNs to be excluded. If empty (default), nothing is excluded.
(warning) No multi line is possible for this parameter; the maximum number of symbols inside the double quotes is 255. Use "lun_include" parameter instead if a lot of LUNs must be excluded to specify only the included LUNs.

Example:

load kgpsa_generic_storage PGA lun_exclude="6008-05F3-0005-2950-C758-BCC2-E88B-0007,6008-05F3-0005-2950-8B03-E26B-E231-0005"

lun_exclude parameter cannot exclude storage mapped to LUN 0 because of its special function.

lun_include

The list of the LUNs to be included. If empty (default), all LUNs are included.
(warning) No multi line is possible for this parameter; the maximum number of symbols inside the double quotes is 255. Use "lun_exclude" parameter instead if a lot of LUNs must be included to specify only the excluded LUNs.

Example:

load kgpsa_generic_storage PGA lun_include="6008-05F3-0005-2950-C758-BCC2-E88B-0007,6008-05F3-0005-2950-8B03-E26B-E231-0005"

scsi_version

This approach of FC emulation downgrades all attached devices to the specifically defined version of SCSI. This is done to make legacy guest operating systems happy with attached modern devices.

 Value (ANSI SCSI version)Description

any

Any version

v1

SCSI-1
v2SCSI-2
v3SCSI-3
v3_SPC1SCSI-3, primary command level 1
v3_SPC2SCSI-3, primary command level 2 (default)
v3_SPC3SCSI-3, primary command level 3
v3_SPC4SCSI-3, primary command level 4

(warning) Refer to your guest OS documentation for more details and public resources for general specification of SCSI.

Example:

load kgpsa_generic_storage PGA scsi_version="v3_SPC3"


device_id

A fake device id (if not "lp8000" is needed), the default is "0xF800" ("lp8000").

This parameter is needed for some specific cases only, so it is strongly recommended not to specify any value without particular instructions from Stromasys.

Example:

load kgpsa_generic_storage PGA device_id=0xFA00

vendor_id

A fake vendor id (if not "lp8000" is needed), the default is "0x10DF" ("lp8000").

This parameter is needed for some specific cases only, so it is strongly recommended not to specify any value without particular instructions from Stromasys.

Example:

load kgpsa_generic_storage PGA vendor_id=0x10EA

revision_id

A fake revision id (if not "lp8000" is needed), the default is "0x02" ("lp8000").

This parameter is needed for some specific cases only, so it is strongly recommended not to specify any value without particular instructions from Stromasys.

Example:

load kgpsa_generic_storage PGA revision_id=0x01

scsi_serialize_io

This parameter controls serialization of the SCSI requests.

 ValueDescription

false

Responses delivered to the emulated KGPSA card in order they were submitted to Linux. This is the default value.

true

Responses delivered to the emulated KGPSA card in order they were completed by Linux


This parameter is needed for some specific cases only, so it is strongly recommended not to specify any value without particular instructions from Stromasys.

Example:

load kgpsa_generic_storage PGA scsi_serialize_io = true


scsi_max_queue_depth

This parameter sets limitation of the SCSI queue depth per LUN

 ValueDescription

unlimited

Linux SG I/O applies limitation of 16 I/Os. Requests are submitted unless write to SG I/O fails. This is the default value.

1...16

Only the specified number of the requests are submitted in parallel.


This parameter is needed for some specific cases only, so it is strongly recommended not to specify any value without particular instructions from Stromasys.

Example:

load kgpsa_generic_storage PGA scsi_max_queue_depth = 1



© Stromasys, 1999-2024  - All the information is provided on the best effort basis, and might be changed anytime without notice. Information provided does not mean Stromasys commitment to any features described.