Installing the zfcp HBA API library

6.10 LPAR mode z/VM guest

You need several packages to use the zfcp HBA API library.

Before you begin

To use the HBA API support you need the following packages:
  • libzfcphbaapi-<x>.tar.gz, the zfcp HBA API library. In the library name, <x> represents the newest available version.
  • The libsysfs-2.1 package, a library interface to sysfs.
  • The sg_utils package, a utility for devices that use SCSI commands.
  • The doxygen package, optional for documentation.

About this task

You can build the library using the SNIA library or as a standalone version.

Should you want to build the library using the SNIA library, you need to pass command line option --enable-vendor-lib when running the configure tool.

Should you want to build a stand-alone version you need to pass the command line option --disable-vendor-lib when running the configure tool.

Procedure

Perform the following steps to install the library:

  1. Go to github.com/ibm-s390-linux/libzfcphbaapi.
  2. Obtain the latest zfcp HBA API library version for the Development stream.
  3. Download the source package libzfcphbaapi-<x>.tar.gz.
  4. Compile and install the package:
    # tar xzf libzfcphbaapi-<x>.tar.gz
    # cd libzfcphbaapi-<x>
    # ./configure
    # make
    # make install
  5. Optional: Build and install documentation.
    For this step you require the package doxygen.
    # make dox
    # make install

Results

You have installed:
  • Shared and static versions of libzfcphbaapi at /usr/local/lib.
  • If you built a stand-alone version, the header file hbaapi.h at /usr/local/include.
  • Optionally, the documentation package at /usr/local/share/zfcp-hbaapi-<x>..
If you have built the vendor library with the SNIA library, there are two entry points:
  • HBA_RegisterLibrary, used if SNIA V1 was installed.
  • HBA_RegisterLibraryV2, used if SNIA V2 was installed.
The SNIA library expects a configuration file called /etc/hba.conf that contains the path to the vendor-specific library with the actual implementation. A client application needs to issue the HBA_LoadLibrary() call as the first call to load the vendor-specific library. The vendor-specific library, in turn, must supply the function HBA_RegisterLibrary that returns all function pointers to the wrapper library and thus makes them available to the application.
Note: The exact contents of the library depends on the version, see API provided by the zfcp HBA API support.