GPFS autoload - wait for IB ports to become active
Hi all, 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. Thanks a lot, Marc _________________________________________ Paul Scherrer Institut High Performance Computing Marc Caubet Serrabou WHGA/036 5232 Villigen PSI Switzerland Telephone: +41 56 310 46 67 E-Mail: marc.caubet@psi.ch
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! Regards, — ddj ——- [ddj@storage041 ~]$ cat /etc/init.d/ibready #! /bin/bash # # chkconfig: 2345 06 94 # /etc/rc.d/init.d/ibready # written in 2016 David D Johnson (ddj <at> brown.edu) # ### BEGIN INIT INFO # Provides: ibready # Required-Start: # Required-Stop: # Default-Stop: # Description: Block until infiniband is ready # Short-Description: Block until infiniband is ready ### END INIT INFO RETVAL=0 if [[ -d /sys/class/infiniband ]] then IBDEVICE=$(dirname $(grep -il infiniband /sys/class/infiniband/*/ports/1/link* | head -n 1)) fi # See how we were called. case "$1" in start) if [[ -n $IBDEVICE && -f $IBDEVICE/state ]] then echo -n "Polling for InfiniBand link up: " for (( count = 60; count > 0; count-- )) do if grep -q ACTIVE $IBDEVICE/state then echo ACTIVE break fi echo -n "." sleep 5 done if (( count <= 0 )) then echo DOWN - $0 timed out fi fi ;; stop|restart|reload|force-reload|condrestart|try-restart) ;; status) if [[ -n $IBDEVICE && -f $IBDEVICE/state ]] then echo "$IBDEVICE is $(< $IBDEVICE/state) $(< $IBDEVICE/rate)" else echo "No IBDEVICE found" fi ;; *) echo "Usage: ibready {start|stop|status|restart|reload|force-reload|condrestart|try-restart}" exit 2 esac exit ${RETVAL} ———— -- ddj Dave Johnson
On Mar 8, 2018, at 6:10 AM, Caubet Serrabou Marc (PSI) <marc.caubet@psi.ch> wrote:
Hi all,
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.
Thanks a lot, Marc _________________________________________ Paul Scherrer Institut High Performance Computing Marc Caubet Serrabou WHGA/036 5232 Villigen PSI Switzerland
Telephone: +41 56 310 46 67 E-Mail: marc.caubet@psi.ch _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
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. Fred __________________________________________________ Fred Stock | IBM Pittsburgh Lab | 720-430-8821 stockf@us.ibm.com From: david_johnson@brown.edu To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/08/2018 07:34 AM Subject: Re: [gpfsug-discuss] GPFS autoload - wait for IB ports to become active Sent by: gpfsug-discuss-bounces@spectrumscale.org 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! Regards, — ddj ——- [ddj@storage041 ~]$ cat /etc/init.d/ibready #! /bin/bash # # chkconfig: 2345 06 94 # /etc/rc.d/init.d/ibready # written in 2016 David D Johnson (ddj <at> brown.edu) # ### BEGIN INIT INFO # Provides: ibready # Required-Start: # Required-Stop: # Default-Stop: # Description: Block until infiniband is ready # Short-Description: Block until infiniband is ready ### END INIT INFO RETVAL=0 if [[ -d /sys/class/infiniband ]] then IBDEVICE=$(dirname $(grep -il infiniband /sys/class/infiniband/*/ports/1/link* | head -n 1)) fi # See how we were called. case "$1" in start) if [[ -n $IBDEVICE && -f $IBDEVICE/state ]] then echo -n "Polling for InfiniBand link up: " for (( count = 60; count > 0; count-- )) do if grep -q ACTIVE $IBDEVICE/state then echo ACTIVE break fi echo -n "." sleep 5 done if (( count <= 0 )) then echo DOWN - $0 timed out fi fi ;; stop|restart|reload|force-reload|condrestart|try-restart) ;; status) if [[ -n $IBDEVICE && -f $IBDEVICE/state ]] then echo "$IBDEVICE is $(< $IBDEVICE/state) $(< $IBDEVICE/rate)" else echo "No IBDEVICE found" fi ;; *) echo "Usage: ibready {start|stop|status|restart|reload|force-reload|condrestart|try-restart}" exit 2 esac exit ${RETVAL} ———— -- ddj Dave Johnson On Mar 8, 2018, at 6:10 AM, Caubet Serrabou Marc (PSI) <marc.caubet@psi.ch
wrote:
Hi all, 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. Thanks a lot, Marc _________________________________________ Paul Scherrer Institut High Performance Computing Marc Caubet Serrabou WHGA/036 5232 Villigen PSI Switzerland Telephone: +41 56 310 46 67 E-Mail: marc.caubet@psi.ch _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
I found some discussion on this at https://www.ibm.com/developerworks/community/forums/html/threadTopic?id=7777... and there it's claimed that none of the callback events are early enough to resolve this. That we need a pre-preStartup trigger. Any idea if this has changed -- or is the callback option then only to do a "--onerror shutdown" if it has failed to connect IB ? On Thu, Mar 8, 2018 at 1:42 PM, Frederick Stock <stockf@us.ibm.com> wrote:
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.
Fred __________________________________________________ Fred Stock | IBM Pittsburgh Lab | 720-430-8821 <(720)%20430-8821> stockf@us.ibm.com
From: david_johnson@brown.edu To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/08/2018 07:34 AM Subject: Re: [gpfsug-discuss] GPFS autoload - wait for IB ports to become active Sent by: gpfsug-discuss-bounces@spectrumscale.org ------------------------------
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!
Regards, — ddj ——- [ddj@storage041 ~]$ cat /etc/init.d/ibready #! /bin/bash # # chkconfig: 2345 06 94 # /etc/rc.d/init.d/ibready # written in 2016 David D Johnson (ddj <at> *brown.edu* <https://urldefense.proofpoint.com/v2/url?u=http-3A__brown.edu&d=DwMFaQ&c=jf_...> ) # ### BEGIN INIT INFO # Provides: ibready # Required-Start: # Required-Stop: # Default-Stop: # Description: Block until infiniband is ready # Short-Description: Block until infiniband is ready ### END INIT INFO
RETVAL=0 if [[ -d /sys/class/infiniband ]] then IBDEVICE=$(dirname $(grep -il infiniband /sys/class/infiniband/*/ports/1/link* | head -n 1)) fi # See how we were called. case "$1" in start) if [[ -n $IBDEVICE && -f $IBDEVICE/state ]] then echo -n "Polling for InfiniBand link up: " for (( count = 60; count > 0; count-- )) do if grep -q ACTIVE $IBDEVICE/state then echo ACTIVE break fi echo -n "." sleep 5 done if (( count <= 0 )) then echo DOWN - $0 timed out fi fi ;; stop|restart|reload|force-reload|condrestart|try-restart) ;; status) if [[ -n $IBDEVICE && -f $IBDEVICE/state ]] then echo "$IBDEVICE is $(< $IBDEVICE/state) $(< $IBDEVICE/rate)" else echo "No IBDEVICE found" fi ;; *) echo "Usage: ibready {start|stop|status|restart| reload|force-reload|condrestart|try-restart}" exit 2 esac exit ${RETVAL} ————
-- ddj Dave Johnson
On Mar 8, 2018, at 6:10 AM, Caubet Serrabou Marc (PSI) < *marc.caubet@psi.ch* <marc.caubet@psi.ch>> wrote:
Hi all,
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.
Thanks a lot, Marc _________________________________________ Paul Scherrer Institut High Performance Computing Marc Caubet Serrabou WHGA/036 5232 Villigen PSI Switzerland
Telephone: +41 56 310 46 67 <+41%2056%20310%2046%2067> E-Mail: *marc.caubet@psi.ch* <marc.caubet@psi.ch> _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at *spectrumscale.org* <https://urldefense.proofpoint.com/v2/url?u=http-3A__spectrumscale.org&d=DwMF...> *http://gpfsug.org/mailman/listinfo/gpfsug-discuss* <https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...> _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org 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-dkE6jZbD3dTjBi3vWhmDXtxiOK3nqF yIgY&s=JCfJgq6pZnKUI6d-rIgJXVcdZh7vmA5ypB1_goP_FFA&e=
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
The callback is the only way I know to use the "--onerror shutdown" option. Fred __________________________________________________ Fred Stock | IBM Pittsburgh Lab | 720-430-8821 stockf@us.ibm.com From: Jan-Frode Myklebust <janfrode@tanso.net> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/15/2018 01:14 PM Subject: Re: [gpfsug-discuss] GPFS autoload - wait for IB ports to becomeactive Sent by: gpfsug-discuss-bounces@spectrumscale.org I found some discussion on this at https://www.ibm.com/developerworks/community/forums/html/threadTopic?id=7777... and there it's claimed that none of the callback events are early enough to resolve this. That we need a pre-preStartup trigger. Any idea if this has changed -- or is the callback option then only to do a "--onerror shutdown" if it has failed to connect IB ? On Thu, Mar 8, 2018 at 1:42 PM, Frederick Stock <stockf@us.ibm.com> wrote: 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. Fred __________________________________________________ Fred Stock | IBM Pittsburgh Lab | 720-430-8821 stockf@us.ibm.com From: david_johnson@brown.edu To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/08/2018 07:34 AM Subject: Re: [gpfsug-discuss] GPFS autoload - wait for IB ports to become active Sent by: gpfsug-discuss-bounces@spectrumscale.org 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! Regards, — ddj ——- [ddj@storage041 ~]$ cat /etc/init.d/ibready #! /bin/bash # # chkconfig: 2345 06 94 # /etc/rc.d/init.d/ibready # written in 2016 David D Johnson (ddj <at> brown.edu) # ### BEGIN INIT INFO # Provides: ibready # Required-Start: # Required-Stop: # Default-Stop: # Description: Block until infiniband is ready # Short-Description: Block until infiniband is ready ### END INIT INFO RETVAL=0 if [[ -d /sys/class/infiniband ]] then IBDEVICE=$(dirname $(grep -il infiniband /sys/class/infiniband/*/ports/1/link* | head -n 1)) fi # See how we were called. case "$1" in start) if [[ -n $IBDEVICE && -f $IBDEVICE/state ]] then echo -n "Polling for InfiniBand link up: " for (( count = 60; count > 0; count-- )) do if grep -q ACTIVE $IBDEVICE/state then echo ACTIVE break fi echo -n "." sleep 5 done if (( count <= 0 )) then echo DOWN - $0 timed out fi fi ;; stop|restart|reload|force-reload|condrestart|try-restart) ;; status) if [[ -n $IBDEVICE && -f $IBDEVICE/state ]] then echo "$IBDEVICE is $(< $IBDEVICE/state) $(< $IBDEVICE/rate)" else echo "No IBDEVICE found" fi ;; *) echo "Usage: ibready {start|stop|status|restart|reload|force-reload|condrestart|try-restart}" exit 2 esac exit ${RETVAL} ———— -- ddj Dave Johnson On Mar 8, 2018, at 6:10 AM, Caubet Serrabou Marc (PSI) <marc.caubet@psi.ch
wrote:
Hi all, 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. Thanks a lot, Marc _________________________________________ Paul Scherrer Institut High Performance Computing Marc Caubet Serrabou WHGA/036 5232 Villigen PSI Switzerland Telephone: +41 56 310 46 67 E-Mail: marc.caubet@psi.ch _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi... _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
Thanks Olaf, but we don't use NetworkManager on this cluster.. I now created this simple script: ------------------------------------------------------------------------------------------------------------------------------------------------------------- #! /bin/bash - # # Fail mmstartup if not all configured IB ports are active. # # Install with: # # mmaddcallback fail-if-ibfail --command /var/mmfs/etc/fail-if-ibfail --event preStartup --sync --onerror shutdown # for port in $(/usr/lpp/mmfs/bin/mmdiag --config|grep verbsPorts | cut -f 4- -d " ") do grep -q ACTIVE /sys/class/infiniband/${port%/*}/ports/${port##*/}/state || exit 1 done ------------------------------------------------------------------------------------------------------------------------------------------------------------- which I haven't tested, but assume should work. Suggestions for improvements would be much appreciated! -jf On Thu, Mar 15, 2018 at 6:30 PM, Olaf Weiser <olaf.weiser@de.ibm.com> wrote:
you can try : systemctl enable NetworkManager-wait-online ln -s '/usr/lib/systemd/system/NetworkManager-wait-online.service' '/etc/systemd/system/multi-user.target.wants/NetworkManager-wait-online. service'
in many cases .. it helps ..
From: Jan-Frode Myklebust <janfrode@tanso.net> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/15/2018 06:18 PM Subject: Re: [gpfsug-discuss] GPFS autoload - wait for IB ports to becomeactive Sent by: gpfsug-discuss-bounces@spectrumscale.org ------------------------------
I found some discussion on this at *https://www.ibm.com/developerworks/community/forums/html/threadTopic?id=7777... <https://www.ibm.com/developerworks/community/forums/html/threadTopic?id=77777777-0000-0000-0000-000014471957&ps=25>and there it's claimed that none of the callback events are early enough to resolve this. That we need a pre-preStartup trigger. Any idea if this has changed -- or is the callback option then only to do a "--onerror shutdown" if it has failed to connect IB ?
On Thu, Mar 8, 2018 at 1:42 PM, Frederick Stock <*stockf@us.ibm.com* <stockf@us.ibm.com>> wrote: 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.
Fred __________________________________________________ Fred Stock | IBM Pittsburgh Lab | *720-430-8821* <(720)%20430-8821> *stockf@us.ibm.com* <stockf@us.ibm.com>
From: *david_johnson@brown.edu* <david_johnson@brown.edu> To: gpfsug main discussion list <*gpfsug-discuss@spectrumscale.org* <gpfsug-discuss@spectrumscale.org>> Date: 03/08/2018 07:34 AM Subject: Re: [gpfsug-discuss] GPFS autoload - wait for IB ports to become active Sent by: *gpfsug-discuss-bounces@spectrumscale.org* <gpfsug-discuss-bounces@spectrumscale.org> ------------------------------
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!
Regards, — ddj ——- [ddj@storage041 ~]$ cat /etc/init.d/ibready #! /bin/bash # # chkconfig: 2345 06 94 # /etc/rc.d/init.d/ibready # written in 2016 David D Johnson (ddj <at> *brown.edu* <https://urldefense.proofpoint.com/v2/url?u=http-3A__brown.edu&d=DwMFaQ&c=jf_...> ) # ### BEGIN INIT INFO # Provides: ibready # Required-Start: # Required-Stop: # Default-Stop: # Description: Block until infiniband is ready # Short-Description: Block until infiniband is ready ### END INIT INFO
RETVAL=0 if [[ -d /sys/class/infiniband ]] then IBDEVICE=$(dirname $(grep -il infiniband /sys/class/infiniband/*/ports/1/link* | head -n 1)) fi # See how we were called. case "$1" in start) if [[ -n $IBDEVICE && -f $IBDEVICE/state ]] then echo -n "Polling for InfiniBand link up: " for (( count = 60; count > 0; count-- )) do if grep -q ACTIVE $IBDEVICE/state then echo ACTIVE break fi echo -n "." sleep 5 done if (( count <= 0 )) then echo DOWN - $0 timed out fi fi ;; stop|restart|reload|force-reload|condrestart|try-restart) ;; status) if [[ -n $IBDEVICE && -f $IBDEVICE/state ]] then echo "$IBDEVICE is $(< $IBDEVICE/state) $(< $IBDEVICE/rate)" else echo "No IBDEVICE found" fi ;; *) echo "Usage: ibready {start|stop|status|restart| reload|force-reload|condrestart|try-restart}" exit 2 esac exit ${RETVAL} ————
-- ddj Dave Johnson
On Mar 8, 2018, at 6:10 AM, Caubet Serrabou Marc (PSI) < *marc.caubet@psi.ch* <marc.caubet@psi.ch>> wrote:
Hi all,
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.
Thanks a lot, Marc _________________________________________ Paul Scherrer Institut High Performance Computing Marc Caubet Serrabou WHGA/036 5232 Villigen PSI Switzerland
Telephone: *+41 56 310 46 67* <+41%2056%20310%2046%2067> E-Mail: *marc.caubet@psi.ch* <marc.caubet@psi.ch> _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at *spectrumscale.org* <https://urldefense.proofpoint.com/v2/url?u=http-3A__spectrumscale.org&d=DwMF...> *http://gpfsug.org/mailman/listinfo/gpfsug-discuss* <https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...> _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at *spectrumscale.org* <http://spectrumscale.org/>
*https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi... <https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...>
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at *spectrumscale.org* <http://spectrumscale.org/> *http://gpfsug.org/mailman/listinfo/gpfsug-discuss* <http://gpfsug.org/mailman/listinfo/gpfsug-discuss>
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
I have my doubts that mmdiag can be used in this script. In general the guidance is to avoid or be very careful with mm* commands in a callback due to the potential for deadlock. Fred __________________________________________________ Fred Stock | IBM Pittsburgh Lab | 720-430-8821 stockf@us.ibm.com From: Jan-Frode Myklebust <janfrode@tanso.net> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/16/2018 04:30 AM Subject: Re: [gpfsug-discuss] GPFS autoload - wait for IB ports tobecomeactive Sent by: gpfsug-discuss-bounces@spectrumscale.org Thanks Olaf, but we don't use NetworkManager on this cluster.. I now created this simple script: ------------------------------------------------------------------------------------------------------------------------------------------------------------- #! /bin/bash - # # Fail mmstartup if not all configured IB ports are active. # # Install with: # # mmaddcallback fail-if-ibfail --command /var/mmfs/etc/fail-if-ibfail --event preStartup --sync --onerror shutdown # for port in $(/usr/lpp/mmfs/bin/mmdiag --config|grep verbsPorts | cut -f 4- -d " ") do grep -q ACTIVE /sys/class/infiniband/${port%/*}/ports/${port##*/}/state || exit 1 done ------------------------------------------------------------------------------------------------------------------------------------------------------------- which I haven't tested, but assume should work. Suggestions for improvements would be much appreciated! -jf On Thu, Mar 15, 2018 at 6:30 PM, Olaf Weiser <olaf.weiser@de.ibm.com> wrote: you can try : systemctl enable NetworkManager-wait-online ln -s '/usr/lib/systemd/system/NetworkManager-wait-online.service' '/etc/systemd/system/multi-user.target.wants/NetworkManager-wait-online.service' in many cases .. it helps .. From: Jan-Frode Myklebust <janfrode@tanso.net> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/15/2018 06:18 PM Subject: Re: [gpfsug-discuss] GPFS autoload - wait for IB ports to becomeactive Sent by: gpfsug-discuss-bounces@spectrumscale.org I found some discussion on this at https://www.ibm.com/developerworks/community/forums/html/threadTopic?id=7777... and there it's claimed that none of the callback events are early enough to resolve this. That we need a pre-preStartup trigger. Any idea if this has changed -- or is the callback option then only to do a "--onerror shutdown" if it has failed to connect IB ? On Thu, Mar 8, 2018 at 1:42 PM, Frederick Stock <stockf@us.ibm.com> wrote: 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. Fred __________________________________________________ Fred Stock | IBM Pittsburgh Lab | 720-430-8821 stockf@us.ibm.com From: david_johnson@brown.edu To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/08/2018 07:34 AM Subject: Re: [gpfsug-discuss] GPFS autoload - wait for IB ports to become active Sent by: gpfsug-discuss-bounces@spectrumscale.org 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! Regards, — ddj ——- [ddj@storage041 ~]$ cat /etc/init.d/ibready #! /bin/bash # # chkconfig: 2345 06 94 # /etc/rc.d/init.d/ibready # written in 2016 David D Johnson (ddj <at> brown.edu) # ### BEGIN INIT INFO # Provides: ibready # Required-Start: # Required-Stop: # Default-Stop: # Description: Block until infiniband is ready # Short-Description: Block until infiniband is ready ### END INIT INFO RETVAL=0 if [[ -d /sys/class/infiniband ]] then IBDEVICE=$(dirname $(grep -il infiniband /sys/class/infiniband/*/ports/1/link* | head -n 1)) fi # See how we were called. case "$1" in start) if [[ -n $IBDEVICE && -f $IBDEVICE/state ]] then echo -n "Polling for InfiniBand link up: " for (( count = 60; count > 0; count-- )) do if grep -q ACTIVE $IBDEVICE/state then echo ACTIVE break fi echo -n "." sleep 5 done if (( count <= 0 )) then echo DOWN - $0 timed out fi fi ;; stop|restart|reload|force-reload|condrestart|try-restart) ;; status) if [[ -n $IBDEVICE && -f $IBDEVICE/state ]] then echo "$IBDEVICE is $(< $IBDEVICE/state) $(< $IBDEVICE/rate)" else echo "No IBDEVICE found" fi ;; *) echo "Usage: ibready {start|stop|status|restart|reload|force-reload|condrestart|try-restart}" exit 2 esac exit ${RETVAL} ———— -- ddj Dave Johnson On Mar 8, 2018, at 6:10 AM, Caubet Serrabou Marc (PSI) <marc.caubet@psi.ch
wrote:
Hi all, 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. Thanks a lot, Marc _________________________________________ Paul Scherrer Institut High Performance Computing Marc Caubet Serrabou WHGA/036 5232 Villigen PSI Switzerland Telephone: +41 56 310 46 67 E-Mail: marc.caubet@psi.ch _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi... _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
Can someone provide some clarification to this error message in my system logs: mmfs: [E] The on-disk StripeGroup descriptor of dcs3800u31b_lun7 sgId 0x0B00620A:9C84DF56 is not valid because of bad checksum: Mar 26 12:25:50 mmmnsd2 mmfs: 'mmfsadm writeDesc <device> sg 0B00620A:9C84DF56 2 /var/mmfs/tmp/sg_gscratch_dcs3800u31b_lun7', where device is the device name of that NSD. I’ve been unable to find anything while googling that provides any details about the error. Anyone have any thoughts or commands? We are using GPFS 4.2.3.-6, under RedHat 6 and 7. The NSD nodes are all RHEL 6. Any help appreciated. Thanks Jeff
Hallo Jeff, you can check these with following cmd. mmfsadm dump nsdcksum Your in memory info is inconsistent with your descriptor structur on disk. The reason for this I had no idea. Renar Grunenberg Abteilung Informatik – Betrieb HUK-COBURG Bahnhofsplatz 96444 Coburg Telefon: 09561 96-44110 Telefax: 09561 96-44104 E-Mail: Renar.Grunenberg@huk-coburg.de Internet: www.huk.de ________________________________ HUK-COBURG Haftpflicht-Unterstützungs-Kasse kraftfahrender Beamter Deutschlands a. G. in Coburg Reg.-Gericht Coburg HRB 100; St.-Nr. 9212/101/00021 Sitz der Gesellschaft: Bahnhofsplatz, 96444 Coburg Vorsitzender des Aufsichtsrats: Prof. Dr. Heinrich R. Schradin. Vorstand: Klaus-Jürgen Heitmann (Sprecher), Stefan Gronbach, Dr. Hans Olav Herøy, Dr. Jörg Rheinländer (stv.), Sarah Rössler, Daniel Thomas. ________________________________ Diese Nachricht enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese Nachricht irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Nachricht. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Nachricht ist nicht gestattet. This information may contain confidential and/or privileged information. If you are not the intended recipient (or have received this information in error) please notify the sender immediately and destroy this information. Any unauthorized copying, disclosure or distribution of the material in this information is strictly forbidden. ________________________________ Von: gpfsug-discuss-bounces@spectrumscale.org [mailto:gpfsug-discuss-bounces@spectrumscale.org] Im Auftrag von Jeffrey R. Lang Gesendet: Montag, 26. März 2018 23:14 An: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Betreff: Re: [gpfsug-discuss] GPFS autoload - wait for IB portstobecomeactive Can someone provide some clarification to this error message in my system logs: mmfs: [E] The on-disk StripeGroup descriptor of dcs3800u31b_lun7 sgId 0x0B00620A:9C84DF56 is not valid because of bad checksum: Mar 26 12:25:50 mmmnsd2 mmfs: 'mmfsadm writeDesc <device> sg 0B00620A:9C84DF56 2 /var/mmfs/tmp/sg_gscratch_dcs3800u31b_lun7', where device is the device name of that NSD. I’ve been unable to find anything while googling that provides any details about the error. Anyone have any thoughts or commands? We are using GPFS 4.2.3.-6, under RedHat 6 and 7. The NSD nodes are all RHEL 6. Any help appreciated. Thanks Jeff
This means that the stripe group descriptor on the disk dcs3800u31b_lun7 is corrupted. As we maintain copies of the stripe group descriptor on other disks as well we can copy the good descriptor from one of those disks to this one. Please open a PMR and work with IBM support to get this fixed. Regards, The Spectrum Scale (GPFS) team ------------------------------------------------------------------------------------------------------------------ If you feel that your question can benefit other users of Spectrum Scale (GPFS), then please post it to the public IBM developerWroks Forum at https://www.ibm.com/developerworks/community/forums/html/forum?id=11111111-0... . If your query concerns a potential software error in Spectrum Scale (GPFS) and you have an IBM software maintenance contract please contact 1-800-237-5511 in the United States or your local IBM Service Center in other countries. The forum is informally monitored as time permits and should not be used for priority messages to the Spectrum Scale (GPFS) team. From: "Jeffrey R. Lang" <JRLang@uwyo.edu> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/27/2018 04:15 AM Subject: Re: [gpfsug-discuss] GPFS autoload - wait for IB portstobecomeactive Sent by: gpfsug-discuss-bounces@spectrumscale.org Can someone provide some clarification to this error message in my system logs: mmfs: [E] The on-disk StripeGroup descriptor of dcs3800u31b_lun7 sgId 0x0B00620A:9C84DF56 is not valid because of bad checksum: Mar 26 12:25:50 mmmnsd2 mmfs: 'mmfsadm writeDesc <device> sg 0B00620A:9C84DF56 2 /var/mmfs/tmp/sg_gscratch_dcs3800u31b_lun7', where device is the device name of that NSD. I’ve been unable to find anything while googling that provides any details about the error. Anyone have any thoughts or commands? We are using GPFS 4.2.3.-6, under RedHat 6 and 7. The NSD nodes are all RHEL 6. Any help appreciated. Thanks Jeff_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...
Alternative solution we're trying... Create the file /etc/systemd/system/gpfs.service.d/delay.conf containing: [Service] ExecStartPre=/bin/sleep 60 Then I expect we should have long enough delay for infiniband to start before starting gpfs.. -jf On Fri, Mar 16, 2018 at 1:05 PM, Frederick Stock <stockf@us.ibm.com> wrote:
I have my doubts that mmdiag can be used in this script. In general the guidance is to avoid or be very careful with mm* commands in a callback due to the potential for deadlock.
Fred __________________________________________________ Fred Stock | IBM Pittsburgh Lab | 720-430-8821 stockf@us.ibm.com
From: Jan-Frode Myklebust <janfrode@tanso.net> To: gpfsug main discussion list <gpfsug-discuss@spectrumscale.org> Date: 03/16/2018 04:30 AM
Subject: Re: [gpfsug-discuss] GPFS autoload - wait for IB ports tobecomeactive Sent by: gpfsug-discuss-bounces@spectrumscale.org ------------------------------
Thanks Olaf, but we don't use NetworkManager on this cluster..
I now created this simple script:
------------------------------------------------------------ ------------------------------------------------------------ ------------------------------------- #! /bin/bash - # # Fail mmstartup if not all configured IB ports are active. # # Install with: # # mmaddcallback fail-if-ibfail --command /var/mmfs/etc/fail-if-ibfail --event preStartup --sync --onerror shutdown #
for port in $(/usr/lpp/mmfs/bin/mmdiag --config|grep verbsPorts | cut -f 4- -d " ") do grep -q ACTIVE /sys/class/infiniband/${port%/*}/ports/${port##*/}/state || exit 1 done ------------------------------------------------------------ ------------------------------------------------------------ -------------------------------------
which I haven't tested, but assume should work. Suggestions for improvements would be much appreciated!
-jf
On Thu, Mar 15, 2018 at 6:30 PM, Olaf Weiser <*olaf.weiser@de.ibm.com* <olaf.weiser@de.ibm.com>> wrote:
you can try : systemctl enable NetworkManager-wait-online ln -s '/usr/lib/systemd/system/NetworkManager-wait-online.service' '/etc/systemd/system/multi-user.target.wants/NetworkManager-wait-online. service'
in many cases .. it helps ..
From: Jan-Frode Myklebust <*janfrode@tanso.net* <janfrode@tanso.net>> To: gpfsug main discussion list <*gpfsug-discuss@spectrumscale.org* <gpfsug-discuss@spectrumscale.org>> Date: 03/15/2018 06:18 PM Subject: Re: [gpfsug-discuss] GPFS autoload - wait for IB ports to becomeactive Sent by: *gpfsug-discuss-bounces@spectrumscale.org* <gpfsug-discuss-bounces@spectrumscale.org> ------------------------------
I found some discussion on this at *https://www.ibm.com/developerworks/community/forums/html/threadTopic?id=7777... <https://www.ibm.com/developerworks/community/forums/html/threadTopic?id=77777777-0000-0000-0000-000014471957&ps=25>and there it's claimed that none of the callback events are early enough to resolve this. That we need a pre-preStartup trigger. Any idea if this has changed -- or is the callback option then only to do a "--onerror shutdown" if it has failed to connect IB ?
On Thu, Mar 8, 2018 at 1:42 PM, Frederick Stock <*stockf@us.ibm.com* <stockf@us.ibm.com>> wrote: 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.
Fred __________________________________________________ Fred Stock | IBM Pittsburgh Lab | *720-430-8821* <(720)%20430-8821> *stockf@us.ibm.com* <stockf@us.ibm.com>
From: *david_johnson@brown.edu* <david_johnson@brown.edu> To: gpfsug main discussion list <*gpfsug-discuss@spectrumscale.org* <gpfsug-discuss@spectrumscale.org>> Date: 03/08/2018 07:34 AM Subject: Re: [gpfsug-discuss] GPFS autoload - wait for IB ports to become active Sent by: *gpfsug-discuss-bounces@spectrumscale.org* <gpfsug-discuss-bounces@spectrumscale.org> ------------------------------
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!
Regards, — ddj ——- [ddj@storage041 ~]$ cat /etc/init.d/ibready #! /bin/bash # # chkconfig: 2345 06 94 # /etc/rc.d/init.d/ibready # written in 2016 David D Johnson (ddj <at> *brown.edu* <https://urldefense.proofpoint.com/v2/url?u=http-3A__brown.edu&d=DwMFaQ&c=jf_...> ) # ### BEGIN INIT INFO # Provides: ibready # Required-Start: # Required-Stop: # Default-Stop: # Description: Block until infiniband is ready # Short-Description: Block until infiniband is ready ### END INIT INFO
RETVAL=0 if [[ -d /sys/class/infiniband ]] then IBDEVICE=$(dirname $(grep -il infiniband /sys/class/infiniband/*/ports/1/link* | head -n 1)) fi # See how we were called. case "$1" in start) if [[ -n $IBDEVICE && -f $IBDEVICE/state ]] then echo -n "Polling for InfiniBand link up: " for (( count = 60; count > 0; count-- )) do if grep -q ACTIVE $IBDEVICE/state then echo ACTIVE break fi echo -n "." sleep 5 done if (( count <= 0 )) then echo DOWN - $0 timed out fi fi ;; stop|restart|reload|force-reload|condrestart|try-restart) ;; status) if [[ -n $IBDEVICE && -f $IBDEVICE/state ]] then echo "$IBDEVICE is $(< $IBDEVICE/state) $(< $IBDEVICE/rate)" else echo "No IBDEVICE found" fi ;; *) echo "Usage: ibready {start|stop|status|restart| reload|force-reload|condrestart|try-restart}" exit 2 esac exit ${RETVAL} ————
-- ddj Dave Johnson
On Mar 8, 2018, at 6:10 AM, Caubet Serrabou Marc (PSI) < *marc.caubet@psi.ch* <marc.caubet@psi.ch>> wrote:
Hi all,
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.
Thanks a lot, Marc _________________________________________ Paul Scherrer Institut High Performance Computing Marc Caubet Serrabou WHGA/036 5232 Villigen PSI Switzerland
Telephone: *+41 56 310 46 67* <+41%2056%20310%2046%2067> E-Mail: *marc.caubet@psi.ch* <marc.caubet@psi.ch> _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at *spectrumscale.org* <https://urldefense.proofpoint.com/v2/url?u=http-3A__spectrumscale.org&d=DwMF...> *http://gpfsug.org/mailman/listinfo/gpfsug-discuss* <https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...> _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at *spectrumscale.org* <https://urldefense.proofpoint.com/v2/url?u=http-3A__spectrumscale.org_&d=DwM...>
*https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi... <https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...>
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at *spectrumscale.org* <https://urldefense.proofpoint.com/v2/url?u=http-3A__spectrumscale.org_&d=DwM...> *http://gpfsug.org/mailman/listinfo/gpfsug-discuss* <https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...>
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at *spectrumscale.org* <https://urldefense.proofpoint.com/v2/url?u=http-3A__spectrumscale.org&d=DwMF...> *http://gpfsug.org/mailman/listinfo/gpfsug-discuss* <https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...>
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at *spectrumscale.org* <https://urldefense.proofpoint.com/v2/url?u=http-3A__spectrumscale.org&d=DwMF...> *http://gpfsug.org/mailman/listinfo/gpfsug-discuss* <https://urldefense.proofpoint.com/v2/url?u=http-3A__gpfsug.org_mailman_listi...>
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org 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= xImYTxt4pm1o5znVn5Vdoka2uxgsTRpmlCGdEWhB9vw&s= veOZZz80aBzoCTKusx6WOpVlYs64eNkp5pM9kbHgvic&e=
_______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
participants (8)
-
Caubet Serrabou Marc (PSI) -
david_johnson@brown.edu -
Frederick Stock -
Grunenberg, Renar -
IBM Spectrum Scale -
Jan-Frode Myklebust -
Jeffrey R. Lang -
Olaf Weiser
