AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only

getting current MPIO path from script

  • 1.  getting current MPIO path from script

    Posted Thu June 16, 2011 09:59 AM

    Originally posted by: armink


    Hi all,

    running LPARs with vscsi/MPIO and HA-VIOs (all LUNs have equal priority!), I want to find out what path is actually used for I/O.
    I need to find this out in a script for all LUNs, so using iostat is not an option.
    AIX is 5.3 and 6.1.

    My current state of knowledge is this:
    • paths are defined in the ODM class CuPath and have a "path_id" and "path_status":
    • if path_status is 1, then the lowest "path_id" is the current active path, otherwise the lowest path with path_status=1
    • I can get those information with lspath -F 'name path_id path_status"

    • path priorities are defined in the ODM class CuPathAt... and can (not really) be displayed with lspath :-(
    • I can get path priorities one at a time with "lspath -OE -l hdiskX -p vscsiX -w XXXX -a priority"
    • when a priority is present, the lowest priority and path_id with path_status=1 is the current active path

    Is this (in general) right? Is there any document that describes the MPIO algorithms in detail?
    Any other suggestions how to solve this task?

    Thanks in advance,
    Armin