Eliminate the pain of a switchover – HA automatization with Ansible for IBM Power
A lot of IBM Power customers have a HA solution based on storage synchronous replication – something like this:
When there is a need to do a controlled switchover (for test or maintenance reasons) many of you are afraid, since the procedure, even not too complicated, involves knowledge and operation of different environments:
- Controlled system end (could be IBM i, AIX, Linux)
- Check in HMC that LPAR has been powered off
- Connect to storage and switch the replication
- Start LPAR from HMC
We can simplify and automate all the process through Ansible:
The Ansible controller node could be Linux (on Power, of course), AIX or, like in my case, IBM i. There are lots of Ansible modules, developed by IBM, that are available in Ansible Galaxy site.
So, first we must end, programmatically, the activity of the system – for example, for IBM i, we end a list of subsystems:
Then we power down the LPAR:
And then we wait for the LPAR to be down by checking the HMC:
Once it is off, we connect to Storwize system (could be any V*, FS* or SVC) and switch the replication:
If you want to be on the safe side, you can just suspend the replication and allow the access in the destination:
Now we only need to start the LPAR in the HA system:
And wait for the partition to be running, by checking the HMC:
Now we just need to do whatever we had to do after the switchover. It is possible to do a lot of things as there are many different modules available.
The solution could be better if we integrate it into RedHat Automation Platform as it allows us to have permission control, historical log, etc.
Conclusion
The HA/DR switchover could be as simple as running a shell script and it can be done by anyone.
References
The collections are available in Ansible Galaxy:
Ansible Galaxy
And the module documentation:
Modules — IBM power_ibmi collection 1.0.0 documentation
IBM Power Systems AIX Collection for Ansible — IBM Power Systems AIX 1.0.0-beta1 documentation
IBM Power Systems HMC Collection for Ansible — IBM Power Systems HMC 1.0.0-beta1 documentation
ansible-collections/ibm.spectrum_virtualize: IBM Spectrum Virtualize (github.com)
#ibmchampions-highlights-home#ibmchampions-highlights