Score:0

RHEL 8 manage server boot order

cn flag

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

Score:1
cn flag

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
cn flag
thank you, by adding RequiresMountsFor= entry is service will be "wait" to NFS share to be available or service start process will failed ? the requirement that service will wait until NFS share will be available and then start the service.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.