PowerWire.eu

Independent IBM i, AIX and Linux news and tech tips for Europe and beyond

  • Home
  • News
  • Technical Articles
    • IBM i
    • AIX
    • Linux
    • VIOS
  • Subscribe
  • About Us
  • Contact Us
  • Advertise with PowerWire.eu

An Ansible IBM i Disk Checker

May 30, 2022 by Andy Youens 1 Comment

This article slightly deviates from my usual open source articles on IBM i.

I say slightly, as this article will be about Ansible and yes Ansible is open-source.  Thank-you Red Hat.

This article will not be an introduction to Ansible.  My good friend Glenn Robinson, has written a great couple of PowerWire articles on that topic.  These can be found here.

One of our clients has been going through a spate of disk failures on his server and asked if there is anything we can do to monitor this situation.  As always with clients, we said of course!

For this task, I’ll be running the Ansible control node on our main IBM i server, which will also, as we are at it, check all our other partitions.

For Ansible to be run as the control node, we need to install its open-source package.

The figure below shows the option we need to take, from Access for Client Solutions (ACS) Open source package management.

For the shell command line interface enthusiasts, a quick yum install ansible will also install the product onto your server.

The first check I recommend with using Ansible is to run the ping module to ensure we can reach all our Ansible hosts.

ansible ibmi -m ping

Just to be clear, the Ansible ping command is an Ansible core module, it does more than the TCP/IP ping and well worth using to ensure all is good with communications and Ansible.

The results of the Ansible ping can be seen in the figure below.

  1. Use the Ansible ping module over all IBMi hosts
  2. The results back from the Galatea (7.3) IBM i partition
  3. The results back from the Proteus (7.1) IBM i partition

We have got back the results we wanted, now let us check the disks.

I will use an Ansible playbook to allow each of the individual stages required to check our IBM i disk set.

It has three steps.  They are;

  1. Run a query over the SYSDISKSTAT view to see if there are any failing disks
  2. For debugging, let me know the result of the SQL statement above
  3. Send an email to support, letting them know of any issues

Running the playbook in a shell session, gives the following results;

For ease, the steps above collate to the steps in the playbook figure, and to follow up the email received was.

Conclusion

Hopefully this article has whetted your appetite for Ansible on IBM i.  If it has, how about attending my Ansible on IBM i Workshop at the International Power meeting in June 2022 in the UK.  Hopefully, I can see you all there.  Full details can be found here.

All the examples I have written for this article, and previous ones, can be found on my open-source repository on GitHub, which can be found at https://github.com/AndyYouens/f_Learning

If you have any questions, either on this article, or anything else on the IBM i, use the comments below, or send me a message on twitter @AndyYouens

Andy Youens is an IBM i consultant/instructor at Milton Keynes, UK-based FormaServe Systems with over 40 years IBM midrange experience. 

IBM Champion

Filed Under: IBM i, Technical Articles Tagged With: IBM i, IBM Power Systems

Comments

  1. Mr M Ryan says

    June 1, 2022 at 4:53 pm

    Fantastic!

    I’ll pin you down at the i-UG Conference and we’ll look further into this one. Cheers!

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Free monthly newsletter signup

News

A screen a story – Not our problem anymore

Last week I ran into an issue, which did teach me something new about the command WRKPRB. After checking a … [Read More...]

Raspberry Pi and Machine Learning

In my last article, I demonstrated how I used Machine Learning on the Raspberry Pi to determine if a … [Read More...]

Shield Advanced Solutions – new Messaging and Monitoring solutions

September 2022 – Toronto As Shield Advanced Solutions celebrates the significant milestone, 25 years of … [Read More...]

More articles from this section

Quick Links

  • Advertise
  • Subscribe

Follow Us…

  • Email
  • LinkedIn
  • Twitter

Search This Website

Copyright © 2023 · Cue Communications · All Rights Reserved

Log in