<font size=2 face="sans-serif">I also for using callbacks ( as that's
the "right" way for GPFS to report an event) instead of polling
for status.</font><br><font size=2 face="sans-serif">One exception is the umount case, in
which when using bind mounts ( which is quite common for "namespace
virtualization") one should use the preunmount  user exit instead
of callback ( callback wouldn't work on these cases) for more info check
</font><a href="https://www.ibm.com/developerworks/community/wikis/home?lang=en-gb#!/wiki/General%20Parallel%20File%20System%20(GPFS)/page/User%20Exits"><font size=2 color=blue face="sans-serif">https://www.ibm.com/developerworks/community/wikis/home?lang=en-gb#!/wiki/General%20Parallel%20File%20System%20(GPFS)/page/User%20Exits</font></a><br><br><font size=2 face="sans-serif"><br>Regards,<br><br>Tomer Perry<br>Scalable I/O Development (Spectrum Scale)<br>email: tomp@il.ibm.com<br>1 Azrieli Center, Tel Aviv 67021, Israel<br>Global Tel:    +1 720 3422758<br>Israel Tel:      +972 3 9188625<br>Mobile:         +972 52 2554625<br></font><br><br><br><br><font size=1 color=#5f5f5f face="sans-serif">From:      
 </font><font size=1 face="sans-serif">Simon Thompson <S.J.Thompson@bham.ac.uk></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">15/03/2019 10:53</font><br><font size=1 color=#5f5f5f face="sans-serif">Subject:    
   </font><font size=1 face="sans-serif">Re: [gpfsug-discuss]
Systemd configuration to wait for mount of SS filesystem</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=2 face="Calibri">+1 for using callbacks, we use the Mount
and preUnMount callbacks on various things, e.g. before unmount, shutdown
all the VMs running on the host, i.e. start and stop other things cleanly
when the FS arrives/before it goes away.</font><br><font size=2 face="Calibri"> </font><br><font size=2 face="Calibri">Simon</font><br><font size=2 face="Calibri"> </font><br><font size=3 face="Calibri"><b>From: </b><gpfsug-discuss-bounces@spectrumscale.org>
on behalf of "stockf@us.ibm.com" <stockf@us.ibm.com><b><br>Reply-To: </b>"gpfsug-discuss@spectrumscale.org" <gpfsug-discuss@spectrumscale.org><b><br>Date: </b>Thursday, 14 March 2019 at 21:04<b><br>To: </b>"gpfsug-discuss@spectrumscale.org" <gpfsug-discuss@spectrumscale.org><b><br>Cc: </b>"gpfsug-discuss@spectrumscale.org" <gpfsug-discuss@spectrumscale.org><b><br>Subject: </b>Re: [gpfsug-discuss] Systemd configuration to wait for mount
of SS filesystem</font><br><font size=2 face="Calibri"> </font><br><font size=3 face="Arial">But if all you are waiting for is the mount
to occur the invocation of the callback informs you the file system has
been mounted.  You would be free to start a command in the background,
with appropriate protection, and exit the callback script.  Also,
making the callback script run asynchronous means GPFS will not wait for
it to complete and that greatly mitigates any potential problems with GPFS
commands, if you need to run them from the script.</font><br><font size=3 face="Arial"><br>Fred<br>__________________________________________________<br>Fred Stock | IBM Pittsburgh Lab | 720-430-8821<br>stockf@us.ibm.com</font><br><font size=3 face="Arial"> </font><br><font size=3 face="Arial"> </font><br><font size=3 face="Arial">----- Original message -----<br>From: "Stephen R Buchanan" <stephen.buchanan@us.ibm.com><br>Sent by: gpfsug-discuss-bounces@spectrumscale.org<br>To: gpfsug-discuss@spectrumscale.org<br>Cc:<br>Subject: Re: [gpfsug-discuss] Systemd configuration to wait for mount of
SS filesystem<br>Date: Thu, Mar 14, 2019 4:52 PM<br>  </font><br><font size=1 face="Arial">The man page for mmaddcallback specifically
cautions against running "commands that involve GPFS files" because
it "may cause unexpected and undesired results, including loss of
file system availability." While I can imagine some kind of Rube Goldberg-esque
chain of commands that I could run locally that would trigger the GPFS-filesystem-based
commands I really want, I don't think mmaddcallback is the droid I'm looking
for.</font><br><font size=2 face="Arial"> </font><br><font size=1><b>Stephen R. Wall Buchanan</b><br>Sr. IT Specialist</font><font size=1 face="Arial"><br>IBM Data & AI North America Government Expert Labs</font><font size=1><br>+1 (571) 299-4601<br>stephen.buchanan@us.ibm.com</font><br><font size=1 face="Arial"> </font><br><font size=1 face="Arial"> </font><br><font size=1 face="Arial">----- Original message -----<br>From: "Frederick Stock" <stockf@us.ibm.com><br>Sent by: gpfsug-discuss-bounces@spectrumscale.org<br>To: gpfsug-discuss@spectrumscale.org<br>Cc: gpfsug-discuss@spectrumscale.org<br>Subject: Re: [gpfsug-discuss] Systemd configuration to wait for mount of
SS filesystem<br>Date: Thu, Mar 14, 2019 4:17 PM<br>  </font><br><font size=3 face="Arial">It is not systemd based but you might want
to look at the user callback feature in GPFS (mmaddcallback).  There
is a file system mount callback you could register.</font><br><font size=3 face="Arial"><br>Fred<br>__________________________________________________<br>Fred Stock | IBM Pittsburgh Lab | 720-430-8821<br>stockf@us.ibm.com</font><br><font size=3 face="Arial"> </font><br><font size=3 face="Arial"> </font><br><font size=3 face="Arial">----- Original message -----<br>From: "Stephen R Buchanan" <stephen.buchanan@us.ibm.com><br>Sent by: gpfsug-discuss-bounces@spectrumscale.org<br>To: gpfsug-discuss@spectrumscale.org<br>Cc:<br>Subject: [gpfsug-discuss] Systemd configuration to wait for mount of SS
filesystem<br>Date: Thu, Mar 14, 2019 3:58 PM<br>  </font><br><font size=1 face="Arial">I searched the list archives with no obvious
results.</font><br><font size=1 face="Arial"> </font><br><font size=1 face="Arial">I have an application that runs completely
from a Spectrum Scale filesystem that I would like to start automatically
on boot, obviously after the SS filesystem mounts, on multiple nodes. There
are groups of nodes for dev, test, and production, (separate clusters)
and the target filesystems are different between them (and are named differently,
so the paths are different), but all nodes have an identical soft link
from root (/) that points to the environment-specific path. (see below
for details)</font><br><font size=1 face="Arial"> </font><br><font size=1 face="Arial">My first effort before I did any research
was to try to simply use a directive of After=gpfs.service which anyone
who has tried it will know that the gpfs.service returns as "started"
far in advance (and independently of) when filesystems are actually mounted.</font><br><font size=1 face="Arial"> </font><br><font size=1 face="Arial">What I want is to be able to deploy a systemd
service-unit and path-unit pair of files (that are as close to identical
as possible across the environments) that wait for /appbin/builds/ to be
available (/[dev|tst|prd]01/ to be mounted) and then starts the application.
The problem is that systemd.path units, specifically the 'PathExists='
directive, don't follow symbolic links, so I would need to customize the
path unit file for each environment with the full (real) path. There are
other differences between the environments that I believe I can handle
by specifying an EnvironmentFile directive -- but that would come from
the SS filesystem so as to be a single reference point, so it can't help
with the path unit.</font><br><font size=1 face="Arial"> </font><br><font size=1 face="Arial">Any suggestions are welcome and appreciated.</font><br><font size=1 face="Arial"> </font><br><font size=1 face="Arial">dev:(path names have been slightly generalized,
but the structure is identical)</font><br><font size=1 face="Arial">SS filesystem: /dev01</font><br><font size=1 face="Arial">full path: /dev01/app-bin/user-tree/builds/</font><br><font size=1 face="Arial">soft link: /appbin/ -> /dev01/app-bin/user-tree/</font><br><font size=1 face="Arial"> </font><br><font size=1 face="Arial">test:</font><br><font size=1 face="Arial">SS filesystem: /tst01</font><br><font size=1 face="Arial">full path: /tst01/app-bin/user-tree/builds/</font><br><font size=1 face="Arial">soft link: /appbin/ -> /tst01/app-bin/user-tree/</font><br><font size=1 face="Arial"> </font><br><font size=1 face="Arial">prod:</font><br><font size=1 face="Arial">SS filesystem: /prd01</font><br><font size=1 face="Arial">full path: /prd01/app-bin/user-tree/builds/</font><br><font size=1 face="Arial">soft link: /appbin/ -> /prd01/app-bin/user-tree/</font><br><font size=1 face="Arial"> </font><br><font size=2 face="Arial"> </font><br><font size=1><b>Stephen R. Wall Buchanan</b><br>Sr. IT Specialist</font><font size=1 face="Arial"><br>IBM Data & AI North America Government Expert Labs</font><font size=1><br>+1 (571) 299-4601<br>stephen.buchanan@us.ibm.com</font><br><font size=3 face="Arial">  </font><br><font size=2 face="Courier New">_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org</font><font size=2 color=blue face="Courier New"><u><br></u></font><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss" target="_blank"><font size=2 color=blue face="Courier New"><u>http://gpfsug.org/mailman/listinfo/gpfsug-discuss</u></font></a><br><font size=3 face="Arial"> </font><br><font size=1 face="Arial">  </font><br><font size=2 face="Courier New">_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org</font><font size=2 color=blue face="Courier New"><u><br></u></font><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss" target="_blank"><font size=2 color=blue face="Courier New"><u>http://gpfsug.org/mailman/listinfo/gpfsug-discuss</u></font></a><br><font size=1 face="Arial"> </font><br><font size=3 face="Arial">  </font><br><font size=2 face="Courier New">_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org</font><font size=2 color=blue face="Courier New"><u><br></u></font><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss" target="_blank"><font size=2 color=blue face="Courier New"><u>http://gpfsug.org/mailman/listinfo/gpfsug-discuss</u></font></a><br><font size=3 face="Arial"> </font><br><font size=2 face="Calibri"><br></font><tt><font size=2>_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org<br></font></tt><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss"><tt><font size=2>http://gpfsug.org/mailman/listinfo/gpfsug-discuss</font></tt></a><tt><font size=2><br></font></tt><br><br><BR>