IBM introduced IBM Flashsystem grid technology which creates a group of loosely coupled storage controllers. The
This utility is intended to run on RHEL Linux hosts to automatically detect rescan the volumes mapped from IBM Flashsystems Storage controllers.
The utility installs a custom udev rules file to act upon certain unit attentions. The utility detects the changes in the configs through udev events, and acts upon the events with the help of a standard pre-installed storage rescan script (rescan-scsi-bus.sh).
A custom script installed by the utlity receives udev event attributes such as devpath and unit attention, and process those to arrive at object identifiers (for hostports etc). These object identifiers are used to define the scope of the storage discoveries.
The utility works at a host-port level and schedules two rescan jobs with the scope of a particular host WWPN:
-
Base rescan job: The udev events get accumulated for a period of 5 minutes. Any events during this period result in just one rescan at the hostport wwpn level at the end of 5 minutes. This ensures settling time for the config changes and limits frequents rescans in case of a flood of events in a short duration.
-
Paths cleanup job: This gets scheduled 3 minutes after base rescuen job finishes to take care of any failed faulty paths.
IBM Flashsystem provide a modern way of data movement using Storage Partitions. Storage partition is a workload centric a set of objects such as volumes, volume groups, hosts and host mappings, and data resiliency policies. What can be considered as a mini controller, the storage partitions are unit of data mobility in the modern data centre with IBM FlashSystem grid. More on it here https://www.ibm.com/docs/en/flashsystem-7x00/8.7.x_cd?topic=c-storage-partitions
This utility makes the job of an administrator easy and makes sure that the RHEL hosts automatically detect the storages during the course of Storage partition migrations.
In absence of this utility, the storage administrator may have to go to each RHEL host mapped to the partition and trigger a manual rescan so that the operating system aligns itself with config changes such host mappings changes or preferred paths detections.
This utility is also quite useful for auto detecting new devices added to RHEL hosts mapped to partitions. The unit attentions for host configiguration changes are caught by the utility to trigger storage rescans.
Similar to hosts mapped to any partitions, RHEL hosts mapped to FlashSystem (or SVC systems of that matter) also benefit with this utility.
- Create a clone of this repository on the RHEL system that you want to automate (preferrably a lower versioned RHEL)
git clone https://github.com/IBM/oss-rescan-storage-linux-udev.git
- Navigate to the directory:
cd oss-rescan-storage-linux-udev
- Run the build command:
rpmbuild -ba SPECS/ibm-2145-host-util.spec
- RPM (ibm-2145-host-util-1.0-1.el9.noarch.rpm) is available at:
<current_directory>/RPMS/noarch/
- Install the RPM
rpm -ivh ibm-2145-host-util-1.0-1.el9.noarch.rpm
No operating system reboot is required.
It is recommended to create the RPM on a lower versioned RHEL operating system so that rpm libraries on higher RHEL versions are backward compatible with the built package libraries.
Once the RPM installable is installed successfully on RHEL operating system, any config changes such as addition or removals of the mapped volumes are get auto detected by the host multipath software within a span of 5 minutes.
The IBM FlashSystem is optimised for handling hosts with this functionality installed.
chhost -autostoragediscovery yes <host_id>
The host identifiers for the existing host objects can be found by running lshost command on FlashSystem controllers, or thorugh GUI.
mkhost -name <new_name> -fcwwpn <wwpn_list> -partition <partition_id> -autostoragediscovery yes
- A custom UDEV rules file to qualify the uevents to act upon.
- Custom scripts to accumulate specific uevents and schedule delayed rescan and failed path cleanup jobs.
- Spec file to generate an RPM installable from the source.
- Config file to logrotate the debug logs generated, and to remove stale files upon reboots.
- Logs generated by this utility can be found in /var/log/ibm_2145/ directory.
The RPM installation depends upon:
- Package sg3_utils installed, /usr/bin/rescan-scsi-bus.sh in particular. (Installed by default on RHEL)
- The "at" command and an up and running "atd" daemon.
- The storage scans happen at host port wwpn level, hence any other storages zoned together with Flashsystems controller may also get scanned for any config changes that may be visible to that host wwpn.
- At least one volume must be detected manually so that the udev mechanism receive subsequent unit attentions from the Flashsystem controllers for any config changes.
- You must have root or sudo privileges to install this package.
- This utility supports RHEL 7.9 or later versions.
Ashwin M. Joshi (ashjosh1@in.ibm.com), Aditya Nanavati (aditya.nanavati@ibm.com), Chetan Borkar (chetan.borkar@ibm.com), Sakshee Agrawal (Sakshee.Agrawal@ibm.com)