<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.
&nbsp;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: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">david_johnson@brown.edu</font><br><font size=1 color=#5f5f5f face="sans-serif">To: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">gpfsug main discussion
list &lt;gpfsug-discuss@spectrumscale.org&gt;</font><br><font size=1 color=#5f5f5f face="sans-serif">Date: &nbsp; &nbsp; &nbsp;
&nbsp;</font><font size=1 face="sans-serif">03/08/2018 07:34 AM</font><br><font size=1 color=#5f5f5f face="sans-serif">Subject: &nbsp; &nbsp;
&nbsp; &nbsp;</font><font size=1 face="sans-serif">Re: [gpfsug-discuss]
GPFS autoload - wait for IB ports to become &nbsp; &nbsp; &nbsp; &nbsp;active</font><br><font size=1 color=#5f5f5f face="sans-serif">Sent by: &nbsp; &nbsp;
&nbsp; &nbsp;</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>&nbsp;\u2014 ddj</font><br><font size=3>\u2014\u2014-</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 &lt;at&gt; </font><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__brown.edu&amp;d=DwMFaQ&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&amp;m=u-EMob09-dkE6jZbD3dTjBi3vWhmDXtxiOK3nqFyIgY&amp;s=DZ8S9rlTWQ8XfqHR6o5CWfRorBROzg9akyebO0kFd0M&amp;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: &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
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>&nbsp; &nbsp; &nbsp; &nbsp; 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 &quot;$1&quot; in</font><br><font size=3>&nbsp; start)</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; if [[ -n $IBDEVICE &amp;&amp;
-f $IBDEVICE/state ]]</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; then</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
echo -n &quot;Polling for InfiniBand link up: &quot;</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
for (( count = 60; count &gt; 0; count-- ))</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
do</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; if grep -q ACTIVE $IBDEVICE/state</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; then</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo ACTIVE</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; fi</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; echo -n &quot;.&quot;</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; sleep 5</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
done</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
if (( count &lt;= 0 ))</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
then</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; echo DOWN - $0 timed out</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
fi</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; fi</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; ;;</font><br><font size=3>&nbsp; stop|restart|reload|force-reload|condrestart|try-restart)</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; ;;</font><br><font size=3>&nbsp; status)</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; if [[ -n $IBDEVICE &amp;&amp;
-f $IBDEVICE/state ]]</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; then</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
echo &quot;$IBDEVICE is $(&lt; $IBDEVICE/state) $(&lt; $IBDEVICE/rate)&quot;</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; else</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
echo &quot;No IBDEVICE found&quot;</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; fi</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; ;;</font><br><font size=3>&nbsp; *)</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; echo &quot;Usage: ibready
{start|stop|status|restart|reload|force-reload|condrestart|try-restart}&quot;</font><br><font size=3>&nbsp; &nbsp; &nbsp; &nbsp; exit 2</font><br><font size=3>esac</font><br><font size=3>exit ${RETVAL}</font><br><font size=3>\u2014\u2014\u2014\u2014</font><br><br><font size=3>&nbsp; -- 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) &lt;</font><a href=mailto:marc.caubet@psi.ch><font size=3 color=blue><u>marc.caubet@psi.ch</u></font></a><font size=3>&gt;
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 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</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&amp;d=DwMFaQ&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&amp;m=u-EMob09-dkE6jZbD3dTjBi3vWhmDXtxiOK3nqFyIgY&amp;s=Cn4NIxkWXmTOrwjnMFpO8KxH1BvuZLdC5_C9fwPSQCg&amp;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&amp;d=DwMFaQ&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&amp;m=u-EMob09-dkE6jZbD3dTjBi3vWhmDXtxiOK3nqFyIgY&amp;s=JCfJgq6pZnKUI6d-rIgJXVcdZh7vmA5ypB1_goP_FFA&amp;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&amp;d=DwICAg&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&amp;m=u-EMob09-dkE6jZbD3dTjBi3vWhmDXtxiOK3nqFyIgY&amp;s=JCfJgq6pZnKUI6d-rIgJXVcdZh7vmA5ypB1_goP_FFA&amp;e="><tt><font size=2>https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listinfo_gpfsug-2Ddiscuss&amp;d=DwICAg&amp;c=jf_iaSHvJObTbx-siA1ZOg&amp;r=p_1XEUyoJ7-VJxF_w8h9gJh8_Wj0Pey73LCLLoxodpw&amp;m=u-EMob09-dkE6jZbD3dTjBi3vWhmDXtxiOK3nqFyIgY&amp;s=JCfJgq6pZnKUI6d-rIgJXVcdZh7vmA5ypB1_goP_FFA&amp;e=</font></tt></a><tt><font size=2><br></font></tt><br><br><BR>