Hi, a gpfs.mount target should be automatically created at boot by the systemd-fstab-generator from the fstab entry, so no need with hackery like ismountet.txt... ----- Original Message -----
From: "Jonathan Buzzard" <jonathan.buzzard@strath.ac.uk> To: gpfsug-discuss@spectrumscale.org Sent: Tuesday, 28 April, 2020 13:38:01 Subject: Re: [gpfsug-discuss] wait for mount during gpfs startup
Yuck, and double yuck. There are many things you can say about systemd (and I have a choice few) but one of them is that it makes this sort of hackery obsolete. At least that is one of it goals.
A systemd way to do it would be via one or more helper units. So lets assume your GPFS file system is mounted on /gpfs, then create a file called ismounted.txt on it and then create a unit called say gpfs_mounted.target that looks like
# gpfs_mounted.target [Unit] TimeoutStartSec=infinity ConditionPathExists=/gpfs/ismounted.txt ExecStart=/usr/bin/sleep 10 RemainAfterExit=yes
Then the main unit gets
Wants=gpfs_mounted.target After=gpfs_mounted.target
If you are using scripts in systemd you are almost certainly doing it wrong :-)
JAB.
-- Jonathan A. Buzzard Tel: +44141-5483420 HPC System Administrator, ARCHIE-WeSt. University of Strathclyde, John Anderson Building, Glasgow. G4 0NG _______________________________________________ gpfsug-discuss mailing list gpfsug-discuss at spectrumscale.org http://gpfsug.org/mailman/listinfo/gpfsug-discuss
