AIX

AIX

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

 View Only
  • 1.  Changing disk MPIO path priority while filesystem is mounted

    Posted Mon May 16, 2011 10:40 AM

    Originally posted by: dhunje


    I'm trying to switch disk load from one path to another(AIX 6100-06-03-1048) by changing "priority" attribute on hdisk (algorithm:single_path/policy:fail_over) while filesystem is mounted.
    But it looks that it doesn't working that way.
    Only after issuing varyoffvg/varyonvg, paths are switched.

    Same thing on AIX 5.3 works fine.

    Does anybody know is it normal behaviour in AIX6.1 or it is some kind of bug.
    Thanks in advance,
    Davor


  • 2.  Re: Changing disk MPIO path priority while filesystem is mounted

    Posted Mon May 16, 2011 03:10 PM

    Originally posted by: shargus


    I've done that before - to balance the load between two VIO servers during a disk migration, I set the path to one VIO for the disk being read, and the path to the other VIO for the disk being written to. As soon as I changed the path priority, I could see the load balance out while watching the two VIO servers using nmon.

    What command are you using to change the path priority? It should be a chpath command like this:

    
    # chpath -l hdisk17 -p vscsi0 -a priority=1 path Changed
    


    Note you must specify the path whose priority you want to change by specifying the parent device. In this case, hdisk17 has two parents - vscsi0 and vscsi2. I'm changing the priority for the path from hdisk17 to vscsi0 to priority 1.

    Play around with it, but I think a higher priority value gets the I/O first.

    For some reason, you cannot do a "lspath" to retrieve the priority setting...


  • 3.  Re: Changing disk MPIO path priority while filesystem is mounted

    Posted Tue May 17, 2011 07:33 AM

    Originally posted by: dhunje


    I have disk on SAN with two paths:

    larva:root:/>lspath -l hdisk133
    Enabled hdisk133 fscsi0
    Enabled hdisk133 fscsi1

    larva:root:/>lspath -E -l hdisk131 -p fscsi1
    scsi_id 0x2aa00 SCSI ID False
    node_name 0x500009740821a800 FC Node Name False
    priority 1 Priority True

    larva:root:/>lspath -E -l hdisk131 -p fscsi0
    scsi_id 0x4aa00 SCSI ID False
    node_name 0x500009740821a800 FC Node Name False
    priority 1 Priority True
    For example, I have changed first path to make it lower priority by specifing higher number:

    larva:root:/>chpath -l hdisk131 -pfscsi0 -a priority=10
    path Changed

    But disk load stays on same adapter. Only after I varyoffvg/varyonvg VG disk load switch to another path.

    Like I said on other server(AIX 5.3) things works dynamically.
    Regards,
    Davor


  • 4.  Re: Changing disk MPIO path priority while filesystem is mounted

    Posted Tue May 17, 2011 01:26 PM

    Originally posted by: SystemAdmin


    Hello,

    For me the command chapth to be completed by the option-P or-perm
    hight priority = 1 and the low priority >= 1
    But the result will be considered at the next reboot the server


  • 5.  Re: Changing disk MPIO path priority while filesystem is mounted

    Posted Mon April 01, 2013 06:05 PM

    Originally posted by: SystemAdmin


    > {quote:title=shargus wrote:}
    > For some reason, you cannot do a "lspath" to retrieve the priority setting...

    You can use lspath to retrieve the priority setting in a couple of different ways.

    Method 1
    
    # lspath -l hdisk3 -F 
    "connection parent" 500507630600872d,4000407300000000 fscsi0 50050763060b872d,4000407300000000 fscsi0 500507630610872d,4000407300000000 fscsi0 50050763061b872d,4000407300000000 fscsi0 500507630600872d,4000407300000000 fscsi1 50050763060b872d,4000407300000000 fscsi1 500507630610872d,4000407300000000 fscsi1 50050763061b872d,4000407300000000 fscsi1 500507630600872d,4000407300000000 fscsi2 50050763060b872d,4000407300000000 fscsi2 500507630610872d,4000407300000000 fscsi2 50050763061b872d,4000407300000000 fscsi2 500507630600872d,4000407300000000 fscsi3 50050763060b872d,4000407300000000 fscsi3 500507630610872d,4000407300000000 fscsi3 50050763061b872d,4000407300000000 fscsi3 # lspath -E -l hdisk3 -p fscsi0 -w 500507630600872d,4000407300000000 -a priority priority 1 Priority True #
    


    Method 2

    
    # lspath -l hdisk3 -t Enabled hdisk3 fscsi0 0 Enabled hdisk3 fscsi0 1 Enabled hdisk3 fscsi0 2 Enabled hdisk3 fscsi0 3 Enabled hdisk3 fscsi1 4 Enabled hdisk3 fscsi1 5 Enabled hdisk3 fscsi1 6 Enabled hdisk3 fscsi1 7 Enabled hdisk3 fscsi2 8 Enabled hdisk3 fscsi2 9 Enabled hdisk3 fscsi2 10 Enabled hdisk3 fscsi2 11 Enabled hdisk3 fscsi3 12 Enabled hdisk3 fscsi3 13 Enabled hdisk3 fscsi3 14 Enabled hdisk3 fscsi3 15 # lspath -E -l hdisk3 -i 0 -a priority priority 1 Priority True #
    


    The priority is per path, so you have to uniquely identify the path, either by specifying the disk, parent, and connection location (as in method 1), or by specifying the disk and the path ID (as in method 2).

    I know this is an old thread, but I stumbled across it when doing a web search, so I figured someone else in the future may do the same and may benefit from this information. Hope it helps!


  • 6.  Re: Changing disk MPIO path priority while filesystem is mounted

    Posted Wed May 29, 2013 09:00 PM

    Originally posted by: DanBraden


    Most AIX devices don't support changing the device attributes while the device is in use (i.e. the device is open).   However, I've been able to change path priorities for an open disk using the chpath command.  E.G.:

    root@db66 / # lspv
    hdisk0          00c4c6c7b35f2977                    rootvg          active
    hdisk1          00c4c6c7b35f5c77                    testvg          active
    hdisk2          00c4c6c7a36694ca                    testvg          active
    root@db66 / # lspath -F"name parent connection status path_status path_id"
    hdisk0 vscsi0 810000000000       Enabled Available 0
    hdisk0 vscsi2 810000000000       Enabled Available 1

    hdisk1 vscsi1 810000000000       Enabled Available 0

    hdisk1 vscsi3 810000000000       Enabled Available 1
    hdisk2 fscsi0 202800a0b81132d0,0 Enabled Available 0
    hdisk2 fscsi0 202900a0b81132d0,0 Enabled Available 1
    hdisk2 fscsi1 202800a0b81132d0,0 Enabled Available 2
    hdisk2 fscsi1 202900a0b81132d0,0 Enabled Available 3
    root@db66 / # lspath -AEl hdisk0 -p vscsi0
    priority 1 Priority True
    root@db66 / # lspath -AEl hdisk0 -p vscsi2
    priority 2 Priority True
    root@db66 / # chpath -l hdisk0 -p vscsi2 -w "810000000000" -a priority=1
    path Changed
    root@db66 / # chpath -l hdisk0 -p vscsi0 -w "810000000000" -a priority=2
    path Changed
    root@db66 / # lspath -l hdisk0 -F"name parent connection status path_status path_id"
    hdisk0 vscsi0 810000000000 Enabled Available 0
    hdisk0 vscsi2 810000000000 Enabled Available 1
    root@db66 / # lspath -AEl hdisk0 -p vscsi0
    priority 2 Priority True