You can automatically start or stop the Mirroring Controller arbitration process when the operating system on the arbitration server is started or stopped.
Note
If you start the Mirroring Controller arbitration process, wait for time correction, network setup, and so on.
Perform the following procedure:
Create a unit file.
Copy the unit file sample stored in the directory below, and revise it to match the target instance.
Sample file
/installDir/share/mcarboi.service.sample
Example) In the following example, the installation directory is "/opt/fsepv<x>assistant", and the identifier of the arbitration process is "arbiter1". Note that "<x>" indicates the product version.
# cp /opt/fsepv<x>assistant/share/mcarboi.service.sample /usr/lib/systemd/system/mcarboi_arbiter1.service
Revise the underlined portions of the options below in the unit file.
Section | Option | Specified value | Description |
---|---|---|---|
Unit | Description | Fujitsu Enterprise Postgres Mirroring Controller Arbiter <arbitrationProcessId> | Specifies the feature overview. Specifies the identifier of the targeted arbitration process. (*1) |
Service | ExecStart | /bin/bash -c 'installDir/bin/mc_arb_std start installDir mirroringControllerArbitrationProcessMgmtDir mc_arbOption' | Command to be executed when the service is started. Specify the option you want to add when the mc_arb command is executed without the -M option in the mc_arb option. Note that the content specified in this mc_arb option is carried over from the mc_arb_std command in "Specified value" to the mc_arb command. |
ExecStop | /bin/bash -c 'installDir/bin/ mc_arb_std stop installDir mirroringControllerArbitrationProcessMgmtDir mc_arbOption' | Command to be executed when the service is stopped. Specify the option you want to add when the mc_arb command is executed without the -M option in the mc_arb option. Note that the content specified in this mc_arb option is carried over from the mc_arb_std command in "Specified value" to the mc_arb command. | |
User | User | Specify the account of the operating system user. | |
Group | Group | Specify the group to which the user belongs. |
*1: The arbitration process identifier used here is a name for identifying the Mirroring Controller arbitration process.
The naming conventions for identifying the Mirroring Controller arbitration process are as follows:
- Up to 16 bytes
- The first character must be an ASCII alphabetic character
- The other characters must be ASCII alphanumeric characters
Enable automatic start and stop.
As the operating system superuser, use the systemctl command to enable automatic start and stop.
Example)
# systemctl enable mcarboi_arbiter1.service