[systemd-devel] Reacting to non-systemd mounts

Lennart Poettering lennart at poettering.net
Thu Aug 4 20:00:38 UTC 2016


On Thu, 04.08.16 16:34, Matteo Panella (matteo.panella at cnaf.infn.it) wrote:

> Hi,
> 
> sorry for bothering you with a fairly uncommon issue, but I haven't been
> able to find a solution so far and Google turned up empty.
> 
> I have some CentOS 7.2 machines with systemd 219 which are members of an
> IBM GPFS cluster and need to start up some services only after a
> specific GPFS filesystem is mounted.
> 
> Long story short, I can't simply add a Wants= dependency on the relevant
> mount unit because systemd would try to mount the filesystem and only
> GPFS itself should use mount.gpfs.

That is strange. /bin/mount.gpfs is a plug-in for /bin/mount, so that
it can mount file systems of that type correctly. It's a way how to
make sure that /bin/mount works on that fs too. If only GPFS is
supposed to call that tool, then it really shouldn't exist in the
first place.

> 
> Aside from busy-looping in a Type=oneshot unit while waiting for the
> mount to appear[1], is there any way to have systemd react to a mount
> unit becoming active as a result of a "manual" mount?

Well, what precisely mounts this? If that's some service, consider
just ordering your service of choice after it. (under the assumption
that the service reports to systemd when it finished what it needs to
do to set up the mounts).

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list