Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »


After the DRX Configuration File is created, it is ready to start replication. You can start replication by starting (up) the replication resource with the following commands.
Startup of resources provides a way to start all resources in the configuration file at once with control over the DRX services already prepared during installation or individually through a command-type utility. The following is a description of this

5.1. Service Control

Control of a service depends on the service control commands provided by the OS. The following service control commands were described OS-separated.

5.1.1. Service Startup


Windows
c:\>sc start drxsvc 
Linux
# CentOS 7 
[root@node1 ~]# systemctl start drxsvc
# CentOS 6
[root@node1 ~]# service drxsvc start 

5.1.2. Service stop


Windows
c:\>sc stop drxsvc 
Linux
# CentOS 7 
[root@node1 ~]# systemctl stop drxsvc
# CentOS 6
[root@node1 ~]# service drxsvc stop

5.1.3 Watchdog

The DRX Service includes DRX Watchdog for management of the DRX Process. Watchdogs can restart the DRX if it detects an unusual shutdown of the DRX process in the following situations.

  • the DRX process ended unexpectedly
  • You shut down the DRX using the "drx-ctl shutdown" command. 

This restart by Watchdog is permanently recorded in the DRX Log and is left in history.
Because the DRX process is automatically restarted by Watchdog when it terminates under normal circumstances, you must exit the DRX Service Stop to completely terminate the DRX process.

5.2. Resource Control

To control the resource individually, use the up/down command in drx-ctl. you can also start/stop all resources using the 'all' option in drx-ctl.

  • Up of drx-ctl and up provided by drbdadm have different functional meanings. The up in drbdadm is the command that prepares the replication target device for the resource and the up in drx-ctl to create a channel that intermediates replication connections.
  • The procedure requires drbdadm up after drx-ctl-up to connect to the replication. This is because the connection between drbd and drbd must be attempted after the DRX intermediary channel is prepared in advance to reduce the delay in establishing replication connections.

5.2.1. Resource Startup

drx-ctl up [resource or all]

5.2.2. Resource Stop

drx-ctl down [resource or all]


5.3. Change Settings

The settings in the DRX can be changed by changing the contents of the configuration file or by using the drx-ctl set command.

DRX does not provide commands to modify resource files or apply changes to files to change settings. Modifying a resource file is subject to manual intervention by the user.

5.3.1. Static Change Settings

The way users change the contents of a configuration file and restart resources is called a static change settings.

NameDefaultDescription
languageenglishLanguage setting.
base-dirDRX_PATH (Env variable)Set the default route.
drbd-confDRBD_PATH (Env variable)Set the path of drbd.
connect-timeout10Connection timeout
bwlimit0Bandwidth limitations on the network. 0 is unlimited and can be set to K, M, G (Unit Bytes Per Seconds)
loglevel-fileinfoLog level to write to file
loglevel-stdoutinfoThe log level to output to the console when running foreground
logfile-max-size10MMaximum size of log file
logfile-max-count10eaMaximum number of log files
performance-logoffLogging of performance data
ip-verificationonConfirmation of binding IP that listens for connection
process-thread-count-1Number of threads for packet processing. "-1" is auto and set to 1/2 of the number of CPU cores
block63KBlock size to be used for compression/encryption
min-raw-block-size1KMinimal packet size to send as plain text even when compression/encryption is set.

5.3.2. Dynamic Change Settings

Using the drx-ctl set command to change real-time settings during operation is called dynamic setting change. Settings through the set command are temporary, not reflected in the contents of the actual resource configuration file.

CommandDescriptionAliasOutput sample
drx-ctl up [connect name or all]Activate the resourceN/A
up
< Upload the selected resources >
[root@c73-p1 dgkim]# drx-ctl up r0
DR-1-3-c73-p2-c73-p1: up.
Result: 1 resource(s) up.

[root@c73-p1 dgkim]#

< upload all resources >
[root@c73-p1 dgkim]# drx-ctl up all
DR-1-3-c73-p2-c73-p1: up.
DR-2-3-c73-p2-c73-p1: up.
Result: 2 resource(s) up.

[root@c73-p1 dgkim]#

drx-ctl down [connect name or all]Deactivate the resource"
down
< Down the selected resource >
[root@c73-p1 dgkim]# drx-ctl down r0
DR-1-3-c73-p2-c73-p1: resource down.
Result: 1 resource(s) down.

[root@c73-p1 dgkim]#

< down all resources >
[root@c73-p1 dgkim]# drx-ctl down all
DR-1-3-c73-p2-c73-p1: resource down.
DR-2-3-c73-p2-c73-p1: resource down.
Result: 2 resource(s) down.

[root@c73-p1 dgkim]#
 
drx-ctl adjust [connect name or all] 

The running resource is updated, and the inactive resource is up.

"
adjust
[root@c73-p1 drbd.d]# drx-ctl adjust all
DR-1-3-c73-p2-c73-p1: up.
DR-2-3-c73-p2-c73-p1: up.
Result: 2 resource(s) updated.

[root@c73-p1 drbd.d]#
drx-ctl set compress [type] [level] [connect name] Set up a compression plugin."

set compress
< Set the LZ4 compression plugin only for DR-1-3-c73-p2-c73-p1 >
[root@c73-p1 dgkim]# drx-ctl set compress lz4 1 DR-1-3-c73-p2-c73-p1
Result: 1 resource(s) updated.

[root@c73-p1 dgkim]#

< log >
I1126 17:31:10.271886 t77473 DR-1-3-c73-p2-c73-p1:ad] Set compressor: LZ4
I1126 17:31:10.271918 t77473 DR-1-3-c73-p2-c73-p1:ad] Set compressor level: 1
I1126 17:31:10.271924 t77473 DR-1-3-c73-p2-c73-p1:cm] Set compressor: LZ4
I1126 17:31:10.271925 t77473 DR-1-3-c73-p2-c73-p1:cm] Set compressor level: 1


< Turn off the compression plugin only for DR-1-3-c73-p2-c73-p1 >
[root@c73-p1 dgkim]# drx-ctl set compress none 0 DR-1-3-c73-p2-c73-p1
DR-1-3-c73-p2-c73-p1: updated.
Result: 1 resource(s) updated.

[root@c73-p1 dgkim]#

< log >
I1126 17:31:37.741765 t77473 DR-1-3-c73-p2-c73-p1:ad] Set compressor: NONE
I1126 17:31:37.741795 t77473 DR-1-3-c73-p2-c73-p1:ad] Set compressor level: 1
I1126 17:31:37.741800 t77473 DR-1-3-c73-p2-c73-p1:cm] Set compressor: NONE
I1126 17:31:37.741802 t77473 DR-1-3-c73-p2-c73-p1:cm] Set compressor level: 1


< Set the LZ4 compression plugin for all resources >
[root@c73-p1 dgkim]# drx-ctl set compress lz4 1 all
Result: 2 resource(s) updated.

[root@c73-p1 dgkim]#

< log >
I1126 17:32:30.656067 t77473 DR-1-3-c73-p2-c73-p1:ad] Set compressor: LZ4
I1126 17:32:30.656089 t77473 DR-1-3-c73-p2-c73-p1:ad] Set compressor level: 1
I1126 17:32:30.656095 t77473 DR-1-3-c73-p2-c73-p1:cm] Set compressor: LZ4
I1126 17:32:30.656118 t77473 DR-2-3-c73-p2-c73-p1:am] Set compressor: LZ4
I1126 17:32:30.656096 t77473 DR-1-3-c73-p2-c73-p1:cm] Set compressor level: 1
I1126 17:32:30.656133 t77473 DR-2-3-c73-p2-c73-p1:am] Set compressor level: 1
I1126 17:32:30.656138 t77473 DR-2-3-c73-p2-c73-p1:cd] Set compressor: LZ4
I1126 17:32:30.656139 t77473 DR-2-3-c73-p2-c73-p1:cd] Set compressor level: 1


drx-ctl set crypto [on or off] [connect name] Set up a crypto plugin."
set crypto
< Set the crypto plugin only for DR-1-3-c73-p2-c73-p1 > 
[root@c73-p1 dgkim]# drx-ctl set crypto on DR-1-3-c73-p2-c73-p1
DR-1-3-c73-p2-c73-p1: updated.
Result: 1 resource(s) updated.

[root@c73-p1 dgkim]# 

< log >
I1126 17:10:10.611963 t77473 DR-1-3-c73-p2-c73-p1:ad] Set crypto: OPENSSL
I1126 17:10:10.611987 t77473 DR-1-3-c73-p2-c73-p1:cm] Set crypto: OPENSSL


< Set up the crypto plugin for all resources > 
[root@c73-p1 dgkim]# drx-ctl set crypto on all
DR-2-3-c73-p2-c73-p1: updated.
Result: 2 resource(s) updated.

[root@c73-p1 dgkim]# 

< log >
I1126 17:08:26.156687 t77473 DR-1-3-c73-p2-c73-p1:ad] Set crypto: OPENSSL
I1126 17:08:26.156713 t77473 DR-2-3-c73-p2-c73-p1:am] Set crypto: OPENSSL
I1126 17:08:26.156702 t77473 DR-1-3-c73-p2-c73-p1:cm] Set crypto: OPENSSL
I1126 17:08:26.156719 t77473 DR-2-3-c73-p2-c73-p1:cd] Set crypto: OPENSSL


< Turn off the crypto plugin on all resources > 
[root@c73-p1 dgkim]# drx-ctl set crypto off all
DR-1-3-c73-p2-c73-p1: updated.
DR-2-3-c73-p2-c73-p1: updated.
Result: 2 resource(s) updated.

[root@c73-p1 dgkim]# 

< log >
I1206 14:12:59.701227 t81344 DR-1-3-c73-p2-c73-p1:am] Set crypto: NONE
I1206 14:12:59.701250 t81344 DR-1-3-c73-p2-c73-p1:cd] Set crypto: NONE
I1206 14:12:59.701305 t81344 DR-2-3-c73-p2-c73-p1:ad] Set crypto: NONE
I1206 14:12:59.701315 t81344 DR-2-3-c73-p2-c73-p1:cm] Set crypto: NONE

drx-ctl set bwlimit [limit] [connect name] Set up bandwidth"
set bwlimit
< Only DR-1-3-c73-p2-c73-p1 sets the bandwidth to 1G. >
[root@c73-p1 dgkim]# drx-ctl set bwlimit 1G DR-1-3-c73-p2-c73-p1
DR-1-3-c73-p2-c73-p1: updated.
Result: 1 resource(s) updated.

[root@c73-p1 dgkim]#

< log >
I1126 17:21:11.633557 t77473 DR-1-3-c73-p2-c73-p1:ad] Set bandwidth limit: 1.00 GB
I1126 17:21:11.633573 t77473 DR-1-3-c73-p2-c73-p1:cm] Set bandwidth limit: 1.00 GB


< Set the bandwidth of all resources to 100M. >
[root@c73-p1 dgkim]# drx-ctl set bwlimit 100M all
DR-1-3-c73-p2-c73-p1: updated.
DR-2-3-c73-p2-c73-p1: updated.
Result: 2 resource(s) updated.

[root@c73-p1 dgkim]#

< log >
I1126 17:20:55.431890 t77473 DR-1-3-c73-p2-c73-p1:ad] Set bandwidth limit: 100.00 MB
I1126 17:20:55.431916 t77473 DR-1-3-c73-p2-c73-p1:cm] Set bandwidth limit: 100.00 MB
I1126 17:20:55.431964 t77473 DR-2-3-c73-p2-c73-p1:am] Set bandwidth limit: 100.00 MB
I1126 17:20:55.431984 t77473 DR-2-3-c73-p2-c73-p1:cd] Set bandwidth limit: 100.00 MB

drx-ctl set license [file-path]Change the license information."
  • After verifying the license validity of the specified path, change the license information of the default path.
  • It does not change the behavior of the DRX process because it must maintain resource association when changing to a valid license.
set license
C:\Users\Administrator>drx-ctl set license drx.lic
License status : Temporary, Expire date: 30-nov-2018, Validity day: 4
Result: done.


C:\Users\Administrator>

< log >
I1127 09:28:40.374185 t5880 main] Verify license is available
I1127 09:28:40.374185 t5880 main:license] Checking license for [C:\Users\Administrator\drx.lic]
I1127 09:28:40.374185 t5880 main:license] License Status: Temporary, Expire date: 30-nov-2018, Validity day: 4
I1127 09:28:40.389865 t5880 main] License applied
drx-ctl reset statistics [connect name or all] Initializes the statisticst
reset statistics
< Initializes only the statistic value of DR-1-3-c73-p2-c73-p1 >
[root@c73-p1 dgkim]# drx-ctl reset st DR-1-3-c73-p2-c73-p1
DR-1-3-c73-p2-c73-p1: reseted.
Result: 1 resource(s) reseted.

[root@c73-p1 dgkim]#


< Initializes statistical values for all resources. >
[root@c73-p1 dgkim]# drx-ctl reset st all
DR-1-3-c73-p2-c73-p1: reseted.
DR-2-3-c73-p2-c73-p1: reseted.
Result: 2 resource(s) reseted.

[root@c73-p1 dgkim]#

  • No labels