Topic
  • 4 replies
  • Latest Post - ‏2011-06-15T17:09:51Z by zmadragon8
zmadragon
zmadragon
1 Post

Pinned topic HACMP and NFS issue

‏2011-04-26T17:26:37Z |
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
Updated on 2011-06-15T17:09:51Z at 2011-06-15T17:09:51Z by zmadragon8
  • PontiacGeronimo
    PontiacGeronimo
    7 Posts

    Re: HACMP and NFS issue

    ‏2011-06-01T14:30:04Z  
    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.
  • PontiacGeronimo
    PontiacGeronimo
    7 Posts

    Re: HACMP and NFS issue

    ‏2011-06-01T14:41:19Z  
    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)

    <pre class="jive-pre"> 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 </pre>

    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.
    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
    
  • PontiacGeronimo
    PontiacGeronimo
    7 Posts

    Re: HACMP and NFS issue

    ‏2011-06-01T19:52:10Z  
    a bit modified but also should work.

    <pre class="jive-pre"> 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 </pre>
    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...
  • zmadragon8
    zmadragon8
    1 Post

    Re: HACMP and NFS issue

    ‏2011-06-15T17:09:51Z  
    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...
    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.