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)
You can download it from here: https://www.ibm.com/developerworks/mydeveloperworks/blogs/glukacs/resource/xivpath.188.8.131.52.tar.zip
Here are some functions I implemented:
xivpath query devlist [hdisk#]
xivpath query essmap [hdisk#]
xivpath query wwpn
xivpath query adapter
xivpath set adapter fscsi# offline/online [--force]
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.
# Update (2011.07.08) - 184.108.40.206 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
# Update (2011.08.22) - 220.127.116.11 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)
# Update (2012.03.02) - 18.104.22.168 version released
- improved 'query devlist' and 'query essmap' functions - now you can query for multiple hdisks using the "hdisk1,hdisk2,...,hdiskX" format
# Update (2012.07.10) - 22.214.171.124 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)
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)
v126.96.36.199 - https://www.ibm.com/developerworks/mydeveloperworks/blogs/glukacs/resource/xivpath.tar.zip
v188.8.131.52 - https://www.ibm.com/developerworks/mydeveloperworks/blogs/glukacs/resource/xivpath184.108.40.206.tar.zip
v220.127.116.11 - https://www.ibm.com/developerworks/mydeveloperworks/blogs/glukacs/resource/xivpath.18.104.22.168.tar.zip