<div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:12pt" ><div dir="ltr" >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.</div>
<div dir="ltr" ><div class="socmaildefaultfont" dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10.5pt" ><div dir="ltr" ><br><span style="font-size:1.143em;" >Fred<br>__________________________________________________<br>Fred Stock | IBM Pittsburgh Lab | 720-430-8821<br>stockf@us.ibm.com</span></div></div></div>
<div dir="ltr" > </div>
<div dir="ltr" > </div>
<blockquote data-history-content-modified="1" dir="ltr" style="border-left:solid #aaaaaa 2px; margin-left:5px; padding-left:5px; direction:ltr; margin-right:0px" >----- 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> 
<div dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:9pt" ><div dir="ltr" >I searched the list archives with no obvious results.</div>
<div dir="ltr" > </div>
<div dir="ltr" >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)</div>
<div dir="ltr" > </div>
<div dir="ltr" >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.</div>
<div dir="ltr" > </div>
<div dir="ltr" >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.</div>
<div dir="ltr" > </div>
<div dir="ltr" >Any suggestions are welcome and appreciated.</div>
<div dir="ltr" > </div>
<div dir="ltr" >dev:(path names have been slightly generalized, but the structure is identical)</div>
<div dir="ltr" >SS filesystem: /dev01</div>
<div dir="ltr" >full path: /dev01/app-bin/user-tree/builds/</div>
<div dir="ltr" >soft link: /appbin/ -> /dev01/app-bin/user-tree/</div>
<div dir="ltr" > </div>
<div dir="ltr" >test:</div>
<div dir="ltr" ><div>SS filesystem: /tst01</div>
<div>full path: /tst01/app-bin/user-tree/builds/</div>
<div>soft link: /appbin/ -> /tst01/app-bin/user-tree/</div>
<div> </div>
<div>prod:</div>
<div><div>SS filesystem: /prd01</div>
<div>full path: /prd01/app-bin/user-tree/builds/</div>
<div>soft link: /appbin/ -> /prd01/app-bin/user-tree/</div></div></div>
<div dir="ltr" > </div>
<div dir="ltr" ><div dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10.5pt" ><div dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10.5pt" ><div dir="ltr" style="font-family:Arial, Helvetica, sans-serif;font-size:10.5pt" ><div dir="ltr" style="font-family:Arial;font-size:10.5pt" ><div dir="ltr" > </div>
<div dir="ltr" ><font size="2" face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" ><span style="font-size:12px; line-height:18px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;" ><span style="font-weight:bold;" >Stephen R. Wall Buchanan</span><br>Sr. IT Specialist</span></font><br><span style="font-size:0.857em;" >IBM Data & AI North America Government Expert Labs</span><br><font size="2" face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" ><span style="font-size:12px; line-height:18px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;" >+1 (571) 299-4601<br>stephen.buchanan@us.ibm.com</span></font></div></div></div></div></div></div></div> 

<div><font size="2" face="Default Monospace,Courier New,Courier,monospace" >_______________________________________________<br>gpfsug-discuss mailing list<br>gpfsug-discuss at spectrumscale.org<br><a href="http://gpfsug.org/mailman/listinfo/gpfsug-discuss" target="_blank">http://gpfsug.org/mailman/listinfo/gpfsug-discuss</a></font></div></blockquote>
<div dir="ltr" > </div></div><BR>