Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
Chapter 27. External Array Management (libStorageMgmt)
Red Hat Enterprise Linux 7 ships with a new external array management library called
27.1. Introduction to libStorageMgmt
libStorageMgmtlibrary is a storage array independent Application Programming Interface (API). As a developer, you can use this API to manage different storage arrays and leverage the hardware accelerated features.
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.
libStorageMgmtlibrary, you can perform the following operations:
- 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 libstoragemgmt package provides:
- A stable C and Python API for client application and plug-in developers.
- A command-line interface that utilizes the library (
- A daemon that executes the plug-in (
- A simulator plug-in that allows the testing of client applications (
- Plug-in architecture for interfacing with arrays.
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 plug-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.
libStorageMgmtlibrary 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
/lib/udev/rules.d/90-scsi-ua.rulescontains example rules to enumerate other events that the kernel can generate.
libStorageMgmtlibrary uses a plug-in architecture to accommodate differences in storage arrays. For more information on
libStorageMgmtplug-ins and how to write them, see the Red Hat Developer Guide.