Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Versions available for this page: CUBRID 8.4.0 |  CUBRID 8.4.1 |  CUBRID 8.4.3 |  CUBRID 9.0.0 | 



Utilities of cubrid heartbeat

start

This utility is used to start all components of CUBRID HA in the node (database server process, replication log copy process, replication log reflection process).

Note that a master node or a slave node is determined based on the execution order of cubrid heartbeat start.

How to execute the command is as shown below.

$ cubrid heartbeat start

$

cubrid server start only starts cub_server process of the database, regardless of HA mode configuration. If you want to start all HA related processes, you can execute cubrid heartbeat start.

stop

This utility is used to stop all components of CUBRID HA in the node (database server process, replication log copy process, replication log reflection process). The node that executes this command stops and a failover occurs to the next slave node according to the CUBRID HA configuration.

How to use this utility is as shown below.

$ cubrid heartbeat stop

$

cubrid server stop only starts cub_server process of the database, regardless of HA mode configuration. The database does not restart, and failover does not occur. If you want to stop all HA related processes, you can execute cubrid heartbeat stop.

reload

This utility is used to retrieve the CUBRID HA information again, and it starts or stops the CUBRID HA components according to new CUBRID HA configuration. You can modify the information of ha_node_list and ha_replica_list. If an error occurs during the command execution, the node will stop.

How to use this utility is as shown below.

$ cubrid heartbeat reload

$

deact

This utility is used to exclude the node from the CUBRID HA group. A node in which deact is executed will be excluded from the CUBRID HA group and the CUBRID HA components will stop. The status of this node is displayed as unknown when you verify it by using cubrid heartbeat status. You can include the node to the CUBRID HA group back by executing act.

It is recommended that this command be used only when it is unavoidable.

How to use this utility is as shown below.

$ cubrid heartbeat deact

$

deregister

This utility is used to terminate applylogdb or copylogdb, the CUBRID HA configuration processes. Specifies the process to be terminated when executing deregister by using the process ID. It is used to pause the replication of the HA log (copylogdb) or the reflection of replication logs (applylogdb) for reconfiguring the master node. To restart HA functionalities, manually execute cubrid copylogdb or cubrid applylogdb.

It is recommended that this command only be used when it is unavoidable.

The following example shows how to use it.

$ cubrid heartbeat deregister <process-id>

$

The following is an example of re-executing the copylogdb after executing deregister. The -L option is used to specify the location where the copy of a transaction log will be stored. The -m option is used to save the replica of the transaction log; it behaves like the ha_copy_sync_mode parameter of cubrid_ha.conf. Specify the option values with the values set in the cubrid_ha.conf file.

$ cubrid copylogdb –L /home/cubrid/DB/testdb01_masterdb.cub –m async testdb

$

The following is an example of re-executing the applylogdb after executing deregister. The -L option is used to specify the location where the saved transaction log will be read. The --max_mem-size is the maximum memory size that the applylogdb will use. This behaves like the ha_apply_max_mem_size parameter in the cubrid_ha.conf file. Specify the option values with the values set in the cubrid_ha.conf file.

$ cubrid applylogdb –L /home/cubrid/DB/testdb01_masterdb.cub --max-mem-size=500 testdb

$

act

This utility is used to includes nodes back in the CUBRID HA group, and it starts the CUBRID HA components. 

It is recommended that this command only be used when it is unavoidable.

How to use this utility is as shown below.

$ cubrid heartbeat act

$

status

This utility is used to output the information of CUBRID HA group and CUBRID HA components.

How to use this utility is as shown below.

$ cubrid heartbeat status

@ cubrid heartbeat list

 

 HA-Node Info (current slaved.cub, state slave)

   Node slavedb.cub (priority 2, state slave)

   Node masterdb.cub (priority 1, state master)

 

 

 HA-Process Info (master 2143, state slave)

   Applylogdb testdb01@localhost:/home/cubrid/DB/testdb01_slavedb.cub (pid 2510, state registered)

   Copylogdb testdb01@masterdb.cub:/home/cubrid/DB/testdb01_masterdb.cub (pid 2505, state registered)

   Server testdb01 (pid 2393, state registered)

 

$