RHEL 8 manage server boot order

We run RHEL 8 servers we need to ensure NFS share is available or service running before start another service that depend on NFS share because that service need R/W into/from NFS share. what our options to achieve this request ? can we control which service will run on which order? I understand there is an option to add 'Required' entry into service. please assist.

BR Shlco


A systemd shortcut for depending on a certain path be mounted is RequiresMountsFor. Convenient as only the path is required, it will figure out the mounts needed.

Making up an example, say service thing requires NFS share /srv/data to be mounted. Taking advantage of drop-in directories, this override can be applied separately from the rest of the unit:

# /etc/systemd/system/thing.service.d/mount.conf
[Unit]
RequiresMountsFor=/srv/data