<font size=3 face="Arial">You could also use the GPFS prestartup callback
(mmaddcallback) to execute a script synchronously that waits for the IB
ports to become available before returning and allowing GPFS to continue.
 Not systemd integrated but it should work.</font><br><br><font size=3 face="sans-serif">Fred<br>__________________________________________________<br>Fred Stock | IBM Pittsburgh Lab | 720-430-8821<br>stockf@us.ibm.com</font><br><br><br><br><font size=1 color=#5f5f5f face="sans-serif">From:      
 </font><font size=1 face="sans-serif">david_johnson@brown.edu</font><br><font size=1 color=#5f5f5f face="sans-serif">To:      
 </font><font size=1 face="sans-serif">gpfsug main discussion
list <gpfsug-discuss@spectrumscale.org></font><br><font size=1 color=#5f5f5f face="sans-serif">Date:      
 </font><font size=1 face="sans-serif">03/08/2018 07:34 AM</font><br><font size=1 color=#5f5f5f face="sans-serif">Subject:    
   </font><font size=1 face="sans-serif">Re: [gpfsug-discuss]
GPFS autoload - wait for IB ports to become        active</font><br><font size=1 color=#5f5f5f face="sans-serif">Sent by:    
   </font><font size=1 face="sans-serif">gpfsug-discuss-bounces@spectrumscale.org</font><br><hr noshade><br><br><br><font size=3>Until IBM provides a solution, here is my workaround.
Add it so it runs before the gpfs script, I call it from our custom xcat
diskless boot scripts. Based on rhel7, not fully systemd integrated. YMMV!</font><br><br><font size=3>Regards, </font><br><font size=3> — ddj</font><br><font size=3>——-</font><br><font size=3>[ddj@storage041 ~]$ cat /etc/init.d/ibready </font><br><font size=3>#! /bin/bash</font><br><font size=3>#</font><br><font size=3># chkconfig: 2345 06 94</font><br><font size=3># /etc/rc.d/init.d/ibready</font><br><font size=3># written in 2016 David D Johnson (ddj <at> </font><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__brown.edu&d=DwMFaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&m=u-EMob09-dkE6jZbD3dTjBi3vWhmDXtxiOK3nqFyIgY&s=DZ8S9rlTWQ8XfqHR6o5CWfRorBROzg9akyebO0kFd0M&e="><font size=3 color=blue><u>brown.edu</u></font></a><font size=3>)</font><br><font size=3>#</font><br><font size=3>### BEGIN INIT INFO</font><br><font size=3># Provides:            
ibready</font><br><font size=3># Required-Start:</font><br><font size=3># Required-Stop:</font><br><font size=3># Default-Stop:</font><br><font size=3># Description: Block until infiniband is ready</font><br><font size=3># Short-Description: Block until infiniband is ready</font><br><font size=3>### END INIT INFO</font><br><br><font size=3>RETVAL=0</font><br><font size=3>if [[ -d /sys/class/infiniband ]] </font><br><font size=3>then</font><br><font size=3>        IBDEVICE=$(dirname $(grep
-il infiniband /sys/class/infiniband/*/ports/1/link* | head -n 1))</font><br><font size=3>fi</font><br><font size=3># See how we were called.</font><br><font size=3>case "$1" in</font><br><font size=3>  start)</font><br><font size=3>        if [[ -n $IBDEVICE &&
-f $IBDEVICE/state ]]</font><br><font size=3>        then</font><br><font size=3>               
echo -n "Polling for InfiniBand link up: "</font><br><font size=3>               
for (( count = 60; count > 0; count-- ))</font><br><font size=3>               
do</font><br><font size=3>               
        if grep -q ACTIVE $IBDEVICE/state</font><br><font size=3>               
        then</font><br><font size=3>               
                echo ACTIVE</font><br><font size=3>               
                break</font><br><font size=3>               
        fi</font><br><font size=3>               
        echo -n "."</font><br><font size=3>               
        sleep 5</font><br><font size=3>               
done</font><br><font size=3>               
if (( count <= 0 ))</font><br><font size=3>               
then</font><br><font size=3>               
        echo DOWN - $0 timed out</font><br><font size=3>               
fi</font><br><font size=3>        fi</font><br><font size=3>        ;;</font><br><font size=3>  stop|restart|reload|force-reload|condrestart|try-restart)</font><br><font size=3>        ;;</font><br><font size=3>  status)</font><br><font size=3>        if [[ -n $IBDEVICE &&
-f $IBDEVICE/state ]]</font><br><font size=3>        then</font><br><font size=3>               
echo "$IBDEVICE is $(< $IBDEVICE/state) $(< $IBDEVICE/rate)"</font><br><font size=3>        else</font><br><font size=3>               
echo "No IBDEVICE found"</font><br><font size=3>        fi</font><br><font size=3>        ;;</font><br><font size=3>  *)</font><br><font size=3>        echo "Usage: ibready
{start|stop|status|restart|reload|force-reload|condrestart|try-restart}"</font><br><font size=3>        exit 2</font><br><font size=3>esac</font><br><font size=3>exit ${RETVAL}</font><br><font size=3>————</font><br><br><font size=3>  -- ddj</font><br><font size=3>Dave Johnson</font><br><font size=3><br>On Mar 8, 2018, at 6:10 AM, Caubet Serrabou Marc (PSI) <</font><a href=mailto:marc.caubet@psi.ch><font size=3 color=blue><u>marc.caubet@psi.ch</u></font></a><font size=3>>
wrote:<br></font><br><font size=2 face="Tahoma">Hi all,</font><br><font size=2 face="Tahoma"><br>with autoload = yes we do not ensure that GPFS will be started after the
IB link becomes up. Is there a way to force GPFS waiting to start until
IB ports are up? This can be probably done by adding something like After=network-online.target
and Wants=network-online.target in the systemd file but I would like to
know if this is natively possible from the GPFS configuration.<br><br>Thanks a lot,<br>Marc                </font><br><font size=2 face="Tahoma">_________________________________________<br>Paul Scherrer Institut <br>High Performance Computing<br>Marc Caubet Serrabou<br>WHGA/036<br>5232 Villigen PSI<br>Switzerland<br><br>Telephone: +41 56 310 46 67<br>E-Mail: </font><a href=mailto:marc.caubet@psi.ch><font size=2 color=blue face="Tahoma"><u>marc.caubet@psi.ch</u></font></a><br><font size=3>_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at </font><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__spectrumscale.org&d=DwMFaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&m=u-EMob09-dkE6jZbD3dTjBi3vWhmDXtxiOK3nqFyIgY&s=Cn4NIxkWXmTOrwjnMFpO8KxH1BvuZLdC5_C9fwPSQCg&e="><font size=3 color=blue><u>spectrumscale.org</u></font></a><font size=3 color=blue><u><br></u></font><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss&d=DwMFaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&m=u-EMob09-dkE6jZbD3dTjBi3vWhmDXtxiOK3nqFyIgY&s=JCfJgq6pZnKUI6d-rIgJXVcdZh7vmA5ypB1_goP_FFA&e="><font size=3 color=blue><u>http://gpfsug.org/mailman/listinfo/gpfsug-discuss</u></font></a><tt><font size=2>_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org<br></font></tt><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&m=u-EMob09-dkE6jZbD3dTjBi3vWhmDXtxiOK3nqFyIgY&s=JCfJgq6pZnKUI6d-rIgJXVcdZh7vmA5ypB1_goP_FFA&e="><tt><font size=2>https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&m=u-EMob09-dkE6jZbD3dTjBi3vWhmDXtxiOK3nqFyIgY&s=JCfJgq6pZnKUI6d-rIgJXVcdZh7vmA5ypB1_goP_FFA&e=</font></tt></a><tt><font size=2><br></font></tt><br><br><BR>