libzfcphbaapi(3)

πŸ’– libzfcphbaapi β€” an implementation of FC-HBA πŸ’–

okay bestie, sit down, hydrate, because we're about to talk about a library and she is lowkey iconic. this is the manual for libzfcphbaapi(3), from the Library Functions Manual, and yes she's giving very much "i live in section 3 of your man pages" energy. 🌸


✨ NAME ✨

libzfcphbaapi β€” an implementation of FC-HBA πŸ¦‹


✨ SYNOPSIS ✨

#include <hbaapi.h>
cc file.c -lHBAAPI

When linking to the SNIA HBA API wrapper package (default)

or

cc file.c -lzfcphbaapi

so basically you pick a lane: link against the SNIA wrapper by default, or go straight to -lzfcphbaapi if that's the vibe you want. πŸ’…


✨ DESCRIPTION ✨

πŸ’« Introduction πŸ’«

libzfcphbaapi is part of an implementation of FC-HBA for the ZFCP device driver. and the ZFCP device driver? she's a FCP device driver for Linux on System z. 🐧

The whole implementation of FC-HBA for the ZFCP device driver is called ZFCP HBA API. and where does she live? in libzfcphbaapi β€” a shared library which provides the API defined in FC-HBA. periodt. πŸ’–

πŸ’« Compatibility πŸ’«

ZFCP HBA API Library supports the API functions listed in SupportedHBAAPIs(3).

All other API functions of FC-HBA return the status HBA_STATUS_ERROR_NOT_SUPPORTED if possible and are listed in UnSupportedHBAAPIs(3). so like… if you call something she doesn't do, she'll tell you "not supported" if she can, and the full list of the no's is right there in the other man page. no cap. πŸ™ˆ

πŸ’« Restrictions and Peculiarities πŸ’«

For ZFCP HBA API the following restrictions and peculiarities apply:

  • Only adapters, ports and units can be accessed that are configured in the ZFCP device dirver. This is due to internal restrictions of the ZFCP device driver and due to the fact that the adapter might be shared between several VM guests. πŸ’€
  • If SCSI commands are send to a target port, the well known lun (WLUN) for the report luns command will be attached and detached. If the storage server does not support that WLUN, lun scanning will fail. (yeah, it just fails, not a drill 😭)
  • The function HBA_GetFcpTargetMapping() does not return an OSDeviceName in struct HBA_FCPTargetMapping. This is conform to FC-HBA since this field is optional. so she's not being lazy, she's being spec-compliant. slay. πŸ‘‘
  • Because the ZFCP device driver does not support Single Byte Command Code Sets Connections, the functions HBA_GetSBTargetMapping(), HBA_GetSBStatistics() and HBA_SBDskGetCapacity() are not supported by libzfcphbaapi. those three? not invited to the party. 🚫

πŸ’« Installation πŸ’«

A source RPM and/or binary RPM "lib-zfcp-hbaapi" should be provided which will install the ZFCP HBA API Library called libzfcphbaapi.so. πŸŽ€

The corresponding header file hbaapi.h will be supplied by the SNIA HBA API library wrapper package when compiled as a vendor library. When not, an own version of the header file will be installed. either way bestie, you get a header. 🫢

πŸ’« Environment Variables πŸ’«

To log error situations in libzfcphbaapi two environment variables are used:

  • LIB_ZFCP_HBAAPI_LOG_LEVEL β€” specifies log level 🌈
    • if not set or set to 0, logging is disabled (default)
    • if set to value > 0, logging is enabled
  • LIB_ZFCP_HBAAPI_LOG_FILE β€” specifies file where log output is written to πŸ“
    • if not set, stderr is used
    • if set, specified file is used for log output

so like: flip the level above zero to turn the diary on, and point the file variable somewhere cute if you don't want the tea spilling into stderr. πŸ’œ

πŸ’« Reference πŸ’«

FC-HBA: ANSI INCITS 386-2004, The T11 Technical Committee. Information Technology - Fibre Channel HBA API ⭐


✨ SEE ALSO ✨

SupportedHBAAPIs(3), UnSupportedHBAAPIs(3). go read those next, bestie, they're the sequel. πŸ¦‹


and that's the whole page! πŸŽ‰ this was the ZFCP HBA API flavor of the manual, dated 2008, brought to you under the libzfcphbaapi(3) banner β€” ty for coming to my ted talk, mwah πŸ’–πŸ’…βœ¨