As an AIX administrator I work only with the "AIX side" of the technology. In the old times we had a few very good client side tools and drivers (SDD,SDDPCM) to manage the storage allocated disks, however since the XIV release -in my opinion- the available tools do not provide the same functionalities as it was in the old times. The driver works fine, but the official tool (HAK) is a little bit slow, and it has totally different abilities compared to an pcmpath/datapath commands for example.. Because I used those tools very often, I wondered if there was any way to create something similar to make the administration as easy as it was before.. So I created a script with a few similar functions to make my life easier (also used a binary from Anthony's package - thanks Anthony for made this available)
Here are some functions I implemented:
xivpath query devlist [hdisk#,hdisk#]
xivpath query essmap [hdisk#,hdisk#]
xivpath query wwpn [active]
xivpath query adapter
xivpath set adapter fscsi# offline [--force|--verbose]
xivpath set adapter fscsi# online [--verbose]
xivpath remove adapter fscsi#
xivpath restore connections
# Note: The script can be used in case of a Virtualized environment (using VIO servers) too. In that case the script won't be able to check everything, but could provide some useful details.
If you worked with the mentioned tools ( pcmpath, datapath) I think most of the functions may look familiar. However I didn't implement all functions, because this script wasn't created to replace the already available tools (HAK, or Anthony's script package)! Instead of that its goal is to provide an alternative to make the administration a little bit easier, but you still should use the official tools to make any change on the system, especially as I implemented primarily the main query functions (and the necessary functions to make the adapter replacement easier).
#Note - Unfortunately I had no chance to make the script ISCSI compatible, as I don't have any test environment for that, which means the script can be used only in case you're using Fibre Channel adapters. I only had a chance to test my script only on the environments I support, which means there's a possibility that there are some bugs in the code. If you find any, please report it immediately.
# 2011.07.08 - 18.104.22.168 version released.
- Fixed an issue in the "remove adapter" function - the used rmpath command wasn't deleted the defined paths from the ODM (which inhibit the rmdev to remove the adapter), as the '-d' option wasn't specified. In the same time the used verification method changed as well (now the script checks the registered paths (should be 0 after the remove) instead of the defined ones.
- Added an extra function to the "query wwpn": Now it displays the adapters' microcode code as well
- Added an extra function to the "set adapter offline/online": The --verbose switch is now available. In case you use that, the function will list you exactly which paths it sets offline/online
# 2011.08.22 - 22.214.171.124 version released.
- fixed a bug in query wwpn - the function tried to check Defined adapters as well, as it wasn't filtered correctly
- Removed the 'uniq' pre-requisite
- 'Set adapter offline' function improved
- 'Restore Connections' function added (This could be used to restore failed paths after an XIV module failure)
# 2012.03.02 - 126.96.36.199 version released
- improved 'query devlist' and 'query essmap' functions - now you can query for multiple hdisks using the "hdisk1,hdisk2,...,hdiskX" format
# 2012.07.10 - 188.8.131.52 version released
- Added an extra function to the "query adapter": Now it displays the adapters' Dynamic Tracking (dyntrk) and FC Error recovery (fc_err_recov) attributes as well ( IBM's best practice suggest to set the dyntrk to yes and the fc_err_recov to fast_fail, so now it's easier to verify these settings)
- The help prints the version number
- Added an extra function to the 'query wwpn': Now it displays the parent adapter (In some cases the parent/child adapters naming convention are not in sync (fcs0 Vs fscsi1), which could cause hard times as part of the adapter replacement operation)
# 2014.06.02 - 184.108.40.206 version released
- Fixed an ODM check bug, where the script queried XIV LUN serial wasn't reflect the actual stored XIV serialID
- Implemented proper debugging via the XIVPATH_DEBUG variable
- ODM sanity check is disabled by default - you can enable it via the XIVPATH_CHECK_ODM variable
- Microcode check is disabled on NPIV adapters
- Added an extra function to the "query devlist": It does report the healthcheck_mode and healthcheck_interval from now on.
- Extra function added to the "query essmap" function: In case of a VIO client, the script will try to identify the connected VIO host adapter
- Fixed a bug, where the inquiry_xiv.AIX path wasn't properly detected, due to symlinked xivpath command.
- Code review: Aliased commands instead of command variables; proper printf instead of tabulated lines; proper typeset instead of ugly workarounds.
# 2015.11.06 - 220.127.116.11 version released
- Code review: Removed the 'bc', 'wc' pre-requisites
- 'query wwpn' function now reports the Adapter Location as well
- Fixed a bug where a dezoned -but still configured- LUN could stop the script execution
- Added an extra function to the 'query wwpn': Now you can use the "active" flag to list only adapters that have active devices connected
- Fixed a bug in query_wwpn where certain adapter types microcode check could break the output format.
# 2016.06.20 - 18.104.22.168 version released
- User request: The help function now exit with a non-zero return code ( RC 42 :) )
- User request: Report the AIX serial number, not just the XIV serial. 'query devlist' has been modified to report that as well
- 'query essmap' function will report the dacX devices as well from now on - This could be useful in case there are no LUNs mapped to the server,
but you would like to know the zoning settings (without mapping any LUN from the XIV)
# 2016.08.23 - 22.214.171.124 version released
- Fixed a bug in the 'query devlist' function that's related to the Volume ID report check. The issue occurred when the LUN was mapped from a VIO server only
# 2017.01.10 - 126.96.36.199 version released
- Feature added: "query devlist" will check whether a LUN is mapped in a mirroring mode, as that can lock down the access to the LUN completely.
- User request: Implement headerless output. XIVPATH_NO_HEADER variable has been implemented to cover this request (similar to XIVPATH_DEBUG)
- Code review: Removed the "let" calls from numeric calculation
- Code review: Error (non-0 RC related) messages are written to STDERR
# 2017.06.02 - 188.8.131.52 version released
- Fixed an issue where the script falsely claimed that a LUN is related to DR Mirroring
- Fixed a typo bug in "query essmap" where the script would fail with a "syntax error" in case the LUN is virtualized from a VIO server
- Fixed a logical bug in "restore connections" where the function could report a completed connection restore incorrectly
Replaced the original download link with the new one, however you can still download the previous versions from bellow (in case I have not found some regression)
# For those who are looking for the original downloads for version 184.108.40.206 - 220.127.116.11 I owe an apology - I did forgot to update the blog post related to those, although I did work on the "development" (fixes here and there) of this tool.