diff --git a/product_docs/docs/efm/4/05_using_efm.mdx b/product_docs/docs/efm/4/05_using_efm.mdx index fe797d2ee82..6a7c7601131 100644 --- a/product_docs/docs/efm/4/05_using_efm.mdx +++ b/product_docs/docs/efm/4/05_using_efm.mdx @@ -265,27 +265,39 @@ After creating the `acctg.properties` and `sales.properties` files, create a ser ### RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x -If you're using RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x, copy the `edb-efm-4.` unit file to a new file with a name that is unique for each cluster. For example, if you have two clusters named acctg and sales, the unit file names might be: +If you're using RHEL/CentOS 7.x or RHEL/Rocky Linux/AlmaLinux 8.x, copy the service file `/usr/lib/systemd/system/edb-efm-4..service` to `/etc/systemd/system` with a new name that is unique for each cluster. -```text -/usr/lib/systemd/system/efm-acctg.service +For example, if you have two clusters named `acctg` and `sales` managed by Failover Manager 4.7, the unit file names might be `efm-acctg.service` and `efm-sales.service`, and they can be created with: -/usr/lib/systemd/system/efm-sales.service +```shell +cp /usr/lib/systemd/system/edb-efm-4.7.service /etc/systemd/system/efm-acctg.service +cp /usr/lib/systemd/system/edb-efm-4.7.service /etc/systemd/system/efm-sales.service ``` -Then, edit the `CLUSTER` variable in each unit file, changing the specified cluster name from `efm` to the new cluster name. For example, for a cluster named `acctg`, the value specifies: +Then use `systemctl edit` to edit the `CLUSTER` variable in each unit file, changing the specified cluster name from `efm` to the new cluster name. +Also update the value of the `PIDfile` parameter to match the new cluster name. -```text +In our example, edit the `acctg` cluster by running `systemctl edit efm-acctg.service` and write: + +```ini +[Service] Environment=CLUSTER=acctg +PIDFile=/run/efm-4.7/acctg.pid ``` -Also update the value of the `PIDfile` parameter to specify the new cluster name. For example: +And edit the `sales` cluster by running `systemctl edit efm-sales.service` and write: ```ini -PIDFile=/var/run/efm-4.7/acctg.pid +[Service] +Environment=CLUSTER=sales +PIDFile=/run/efm-4.7/sales.pid ``` -After copying the service scripts, enable the services: +!!!Note +You could also have edited the files in `/etc/systemd/system` directly, but then you'll have to run `systemctl daemon-reload`, which is unecessary when using `systemd edit` to change the override files. +!!! + +After saving the changes, enable the services: ```text # systemctl enable efm-acctg.service @@ -296,7 +308,7 @@ After copying the service scripts, enable the services: Then, use the new service scripts to start the agents. For example, to start the `acctg` agent: ```text -# systemctl start efm-acctg` +# systemctl start efm-acctg ``` For information about customizing a unit file, see [Understanding and administering systemd](https://docs.fedoraproject.org/en-US/quick-docs/understanding-and-administering-systemd/index.html).