The customized script is not provided by eReplication. The script provider must ensure that the script is correct. Before configuring the script, ensure that the script has been verified.
During the script verification, the database is frozen and unfrozen repeatedly, which affects services. Therefore, you are advised to create a non-service MySQL database for the verification.
Deploying the eReplication Server Component
For details, see Installing the eReplication Server (Linux) Using a Software Package.
Deploying the eReplication Agent Component
For details, see Installing the eReplication Agent (Protecting Application Systems). Use the SUSE operating system to install the eReplication Agent component.
The eReplication Agent and eReplication Server components cannot be installed on the same VM.
Deploying the expect Component (Non-LVM Scenario)
During the installation, retain the default values for other parameters except the following three steps.

Accept License [yes] => 'A' >>A
Do you want to download a free trial of Komodo IDE? [Y/n] n
For example, in the SUSE operating system, run the which gcc command to check whether the gcc component exists.
#Add the zypper installation source. zipper as file://media/<path> iso #Check whether the software package to be installed can be found. zypper se gcc-c++ zypper se gcc #Install the required software packages. zypper insall gcc-c++ zypper install gcc
Use a browser to open the https://sourceforge.net/projects/expect/files/Expect/5.45.4/ page, and download the expect5.45.4.tar.gz source code package. Upload the file to the VM and run the following commands in sequence:
./configure --with-tclconfig=/opt/ActiveTcl-8.6/lib/ --with-tkconfig=/opt/ActiveTcl-8.6/lib/ make make install
File |
Permissions |
Function |
|---|---|---|
blanket.sh |
rdadmin: rdadmin 755 |
Common script for array operations. This script is referenced in mysqlstart.sh/mysqlstop.sh and users must have the execute permission. |
mysql.conf |
rdadmin: rdadmin 644 |
MySQL configuration file, which does not require the execute permission. |
mysqlstart.sh |
rdadmin: rdadmin 755 |
MySQL startup script. This script is used to configure the file in the eReplication Server protection process. Users must have the execute permission on the script. |
mysqlstop.sh |
rdadmin: rdadmin 755 |
Script for stopping the MySQL database. This script is configured in the eReplication Server protection process and requires the execute permission for users. |
mysqlquery.sh |
rdadmin: rdadmin 755 |
This script is used to query the frozen status of the MySQL database. This script is used to configure the file in the eReplication Server protection process. Users must have the execute permission on the script. |
mysqlfreeze.sh |
rdadmin: rdadmin 755 |
Script for freezing the MySQL database. This script is configured in the eReplication Server protection process and requires the execute permission. |
mysqlthaw.sh |
rdadmin: rdadmin 755 |
Script for unfreezing the MySQL database. This script is configured in the eReplication Server protection process and requires the execute permission. |
storage |
rdadmin: rdadmin 755 |
To encapsulate the expect script delivered by CLI commands, you must have the execute permission. |
Item |
Configuration Description |
|---|---|
MYSQL_USER |
MySQL database user. The default user is root. This user is used to log in to the database and perform operations such as freezing and unfreezing. |
MYSQL_PASSWORD |
MySQL database password. The password is used to log in to the database and perform operations such as freezing and unfreezing. |
VG_NAME |
Name of VG used by the MySQL database. This parameter is used to mount and start the MySQL database. To start VG, set this parameter based on the VG name. |
LV_NAME |
Name of LV used by the MySQL database. The LV name is used to mount and start the MySQL database. To start VG, set this parameter to the name of LV used by the MySQL database. |
DATA_FILE_PATH |
Data directory of the MySQL database. |
VOL_TYPE |
Type of the disk used by the MySQL database. 0 indicates the simple volume and 1 indicates LVM. |
STORAGE_USER |
User name of the disk array used by the MySQL database. |
STORAGE_PASSWORD |
Password of the disk array used by the MySQL database. |
STORAGE_LOCATION |
IP address of the disk array used by the MySQL database. |
LUN_ID |
ID of the LUN used by the MySQL database. |
The following shows a configuration example:
MYSQL_USER=root
MYSQL_PASSWORD=Psaaword
VOL_TYPE=1
DATA_FILE_PATH=/var/lib/mysql
[Simple Volume]
STORAGE_USER=
STORAGE_PASSWORD=
STORAGE_LOCATION=
LUN_ID=100
[LVM]
VG_NAME=vg_mysql
LV_NAME=lv_mysql
MYSQL_USER=root MYSQL_PASSWORD=Password VOL_TYPE=0 DATA_FILE_PATH=/var/lib/mysql [Simple Volume] STORAGE_USER=admin STORAGE_PASSWORD=Password STORAGE_LOCATION=10.10.10.10 LUN_ID=100 [LVM] VG_NAME= LV_NAME=
Warning: Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 309 Server version: 5.6.22 MySQL Community Server (GPL) Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show processlist;
+-----+------+-----------+------+---------+------+-------+------------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+-----------+------+---------+------+-------+------------------------+
| 334 | root | localhost | NULL | Query | 0 | init | select 1 and sleep(60) |
+-----+------+-----------+------+---------+------+-------+------------------------+
1 row in set (0.00 sec)
If the value of Info is select 1 and sleep(60), the MySQL database has been frozen.
Warning: Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 309 Server version: 5.6.22 MySQL Community Server (GPL) Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show processlist;
+-----+------+-----------+------+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+------+-----------+------+---------+------+-------+------------------+
| 334 | root | localhost | NULL | Query | 0 | init | |
+-----+------+-----------+------+---------+------+-------+------------------+
1 row in set (0.00 sec)
linux2:/home/rdadmin/Agent/sbin/thirdparty # cat ../../tmp/RST.txt 0 linux2:/home/rdadmin/Agent/sbin/thirdparty #
View the RST.txt file. If 0 is displayed, the MySQL database has been frozen. If 1 is displayed, the MySQL database has been frozen.
180611 18:28:33 mysqld_safe Logging to '/var/lib/mysql/mysql01.err'. 180611 18:28:33 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
SUCCESS! MySQL running (25995)
ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists