Chapter 26. External Array Management (libStorageMgmt)

Red Hat Enterprise Linux 7 ships with a new external array management package called libStorageMgmt.

26.1. What is libStorageMgmt

The libStorageMgmt package is a storage array independent Application Programming Interface (API). It provides a stable and consistent API that allows developers the ability to programmatically manage different storage arrays and leverage the hardware accelerated features provided.
This library is used as a building block for other higher level management tools and applications. End system administrators can also use it as a tool to manually manage storage and automate storage management tasks with the use of scripts.
The libStorageMgmt package allows operations such as:
  • List storage pools, volumes, access groups, or file systems.
  • Create and delete volumes, access groups, file systems, or NFS exports.
  • Grant and remove access to volumes, access groups, or initiators.
  • Replicate volumes with snapshots, clones, and copies.
  • Create and delete access groups and edit members of a group.
Server resources such as CPU and interconnect bandwidth are not utilized because the operations are all done on the array.
The package provides:
  • A stable C and Python API for client application and plug-in developers.
  • A commandl line interface that utilizes the library (lsmcli).
  • A daemon that executes the plug-in (lsmd).
  • A simulator plug-in that allows the testing of client applications (sim).
  • Plug-in architecture for interfacing with arrays.

Warning

This library and its associated tool have the ability to destroy any and all data located on the arrays it manages. It is highly recommended to develop and test applications and scripts against the storage simulator pulug-in to remove any logic errors before working with production systems. Testing applications and scripts on actual non-production hardware before deploying to production is also strongly encouraged if possible.
The libStorageMgmt package in Red Hat Enterprise Linux 7 adds a default udev rule to handle the REPORTED LUNS DATA HAS CHANGED unit attention.
When a storage configuration change has taken place, one of several Unit Attention ASC/ASCQ codes reports the change. A uevent is then generated and is rescanned automatically with sysfs.
The file /lib/udev/rules.d/90-scsi-ua.rules contains example rules to enumerate other events that the kernel can generate.
The libStorageMgmt library uses a plug-in architecture to accommodate differences in storage arrays. For more information on libStorageMgmt plug-ins and how to write them, refer to Red Hat's Developer Guide.