PowerHA for AIX

PowerHA for AIX

Connect, learn, share, and engage with IBM Power.

 View Only
  • 1.  HACMP and NFS issue

    Posted Tue April 26, 2011 01:27 PM

    Originally posted by: zmadragon


    Environment : 3 LPARs ( host 1a, host 1b and host2).
    Host 1a and 1b are hacmp nodes with host 1a being the active node

    Host 1a has 3 network interfaces (en0, en1 and en2)
    en1 – persistent ip
    en2 – service ip allocated to it.
    Host 1a and 1b are on subnet A and host 2 is on subnet B.

    Issue: can’t mount a FS exported from host 1a on host2 using service ip address of host 1a.

    On host 2 need to run:
    mount service_ip_host_1a:/home/Bharath/file1 /tmp

    NOTE:
    Host1a routing table: default route is going through en1 (persistent ip) interface. So what ever packet transmitted to host2 goes through en1 (even if host 1a receives packet on interface en2-service ip)

    Any suggstions to solve this.

    Thanks
    Nagaraj


  • 2.  Re: HACMP and NFS issue

    Posted Wed June 01, 2011 10:30 AM

    Originally posted by: PontiacGeronimo


    I met similiar issue and did the following trick to have service IP as the desired source IP:

    Created following script on each cluster node (note: PERSISTENT variable in the script contains different persistent IP(s) on each node)

    
    PERSISTENT=
    "XXX.XXX.XXX.XXX"   
    
    for i in $PERSISTENT 
    
    do 
    
    if [ `netstat -in|grep -c -w $i` -eq 1 ] then EN=$(netstat -in|awk -va=
    "$i" 
    '$4 == a {print $1}') MK=$(lsattr -El $EN -a netmask -F value) 
    
    if [ `netstat -in|grep -w -c ^$
    {EN
    }` -gt 3 -a x`netstat -in|grep -w ^$
    {EN
    }|sed 
    '1,2d'|tail -1|awk 
    '{print $4}'` = x$i ] then echo persistent $i being moved to be not the first alias IP on $EN ifconfig $EN delete $i ifconfig $EN alias $i netmask $MK up echo persistent $i moved to be not the first alias IP on $EN fi fi done
    


    In "smitty cm_extended_event_config_menu_dmn" configured "Pre/Post-Event Command" using the mentioned script.

    In the same HACMP menu, in "Change/Show Pre-Defined HACMP Events" I have added the configured "Pre/Post-Event Command" to be executed as "Post-event Command" for following cluster events:

    acquire_service_addr
    acquire_takeover_addr
    swap_adapter_complete

    So, everytime those events occures (eg. during cluster startup), the persistent IP alias is unconfigured and configured again and service IP becames source IP for the outgoing connections.

    The other solution would be you request the same firewall rules for persistent IPs you have now for service ones.


  • 3.  Re: HACMP and NFS issue

    Posted Wed June 01, 2011 10:41 AM

    Originally posted by: PontiacGeronimo


    a bit modified but also should work.

    
    PERSISTENT=
    "XXX.XXX.XXX.XXX"   
    
    for i in $PERSISTENT 
    
    do 
    
    if [ `netstat -in|awk -va=
    "$i" 
    '$4 == a {++count} END {print count}'` -eq 1 ] then EN=$(netstat -in|awk -va=
    "$i" 
    '$4 == a {print $1}') MK=$(lsattr -El $EN -a netmask -F value) 
    
    if [ `netstat -in|grep -w -c ^$
    {EN
    }` -gt 3 -a x`netstat -in|grep -w ^$
    {EN
    }|sed 
    '1,2d'|tail -1|awk 
    '{print $4}'` = x$i ] then echo persistent $i being moved to be not the first alias IP on $EN ifconfig $EN delete $i ifconfig $EN alias $i netmask $MK up echo persistent $i moved to be not the first alias IP on $EN fi fi done
    


  • 4.  Re: HACMP and NFS issue

    Posted Wed June 01, 2011 03:52 PM

    Originally posted by: PontiacGeronimo


    I realized that the condition of the second "if" there should rather be "head -1" instead of "tail -1" so the quick reconfiguration of the persistent IP is only done when it is "the first from the top" alias IP on the interface... that is what I think...


  • 5.  Re: HACMP and NFS issue

    Posted Wed June 15, 2011 01:10 PM

    Originally posted by: zmadragon8


    PontiacGeronimo : thanks for the response. But in your suggesstion both service and persistent are on same interface right?

    In my environment we have it on different interfaces.

    If we plan to move the persistent IP to a different subnet - any suggestions for configuring network/switch and AIX for the issue to be solved.