benchmarksql 5.0压测MySQL

在Oracle Linux 7.6使用benchmarksql 5.0压测MySQL 5.7

一.下载&编译安装

1.先要确定服务器是否安装了 JDK1.8

[root@localhost /]# java -version
java version "1.7.0_75"
OpenJDK Runtime Environment (rhel-2.5.4.2.0.1.el7_0-x86_64 u75-b13)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)

因为自带jdk存储在/usr/lib/jvm下,需要将其删除。

[root@localhost lib]# mv jvm jvmold
[root@localhost lib]# java -version
-bash: /usr/bin/java: ???

2.安装JDK1.8

[root@localhost /]# tar -zxvf jdk-linux-x64.tar.gz

[root@localhost /]# mkdir /usr/java
[root@localhost /]# mv jdk1.8.0_131 /usr/java/
[root@localhost /]# vi /etc/profile
....
export JAVA_HOME=/usr/java/jdk1.8.0_131
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib:$CLASSPATH
export JAVA_PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin
export PATH=$PATH:${JAVA_PATH}

[root@localhost /]# source /etc/profile
[root@localhost /]# java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

[root@localhost /]# unzip benchmarksql-5.0.zip
[root@localhost /]# cd benchmarksql-5.0/

修改benchmarksql源码

修改jTPCCConfig.java文件

[root@localhost benchmarksql-5.0]# vi src/client/jTPCCConfig.java
/*
* jTPCCConfig - Basic configuration parameters for jTPCC
*
* Copyright (C) 2003, Raul Barbosa
* Copyright (C) 2004-2016, Denis Lussier
* Copyright (C) 2016, Jan Wieck
*
*/

import java.text.*;

public interface jTPCCConfig
{
public final static String JTPCCVERSION = "5.0";

public final static int DB_UNKNOWN = 0,
DB_FIREBIRD = 1,
DB_ORACLE = 2,
DB_POSTGRES = 3,
DB_MYSQL =4;

public final static int NEW_ORDER = 1,
PAYMENT = 2,
ORDER_STATUS = 3,
DELIVERY = 4,
STOCK_LEVEL = 5;

public final static String[] nameTokens = {"BAR", "OUGHT", "ABLE", "PRI", "PRES", "ESE", "ANTI", "CALLY", "ATION", "EING"};

public final static SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

public final static int configCommitCount = 10000; // commit every n records in LoadData

public final static int configWhseCount = 10;
public final static int configItemCount = 100000; // tpc-c std = 100,000
public final static int configDistPerWhse = 10; // tpc-c std = 10
public final static int configCustPerDist = 3000; // tpc-c std = 3,000
}

修改benchmarksql-5.0/src/client/jTPCC.java,增加mysql相关部分

[root@localhost benchmarksql-5.0]# vi src/client/jTPCC.java
/*
* jTPCC - Open Source Java implementation of a TPC-C like benchmark
*
* Copyright (C) 2003, Raul Barbosa
* Copyright (C) 2004-2016, Denis Lussier
* Copyright (C) 2016, Jan Wieck
*
*/

import org.apache.log4j.*;

import java.io.*;
import java.nio.file.*;
import java.sql.*;
import java.util.*;
import java.util.regex.Pattern;
import java.text.*;

public class jTPCC implements jTPCCConfig
{
private static org.apache.log4j.Logger log = Logger.getLogger(jTPCC.class);
private static String resultDirName = null;
private static BufferedWriter resultCSV = null;
private static BufferedWriter runInfoCSV = null;
private static int runID = 0;

private int dbType = DB_UNKNOWN;
private int currentlyDisplayedTerminal;

private jTPCCTerminal[] terminals;
private String[] terminalNames;
private boolean terminalsBlockingExit = false;
private long terminalsStarted = 0, sessionCount = 0, transactionCount = 0;
private Object counterLock = new Object();

private long newOrderCounter = 0, sessionStartTimestamp, sessionEndTimestamp, sessionNextTimestamp=0, sessionNextKounter=0;
private long sessionEndTargetTime = -1, fastNewOrderCounter, recentTpmC=0, recentTpmTotal=0;
private boolean signalTerminalsRequestEndSent = false, databaseDriverLoaded = false;

private FileOutputStream fileOutputStream;
private PrintStream printStreamReport;
private String sessionStart, sessionEnd;
private int limPerMin_Terminal;

private double tpmC;
private jTPCCRandom rnd;
private OSCollector osCollector = null;

public static void main(String args[])
{
PropertyConfigurator.configure("log4j.properties");
new jTPCC();
}

private String getProp (Properties p, String pName)
{
String prop = p.getProperty(pName);
log.info("Term-00, " + pName + "=" + prop);
return(prop);
}

public jTPCC()
{

// load the ini file
Properties ini = new Properties();
try {
ini.load( new FileInputStream(System.getProperty("prop")));
} catch (IOException e) {
errorMessage("Term-00, could not load properties file");
}

log.info("Term-00, ");
log.info("Term-00, +-------------------------------------------------------------+");
log.info("Term-00, BenchmarkSQL v" + JTPCCVERSION);
log.info("Term-00, +-------------------------------------------------------------+");
log.info("Term-00, (c) 2003, Raul Barbosa");
log.info("Term-00, (c) 2004-2016, Denis Lussier");
log.info("Term-00, (c) 2016, Jan Wieck");
log.info("Term-00, +-------------------------------------------------------------+");
log.info("Term-00, ");
String iDB = getProp(ini,"db");
String iDriver = getProp(ini,"driver");
String iConn = getProp(ini,"conn");
String iUser = getProp(ini,"user");
String iPassword = ini.getProperty("password");

log.info("Term-00, ");
String iWarehouses = getProp(ini,"warehouses");
String iTerminals = getProp(ini,"terminals");

String iRunTxnsPerTerminal = ini.getProperty("runTxnsPerTerminal");
String iRunMins = ini.getProperty("runMins");
if (Integer.parseInt(iRunTxnsPerTerminal) ==0 && Integer.parseInt(iRunMins)!=0){
log.info("Term-00, runMins" + "=" + iRunMins);
}else if(Integer.parseInt(iRunTxnsPerTerminal) !=0 && Integer.parseInt(iRunMins)==0){
log.info("Term-00, runTxnsPerTerminal" + "=" + iRunTxnsPerTerminal);
}else{
errorMessage("Term-00, Must indicate either transactions per terminal or number of run minutes!");
};
String limPerMin = getProp(ini,"limitTxnsPerMin");
String iTermWhseFixed = getProp(ini,"terminalWarehouseFixed");
log.info("Term-00, ");
String iNewOrderWeight = getProp(ini,"newOrderWeight");
String iPaymentWeight = getProp(ini,"paymentWeight");
String iOrderStatusWeight = getProp(ini,"orderStatusWeight");
String iDeliveryWeight = getProp(ini,"deliveryWeight");
String iStockLevelWeight = getProp(ini,"stockLevelWeight");

log.info("Term-00, ");
String resultDirectory = getProp(ini, "resultDirectory");
String osCollectorScript = getProp(ini, "osCollectorScript");

log.info("Term-00, ");

if (iDB.equals("firebird"))
dbType = DB_FIREBIRD;
else if (iDB.equals("oracle"))
dbType = DB_ORACLE;
else if (iDB.equals("postgres"))
dbType = DB_POSTGRES;
else if (iDB.equals("mysql"))
dbType = DB_MYSQL;
else
{
log.error("unknown database type '" + iDB + "'");
return;

修改benchmarksql-5.0/src/client/jTPCCConnection.java, SQL子查询增加”AS L”别名,如下所示:

[root@localhost benchmarksql-5.0]# vi src/client/jTPCCConnection.java
switch (dbType)
{
case jTPCCConfig.DB_POSTGRES:
stmtStockLevelSelectLow = dbConn.prepareStatement(
"SELECT count(*) AS low_stock FROM (" +
" SELECT s_w_id, s_i_id, s_quantity " +
" FROM bmsql_stock " +
" WHERE s_w_id = ? AND s_quantity < ? AND s_i_id IN (" +
" SELECT ol_i_id " +
" FROM bmsql_district " +
" JOIN bmsql_order_line ON ol_w_id = d_w_id " +
" AND ol_d_id = d_id " +
" AND ol_o_id >= d_next_o_id - 20 " +
" AND ol_o_id < d_next_o_id " +
" WHERE d_w_id = ? AND d_id = ? " +
" ) " +
" ) AS L");
break;

default:
stmtStockLevelSelectLow = dbConn.prepareStatement(
"SELECT count(*) AS low_stock FROM (" +
" SELECT s_w_id, s_i_id, s_quantity " +
" FROM bmsql_stock " +
" WHERE s_w_id = ? AND s_quantity < ? AND s_i_id IN (" +
" SELECT ol_i_id " +
" FROM bmsql_district " +
" JOIN bmsql_order_line ON ol_w_id = d_w_id " +
" AND ol_d_id = d_id " +
" AND ol_o_id >= d_next_o_id - 20 " +
" AND ol_o_id < d_next_o_id " +
" WHERE d_w_id = ? AND d_id = ? " +
" ) " +
" )AS L"); // " )");
break;
}

[root@localhost benchmarksql-5.0]# ant
Buildfile: /benchmarksql-5.0/build.xml

init:
[mkdir] Created dir: /benchmarksql-5.0/build

compile:
[javac] Compiling 11 source files to /benchmarksql-5.0/build
[javac] /benchmarksql-5.0/src/client/jTPCCRandom.java:143: : EUC_CN [javac] * be able to represent 128 different characters. '#@!%%???'
[javac] ^
[javac] /benchmarksql-5.0/src/client/jTPCCRandom.java:143: : EUC_CN [javac] * be able to represent 128 different characters. '#@!%%???'
[javac] ^
[javac] /benchmarksql-5.0/src/client/jTPCCRandom.java:143: : EUC_CN [javac] * be able to represent 128 different characters. '#@!%%???'
[javac] ^
[javac] 3

BUILD FAILED
/benchmarksql-5.0/build.xml:24: Compile failed; see the compiler error output for details.

Total time: 1 second

修改字符集

[root@localhost benchmarksql-5.0]# cat /etc/oracle-release
Oracle Linux Server release 7.6
[root@localhost benchmarksql-5.0]# locale
LANG=zh_CN.gb2312
LC_CTYPE="zh_CN.gb2312"
LC_NUMERIC="zh_CN.gb2312"
LC_TIME="zh_CN.gb2312"
LC_COLLATE="zh_CN.gb2312"
LC_MONETARY="zh_CN.gb2312"
LC_MESSAGES="zh_CN.gb2312"
LC_PAPER="zh_CN.gb2312"
LC_NAME="zh_CN.gb2312"
LC_ADDRESS="zh_CN.gb2312"
LC_TELEPHONE="zh_CN.gb2312"
LC_MEASUREMENT="zh_CN.gb2312"
LC_IDENTIFICATION="zh_CN.gb2312"
LC_ALL=
[root@localhost benchmarksql-5.0]# cat /etc/sysconfig/i18n
cat: /etc/sysconfig/i18n: ???
[root@localhost benchmarksql-5.0]# cat cat /etc/locale.conf
cat: cat: ???
#LANG="en_US.UTF-8"
LANG="zh_CN.gb2312"
[root@localhost benchmarksql-5.0]# cat /etc/locale.conf
#LANG="en_US.UTF-8"
LANG="zh_CN.gb2312"
[root@localhost benchmarksql-5.0]# vi /etc/locale.conf
LANG="en_US.UTF-8"
#LANG="zh_CN.gb2312"

[root@localhost benchmarksql-5.0]# ant
Buildfile: /benchmarksql-5.0/build.xml

init:

compile:
[javac] Compiling 11 source files to /benchmarksql-5.0/build

dist:
[mkdir] Created dir: /benchmarksql-5.0/dist
[jar] Building jar: /benchmarksql-5.0/dist/BenchmarkSQL-5.0.jar

BUILD SUCCESSFUL
Total time: 2 seconds

添加mysql java connector驱动,mysql-connector-java-5.1.49.zip 需自行下载。

[root@localhost benchmarksql-5.0]# cd lib
[root@localhost lib]# ls
apache-log4j-extras-1.1.jar firebird log4j-1.2.17.jar oracle postgres
[root@localhost lib]# ls -lrt
total 820
drwxr-xr-x. 2 root root 43 May 26 2016 postgres
drwxr-xr-x. 2 root root 40 May 26 2016 oracle
-rwxr-xr-x. 1 root root 489883 May 26 2016 log4j-1.2.17.jar
drwxr-xr-x. 2 root root 58 May 26 2016 firebird
-rwxr-xr-x. 1 root root 346729 May 26 2016 apache-log4j-extras-1.1.jar
[root@localhost lib]# mkdir mysql

[root@localhost /]# unzip mysql-connector-java-5.1.49.zip

[root@localhost mysql-connector-java-5.1.49]# cp mysql-connector-java-5.1.49.jar /benchmarksql-5.0/lib/mysql/

[root@localhost mysql]# pwd
/benchmarksql-5.0/lib/mysql
[root@localhost mysql]# ls -lrt
total 984
-rw-r--r--. 1 root root 1006904 Nov 11 16:39 mysql-connector-java-5.1.49.jar

修改benchmarksql-5.0/run/runDatabaseBuild.sh,去掉extraHistID

[root@localhost benchmarksql-5.0]# vi run/runDatabaseBuild.sh
#!/bin/sh

if [ $# -lt 1 ] ; then
echo "usage: $(basename $0) PROPS [OPT VAL [...]]" >&2
exit 2
fi

PROPS="$1"
shift
if [ ! -f "${PROPS}" ] ; then
echo "${PROPS}: no such file or directory" >&2
exit 1
fi
DB="$(grep '^db=' $PROPS | sed -e 's/^db=//')"

BEFORE_LOAD="tableCreates"
#AFTER_LOAD="indexCreates foreignKeys extraHistID buildFinish"
AFTER_LOAD="indexCreates foreignKeys buildFinish"

for step in ${BEFORE_LOAD} ; do
./runSQL.sh "${PROPS}" $step
done

./runLoader.sh "${PROPS}" $*

for step in ${AFTER_LOAD} ; do
./runSQL.sh "${PROPS}" $step
done

修改funcs.sh 增加 mysql 数据库类型的驱动类文件目录。

[root@localhost benchmarksql-5.0]# vi run/funcs.sh
# ----
# $1 is the properties file
# ----
PROPS=$1
if [ ! -f ${PROPS} ] ; then
echo "${PROPS}: no such file" >&2
exit 1
fi

# ----
# getProp()
#
# Get a config value from the properties file.
# ----
function getProp()
{
grep "^${1}=" ${PROPS} | sed -e "s/^${1}=//"
}

# ----
# getCP()
#
# Determine the CLASSPATH based on the database system.
# ----
function setCP()
{
case "$(getProp db)" in
firebird)
cp="../lib/firebird/*:../lib/*"
;;
oracle)
cp="../lib/oracle/*"
if [ ! -z "${ORACLE_HOME}" -a -d ${ORACLE_HOME}/lib ] ; then
cp="${cp}:${ORACLE_HOME}/lib/*"
fi
cp="${cp}:../lib/*"
;;
postgres)
cp="../lib/postgres/*:../lib/*"
;;
mysql)
cp="../lib/mysql/*:../lib/*"
;;
esac
myCP=".:${cp}:../dist/*"
export myCP
}

# ----
# Make sure that the properties file does have db= and the value
# is a database, we support.
# ----
case "$(getProp db)" in
firebird|oracle|postgres|mysql)
;;
"") echo "ERROR: missing db= config option in ${PROPS}" >&2
exit 1
;;
*) echo "ERROR: unsupported database type 'db=$(getProp db)' in ${PROPS}" >&2
exit 1
;;
esac
"run/funcs.sh" 63L, 1177C written

配置测试文件,输入连接地址与用户名

[root@localhost run]# vi props.mysql
db=mysql
driver=com.mysql.jdbc.Driver
conn=jdbc:mysql://127.0.0.1:3306/test?useServerPrepStmts=true&useConfigs=maxPerformance&rewriteBatchedStatements=true
user=root
password=xxzx7817600
warehouses=100
loadWorkers=40
terminals=32
//To run specified transactions per terminal- runMins must equal zero
runTxnsPerTerminal=0
//To run for specified minutes- runTxnsPerTerminal must equal zero
runMins=10
//Number of total transactions per minute
limitTxnsPerMin=0
//Set to true to run in 4.x compatible mode. Set to false to use the
//entire configured database evenly.
terminalWarehouseFixed=true
//The following five values must add up to 100
//The default percentages of 45, 43, 4, 4 & 4 match the TPC-C spec
newOrderWeight=45
paymentWeight=43
orderStatusWeight=4
deliveryWeight=4
stockLevelWeight=4
// Directory name to create for collecting detailed result data.
// Comment this out to suppress.
resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
osCollectorScript=./misc/os_collector_linux.py
osCollectorInterval=1
//osCollectorSSHAddr=user@dbhost
//osCollectorDevices=net_eth0 blk_sda

[mysql@localhost run]$ ./runDatabaseBuild.sh prop.mysql
# ------------------------------------------------------------
# Loading SQL file ./sql.common/tableCreates.sql
# ------------------------------------------------------------
Fri Nov 11 16:57:18 CST 2022 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Unknown database 'benchmarksql'
Starting BenchmarkSQL LoadData

driver=com.mysql.jdbc.Driver
conn=jdbc:mysql://127.0.0.1:3306/test?useServerPrepStmts=true&useConfigs=maxPerformance&rewriteBatchedStatements=true
user=root
password=***********
warehouses=100
loadWorkers=40
fileLocation (not defined)
csvNullValue (not defined - using default 'NULL')

Fri Nov 11 16:57:19 CST 2022 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
ERROR: Unknown database 'benchmarksql'
# ------------------------------------------------------------
# Loading SQL file ./sql.common/indexCreates.sql
# ------------------------------------------------------------
Fri Nov 11 16:57:20 CST 2022 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Unknown database 'benchmarksql'
# ------------------------------------------------------------
# Loading SQL file ./sql.common/foreignKeys.sql
# ------------------------------------------------------------
Fri Nov 11 16:57:22 CST 2022 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Unknown database 'benchmarksql'
# ------------------------------------------------------------
# Loading SQL file ./sql.common/buildFinish.sql
# ------------------------------------------------------------
Fri Nov 11 16:57:23 CST 2022 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Unknown database 'benchmarksql'

不建议在没有服务器身份验证的情况下建立SSL连接。根据MySQL 5.5。45+, 5.6.26+和5.7。6+要求如果未设置显式选项,默认情况下必须建立SSL连接。为了符合不使用SSL的现有应用程序,verifyServerCertificate属性设置为“false”。您需要通过设置useSSL=false显式禁用SSL,或者设置useSSL=true并为服务器证书验证提供信任库。

解决方案:
在url后面加上?useSSL=false即可

jdbc:mysql://localhost:3306/userDb?useSSL=false
----------------
[mysql@localhost run]$ vi prop.mysql
db=mysql
driver=com.mysql.jdbc.Driver
conn=jdbc:mysql://127.0.0.1:3306/test?useSSL=false&useServerPrepStmts=true&useConfigs=maxPerformance&rewriteBatchedStatements=true
user=root
password=xxzx7817600
warehouses=100
loadWorkers=40
terminals=32
//To run specified transactions per terminal- runMins must equal zero
runTxnsPerTerminal=0
//To run for specified minutes- runTxnsPerTerminal must equal zero
runMins=10
//Number of total transactions per minute
limitTxnsPerMin=0
//Set to true to run in 4.x compatible mode. Set to false to use the
//entire configured database evenly.
terminalWarehouseFixed=true
//The following five values must add up to 100
//The default percentages of 45, 43, 4, 4 & 4 match the TPC-C spec
newOrderWeight=45
paymentWeight=43
orderStatusWeight=4
deliveryWeight=4
stockLevelWeight=4
// Directory name to create for collecting detailed result data.
// Comment this out to suppress.
resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
osCollectorScript=./misc/os_collector_linux.py
osCollectorInterval=1
//osCollectorSSHAddr=user@dbhost
//osCollectorDevices=net_eth0 blk_sda

[mysql@localhost run]$ ./runDatabaseBuild.sh props.mysql
# ------------------------------------------------------------
# Loading SQL file ./sql.common/tableCreates.sql
# ------------------------------------------------------------
create table bmsql_config (
cfg_name varchar(30) primary key,
cfg_value varchar(50)
);
create table bmsql_warehouse (
w_id integer not null,
w_ytd decimal(12,2),
w_tax decimal(4,4),
w_name varchar(10),
w_street_1 varchar(20),
w_street_2 varchar(20),
w_city varchar(20),
w_state char(2),
w_zip char(9)
);
create table bmsql_district (
d_w_id integer not null,
d_id integer not null,
d_ytd decimal(12,2),
d_tax decimal(4,4),
d_next_o_id integer,
d_name varchar(10),
d_street_1 varchar(20),
d_street_2 varchar(20),
d_city varchar(20),
d_state char(2),
d_zip char(9)
);
create table bmsql_customer (
c_w_id integer not null,
c_d_id integer not null,
c_id integer not null,
c_discount decimal(4,4),
c_credit char(2),
c_last varchar(16),
c_first varchar(16),
c_credit_lim decimal(12,2),
c_balance decimal(12,2),
c_ytd_payment decimal(12,2),
c_payment_cnt integer,
c_delivery_cnt integer,
c_street_1 varchar(20),
c_street_2 varchar(20),
c_city varchar(20),
c_state char(2),
c_zip char(9),
c_phone char(16),
c_since timestamp,
c_middle char(2),
c_data varchar(500)
);
create sequence bmsql_hist_id_seq;
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sequence bmsql_hist_id_seq' at line 1
create table bmsql_history (
hist_id integer,
h_c_id integer,
h_c_d_id integer,
h_c_w_id integer,
h_d_id integer,
h_w_id integer,
h_date timestamp,
h_amount decimal(6,2),
h_data varchar(24)
);
create table bmsql_new_order (
no_w_id integer not null,
no_d_id integer not null,
no_o_id integer not null
);
create table bmsql_oorder (
o_w_id integer not null,
o_d_id integer not null,
o_id integer not null,
o_c_id integer,
o_carrier_id integer,
o_ol_cnt integer,
o_all_local integer,
o_entry_d timestamp
);
create table bmsql_order_line (
ol_w_id integer not null,
ol_d_id integer not null,
ol_o_id integer not null,
ol_number integer not null,
ol_i_id integer not null,
ol_delivery_d timestamp,
ol_amount decimal(6,2),
ol_supply_w_id integer,
ol_quantity integer,
ol_dist_info char(24)
);
create table bmsql_item (
i_id integer not null,
i_name varchar(24),
i_price decimal(5,2),
i_data varchar(50),
i_im_id integer
);
create table bmsql_stock (
s_w_id integer not null,
s_i_id integer not null,
s_quantity integer,
s_ytd integer,
s_order_cnt integer,
s_remote_cnt integer,
s_data varchar(50),
s_dist_01 char(24),
s_dist_02 char(24),
s_dist_03 char(24),
s_dist_04 char(24),
s_dist_05 char(24),
s_dist_06 char(24),
s_dist_07 char(24),
s_dist_08 char(24),
s_dist_09 char(24),
s_dist_10 char(24)
);
Starting BenchmarkSQL LoadData

driver=com.mysql.jdbc.Driver
conn=jdbc:mysql://127.0.0.1:3306/test?useSSL=false&useServerPrepStmts=true&useConfigs=maxPerformance&rewriteBatchedStatements=true
user=root
password=***********
warehouses=100
loadWorkers=40
fileLocation (not defined)
csvNullValue (not defined - using default 'NULL')

Worker 000: Loading ITEM
Worker 001: Loading Warehouse 1
Worker 002: Loading Warehouse 2
Worker 003: Loading Warehouse 3
Worker 004: Loading Warehouse 4
Worker 005: Loading Warehouse 5
Worker 006: Loading Warehouse 6
Worker 007: Loading Warehouse 7
Worker 008: Loading Warehouse 8
Worker 010: Loading Warehouse 10
Worker 009: Loading Warehouse 9
Worker 011: Loading Warehouse 11
Worker 012: Loading Warehouse 12
Worker 013: Loading Warehouse 13
Worker 014: Loading Warehouse 14
Worker 015: Loading Warehouse 15
Worker 016: Loading Warehouse 16
Worker 017: Loading Warehouse 17
Worker 018: Loading Warehouse 18
Worker 019: Loading Warehouse 19
Worker 020: Loading Warehouse 20
Worker 021: Loading Warehouse 21
Worker 022: Loading Warehouse 22
Worker 023: Loading Warehouse 23
Worker 024: Loading Warehouse 24
Worker 025: Loading Warehouse 25
Worker 026: Loading Warehouse 26
Worker 027: Loading Warehouse 27
Worker 028: Loading Warehouse 28
Worker 029: Loading Warehouse 29
Worker 030: Loading Warehouse 30
Worker 032: Loading Warehouse 31
Worker 031: Loading Warehouse 32
Worker 033: Loading Warehouse 33
Worker 034: Loading Warehouse 34
Worker 035: Loading Warehouse 35
Worker 036: Loading Warehouse 36
Worker 037: Loading Warehouse 37
Worker 038: Loading Warehouse 38
Worker 039: Loading Warehouse 39
Worker 000: Loading ITEM done
Worker 000: Loading Warehouse 40
# ------------------------------------------------------------
# Loading SQL file ./sql.common/indexCreates.sql
# ------------------------------------------------------------
alter table bmsql_warehouse add constraint bmsql_warehouse_pkey
primary key (w_id);
alter table bmsql_district add constraint bmsql_district_pkey
primary key (d_w_id, d_id);
alter table bmsql_customer add constraint bmsql_customer_pkey
primary key (c_w_id, c_d_id, c_id);
create index bmsql_customer_idx1
on bmsql_customer (c_w_id, c_d_id, c_last, c_first);
alter table bmsql_oorder add constraint bmsql_oorder_pkey
primary key (o_w_id, o_d_id, o_id);
create unique index bmsql_oorder_idx1
on bmsql_oorder (o_w_id, o_d_id, o_carrier_id, o_id);
alter table bmsql_new_order add constraint bmsql_new_order_pkey
primary key (no_w_id, no_d_id, no_o_id);
alter table bmsql_order_line add constraint bmsql_order_line_pkey
primary key (ol_w_id, ol_d_id, ol_o_id, ol_number);
alter table bmsql_stock add constraint bmsql_stock_pkey
primary key (s_w_id, s_i_id);
alter table bmsql_item add constraint bmsql_item_pkey
primary key (i_id);
# ------------------------------------------------------------
# Loading SQL file ./sql.common/foreignKeys.sql
# ------------------------------------------------------------
alter table bmsql_district add constraint d_warehouse_fkey
foreign key (d_w_id)
references bmsql_warehouse (w_id);
alter table bmsql_customer add constraint c_district_fkey
foreign key (c_w_id, c_d_id)
references bmsql_district (d_w_id, d_id);
alter table bmsql_history add constraint h_customer_fkey
foreign key (h_c_w_id, h_c_d_id, h_c_id)
references bmsql_customer (c_w_id, c_d_id, c_id);
alter table bmsql_history add constraint h_district_fkey
foreign key (h_w_id, h_d_id)
references bmsql_district (d_w_id, d_id);
alter table bmsql_new_order add constraint no_order_fkey
foreign key (no_w_id, no_d_id, no_o_id)
references bmsql_oorder (o_w_id, o_d_id, o_id);
alter table bmsql_oorder add constraint o_customer_fkey
foreign key (o_w_id, o_d_id, o_c_id)
references bmsql_customer (c_w_id, c_d_id, c_id);
alter table bmsql_order_line add constraint ol_order_fkey
foreign key (ol_w_id, ol_d_id, ol_o_id)
references bmsql_oorder (o_w_id, o_d_id, o_id);
alter table bmsql_order_line add constraint ol_stock_fkey
foreign key (ol_supply_w_id, ol_i_id)
references bmsql_stock (s_w_id, s_i_id);
alter table bmsql_stock add constraint s_warehouse_fkey
foreign key (s_w_id)
references bmsql_warehouse (w_id);
alter table bmsql_stock add constraint s_item_fkey
foreign key (s_i_id)
references bmsql_item (i_id);
# ------------------------------------------------------------
# Loading SQL file ./sql.common/buildFinish.sql
# ------------------------------------------------------------
-- ----
-- Extra commands to run after the tables are created, loaded,
-- indexes built and extra's created.
-- ----

[mysql@localhost run]$ ./runBenchmark.sh props.mysql
09:25:48,374 [main] INFO jTPCC : Term-00,
09:25:48,379 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
09:25:48,379 [main] INFO jTPCC : Term-00, BenchmarkSQL v5.0
09:25:48,379 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
09:25:48,379 [main] INFO jTPCC : Term-00, (c) 2003, Raul Barbosa
09:25:48,379 [main] INFO jTPCC : Term-00, (c) 2004-2016, Denis Lussier
09:25:48,384 [main] INFO jTPCC : Term-00, (c) 2016, Jan Wieck
09:25:48,385 [main] INFO jTPCC : Term-00, +-------------------------------------------------------------+
09:25:48,385 [main] INFO jTPCC : Term-00,
09:25:48,385 [main] INFO jTPCC : Term-00, db=mysql
09:25:48,385 [main] INFO jTPCC : Term-00, driver=com.mysql.jdbc.Driver
09:25:48,385 [main] INFO jTPCC : Term-00, conn=jdbc:mysql://127.0.0.1:3306/test?useSSL=false
09:25:48,385 [main] INFO jTPCC : Term-00, user=root
09:25:48,386 [main] INFO jTPCC : Term-00,
09:25:48,386 [main] INFO jTPCC : Term-00, warehouses=40
09:25:48,386 [main] INFO jTPCC : Term-00, terminals=10
09:25:48,388 [main] INFO jTPCC : Term-00, runMins=10
09:25:48,388 [main] INFO jTPCC : Term-00, limitTxnsPerMin=0
09:25:48,388 [main] INFO jTPCC : Term-00, terminalWarehouseFixed=true
09:25:48,389 [main] INFO jTPCC : Term-00,
09:25:48,389 [main] INFO jTPCC : Term-00, newOrderWeight=45
09:25:48,389 [main] INFO jTPCC : Term-00, paymentWeight=43
09:25:48,389 [main] INFO jTPCC : Term-00, orderStatusWeight=4
09:25:48,389 [main] INFO jTPCC : Term-00, deliveryWeight=4
09:25:48,389 [main] INFO jTPCC : Term-00, stockLevelWeight=4
09:25:48,389 [main] INFO jTPCC : Term-00,
09:25:48,389 [main] INFO jTPCC : Term-00, resultDirectory=my_result_%tY-%tm-%td_%tH%tM%tS
09:25:48,390 [main] INFO jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
09:25:48,390 [main] INFO jTPCC : Term-00,
09:25:48,529 [main] INFO jTPCC : Term-00, copied props.mysql to my_result_2022-11-14_092548/run.properties
09:25:48,529 [main] INFO jTPCC : Term-00, created my_result_2022-11-14_092548/data/runInfo.csv for runID 5
09:25:48,530 [main] INFO jTPCC : Term-00, writing per transaction results to my_result_2022-11-14_092548/data/result.csv
09:25:48,531 [main] INFO jTPCC : Term-00, osCollectorScript=./misc/os_collector_linux.py
09:25:48,532 [main] INFO jTPCC : Term-00, osCollectorInterval=1
09:25:48,532 [main] INFO jTPCC : Term-00, osCollectorSSHAddr=null
09:25:48,532 [main] INFO jTPCC : Term-00, osCollectorDevices=null
09:25:48,684 [main] INFO jTPCC : Term-00,
09:25:49,097 [main] INFO jTPCC : Term-00, C value for C_LAST during load: 182
09:25:49,098 [main] INFO jTPCC : Term-00, C value for C_LAST this run: 253
09:25:49,098 [main] INFO jTPCC : Term-00,
Term-00, Running Average tpmTOTAL: 32447.84 Current tpmTOTAL: 2146668 Memory Usage: 143MB / 203MB
09:35:49,526 [Thread-6] INFO jTPCC : Term-00,
09:35:49,526 [Thread-6] INFO jTPCC : Term-00,
09:35:49,527 [Thread-6] INFO jTPCC : Term-00, Measured tpmC (NewOrders) = 14913.98
09:35:49,527 [Thread-6] INFO jTPCC : Term-00, Measured tpmTOTAL = 32102.08
09:35:49,527 [Thread-6] INFO jTPCC : Term-00, Session Start = 2022-11-14 09:25:49
09:35:49,528 [Thread-6] INFO jTPCC : Term-00, Session End = 2022-11-14 09:35:49
09:35:49,528 [Thread-6] INFO jTPCC : Term-00, Transaction Count = 321069

sysbench 测试MySQL

sysbench 测试MySQL
1. 安装sysbench

https://github.com/akopytov/sysbench.git # 通过git clone得到源码

sftp> cd /soft
sftp> pwd
/soft
sftp> ls
boost_1_59_0          boost_1_59_0.zip      docker-17.03.0-ce.tgz
employees_db          employees_db-full-1.0.6.tar.bz2
libpcap-1.10.1        libpcap-1.10.1.tar.gz mysql-5.7.26
mysql-5.7.26.tar.gz   mysql-utilities-1.6.5 mysql-utilities-1.6.5.tar.gz
ngrep                 ngrep-master.zip      sg3_utils-1.41-1.x86_64.rpm
sg3_utils-libs-1.41-1.x86_64.rpm
sftp> lcd F:\
sftp> put sysbench-master.zip
Uploading sysbench-master.zip to /soft/sysbench-master.zip
  100% 2220KB   2220KB/s 00:00:00
F:/sysbench-master.zip: 2274128 bytes transferred in 0 seconds (2220 KB/s)

[root@localhost soft]# unzip sysbench-master.zip
[root@localhost soft]# mv sysbench-master sysbench

[root@localhost sysbench]# ./autogen.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf
autoreconf: running: /usr/bin/autoheader
autoreconf: running: automake --add-missing --copy --no-force
configure.ac:59: installing 'config/ar-lib'
configure.ac:45: installing 'config/compile'
configure.ac:27: installing 'config/config.guess'
configure.ac:27: installing 'config/config.sub'
configure.ac:32: installing 'config/install-sh'
configure.ac:32: installing 'config/missing'
src/Makefile.am: installing 'config/depcomp'
parallel-tests: installing 'config/test-driver'
autoreconf: Leaving directory `.'

关联mysql的头文件和库

[root@localhost sysbench]# ./configure  --with-mysql-includes=/mysqlsoft/mysql/include/  --with-mysql-libs=/mysqlsoft/mysql/lib/
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking how to run the C preprocessor... gcc -E
checking whether gcc -std=gnu99 and cc understand -c and -o together... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for C compiler vendor... gnu
checking for gcc architecture flag...
checking for x86 cpuid 0 output... d:756e6547:6c65746e:49656e69
checking for x86 cpuid 1 output... 306e7:2040800:9e982203:1fabfbff
checking whether C compiler accepts -march=ivybridge... no
checking whether C compiler accepts -march=core-avx-i... yes
checking for gcc architecture flag... -march=core-avx-i
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc -std=gnu99... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC
checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes
checking if gcc -std=gnu99 static flag -static works... no
checking if gcc -std=gnu99 supports -c -o file.o... yes
checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu99 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... yes
checking for C compiler vendor... (cached) gnu
checking whether to compile with MySQL support... yes
checking whether to compile with PostgreSQL support... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether to build with system or bundled LuaJIT... bundled
checking whether to build with system or bundled Concurrency Kit... bundled
checking whether SHM_HUGETLB is declared... yes
checking whether O_SYNC is declared... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for sqrt in -lm... yes
checking MySQL includes... (cached) /mysqlsoft/mysql/include/
checking MySQL libraries... (cached) /mysqlsoft/mysql/lib/
checking for library containing mysql_real_connect... -lmysqlclient
checking if mysql.h defines MYSQL_OPT_SSL_MODE... yes
checking libaio.h usability... no
checking libaio.h presence... no
checking for libaio.h... no
checking for ANSI C header files... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/aio.h usability... no
checking sys/aio.h presence... no
checking for sys/aio.h... no
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking thread.h usability... no
checking thread.h presence... no
checking for thread.h... no
checking for unistd.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking for off_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for thread local storage (TLS) class... __thread
checking for __attribute__((format))... yes
checking for __attribute__((unused))... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking size of size_t... 8
checking size of bool... 1
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... yes
checking for library containing clock_gettime... none required
checking for alarm... yes
checking for clock_gettime... yes
checking for directio... no
checking for fdatasync... yes
checking for gettimeofday... yes
checking for isatty... yes
checking for memalign... yes
checking for memset... yes
checking for posix_memalign... yes
checking for pthread_cancel... yes
checking for pthread_yield... yes
checking for setvbuf... yes
checking for sqrt... yes
checking for strdup... yes
checking for thr_setconcurrency... no
checking for valloc... yes
checking for pthread_once... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating third_party/luajit/Makefile
config.status: creating third_party/concurrency_kit/Makefile
config.status: creating src/Makefile
config.status: creating src/drivers/Makefile
config.status: creating src/drivers/mysql/Makefile
config.status: creating src/drivers/pgsql/Makefile
config.status: creating src/tests/Makefile
config.status: creating src/tests/cpu/Makefile
config.status: creating src/tests/fileio/Makefile
config.status: creating src/tests/memory/Makefile
config.status: creating src/tests/threads/Makefile
config.status: creating src/tests/mutex/Makefile
config.status: creating src/lua/Makefile
config.status: creating src/lua/internal/Makefile
config.status: creating tests/Makefile
config.status: creating tests/include/config.sh
config.status: creating snap/snapcraft.yaml
config.status: creating config/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
===============================================================================
sysbench version   : 1.1.0
CC                 : gcc -std=gnu99
CFLAGS             : -O3 -funroll-loops -ggdb3  -march=core-avx-i -Wall -Wextra -Wpointer-arith -Wbad-function-cast -Wstrict-prototypes -Wnested-externs -Wno-format-zero-length -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align -Wvla   -pthread
CPPFLAGS           : -D_GNU_SOURCE   -I$(top_srcdir)/src -I$(abs_top_builddir)/third_party/luajit/inc -I$(abs_top_builddir)/third_party/concurrency_kit/include
LDFLAGS            : -L/usr/local/lib
LIBS               : -lm

prefix             : /usr/local
bindir             : ${prefix}/bin
libexecdir         : ${prefix}/libexec
mandir             : ${prefix}/share/man
datadir            : ${prefix}/share

MySQL support      : yes
PostgreSQL support : no

LuaJIT             : bundled
LUAJIT_CFLAGS      : -I$(abs_top_builddir)/third_party/luajit/inc
LUAJIT_LIBS        : $(abs_top_builddir)/third_party/luajit/lib/libluajit-5.1.a -ldl
LUAJIT_LDFLAGS     : -rdynamic

Concurrency Kit    : bundled
CK_CFLAGS          : -I$(abs_top_builddir)/third_party/concurrency_kit/include
CK_LIBS            : $(abs_top_builddir)/third_party/concurrency_kit/lib/libck.a
configure flags    :
===============================================================================

源码编译
make -j 4 # -j 4 表示用几个cpu核心进行编译

[root@localhost sysbench]# make -j 4

安装
make install # 默认安装到 /usr/local/bin , 如果有自定义目录,configure增加参数 –prefix=自定义目录

[root@localhost sysbench]# make install

添加LD_LIBRARY_PATH

[root@localhost ~]# echo "export LD_LIBRARY_PATH=/mysqlsoft/mysql/lib/:$LD_LIBRARY_PATH" >> ~/.bashrc
[root@localhost ~]# source ~/.bashrc
[root@localhost ~]# sysbench --version
sysbench 1.1.0
< ?pre>

3. 测试
[mysql@localhost lua]$ ./sysbench oltp_read_write.lua --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-db=test --mysql-user=root --mysql-password=abcd1234 --table_size=250000 --tables=125 --threads=32 --events=0 --report-interval=1 --time=600 prepare
./sysbench: error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such file or directory

字面意思就是打不到共享库文件libmysqlclient.so.20.

查找一下本地有没有这个文件

[root@localhost ~]# find / -name 'libmysqlclient*'
/soft/mysql-5.7.26/libmysql/libmysqlclient.so.20.3.13
/soft/mysql-5.7.26/libmysql/libmysqlclient.so.20
/soft/mysql-5.7.26/libmysql/libmysqlclient.so
/soft/mysql-5.7.26/packaging/deb-in/libmysqlclient-dev.install.in
/soft/mysql-5.7.26/packaging/deb-in/libmysqlclient-dev.lintian-overrides.in
/soft/mysql-5.7.26/packaging/deb-in/libmysqlclient20-dbgsym.install.in
/soft/mysql-5.7.26/packaging/deb-in/libmysqlclient20.install.in
/soft/mysql-5.7.26/packaging/deb-in/libmysqlclient20.lintian-overrides.in
/soft/mysql-5.7.26/archive_output_directory/libmysqlclient.a
/mysqlsoft/mysql/lib/libmysqlclient.a
/mysqlsoft/mysql/lib/libmysqlclient.so.20.3.13
/mysqlsoft/mysql/lib/libmysqlclient.so.20
/mysqlsoft/mysql/lib/libmysqlclient.so

在/mysqlsoft/mysql/lib/下面有这个文件,解决方法是先建立一个软链接到/usr/local/lib

[root@localhost ~]# ln -s /mysqlsoft/mysql/lib/libmysqlclient.so.20 /usr/local/lib/libmysqlclient.so.20

接着在/etc/ld.so.cnf中加入/usr/loca/lib这一行

[root@localhost ~]# vi /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/loca/lib

执行/sbin/ldconfig -v更新下配置就可以了

[root@localhost ~]# /sbin/ldconfig -v
..........省略...........
        libfreeblpriv3.so -> libfreeblpriv3.so
        libncurses++.so.5 -> libncurses++.so.5.9
        libfreebl3.so -> libfreebl3.so
        libmenuw.so.5 -> libmenuw.so.5.9
        libgcc_s.so.1 -> libgcc_s-4.8.5-20150702.so.1
        libmenu.so.5 -> libmenu.so.5.9
        libdtrace-ctf.so.1 -> libdtrace-ctf.so.1.5.0
        libuuid.so.1 -> libuuid.so.1.3.0
/lib/sse2: (hwcap: 0x0000000004000000)
/lib64/sse2: (hwcap: 0x0000000004000000)
/lib64/tls: (hwcap: 0x8000000000000000)


重新运行生成测试数据脚本

[mysql@localhost lua]$ ./sysbench oltp_read_write.lua --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-db=test --mysql-user=root --mysql-password=abcd1234 --table_size=250000 --tables=25 --threads=32 --events=0 --report-interval=1 --time=600 prepare
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)

Initializing worker threads...

Creating table 'sbtest14'...Creating table 'sbtest10'...Creating table 'sbtest11'...Creating table 'sbtest9'...Creating table 'sbtest4'...Creating table 'sbtest6'...Creating table 'sbtest24'...Creating table 'sbtest3'...Creating table 'sbtest1'...Creating table 'sbtest25'...Creating table 'sbtest5'...Creating table 'sbtest15'...Creating table 'sbtest7'...Creating table 'sbtest16'...Creating table 'sbtest2'...Creating table 'sbtest8'...












Creating table 'sbtest18'...

Creating table 'sbtest13'...


Creating table 'sbtest23'...
Creating table 'sbtest17'...
Creating table 'sbtest20'...
Creating table 'sbtest21'...
Creating table 'sbtest12'...
Creating table 'sbtest19'...
Creating table 'sbtest22'...
Inserting 250000 records into 'sbtest13'
Inserting 250000 records into 'sbtest23'
Inserting 250000 records into 'sbtest3'
Inserting 250000 records into 'sbtest16'
Inserting 250000 records into 'sbtest11'
Inserting 250000 records into 'sbtest2'
Inserting 250000 records into 'sbtest10'
Inserting 250000 records into 'sbtest22'
Inserting 250000 records into 'sbtest9'
Inserting 250000 records into 'sbtest5'
Inserting 250000 records into 'sbtest7'
Inserting 250000 records into 'sbtest14'
Inserting 250000 records into 'sbtest15'
Inserting 250000 records into 'sbtest25'
Inserting 250000 records into 'sbtest18'
Inserting 250000 records into 'sbtest24'
Inserting 250000 records into 'sbtest21'
Inserting 250000 records into 'sbtest1'
Inserting 250000 records into 'sbtest17'
Inserting 250000 records into 'sbtest20'
Inserting 250000 records into 'sbtest8'
Inserting 250000 records into 'sbtest4'
Inserting 250000 records into 'sbtest19'
Inserting 250000 records into 'sbtest12'
Inserting 250000 records into 'sbtest6'
Creating a secondary index on 'sbtest2'...
Creating a secondary index on 'sbtest4'...
Creating a secondary index on 'sbtest3'...
Creating a secondary index on 'sbtest25'...
Creating a secondary index on 'sbtest11'...
Creating a secondary index on 'sbtest16'...
Creating a secondary index on 'sbtest13'...
Creating a secondary index on 'sbtest20'...
Creating a secondary index on 'sbtest7'...
Creating a secondary index on 'sbtest12'...
Creating a secondary index on 'sbtest17'...
Creating a secondary index on 'sbtest10'...
Creating a secondary index on 'sbtest6'...
Creating a secondary index on 'sbtest8'...
Creating a secondary index on 'sbtest1'...
Creating a secondary index on 'sbtest5'...
Creating a secondary index on 'sbtest9'...
Creating a secondary index on 'sbtest18'...
Creating a secondary index on 'sbtest19'...
Creating a secondary index on 'sbtest15'...
Creating a secondary index on 'sbtest24'...
Creating a secondary index on 'sbtest21'...
Creating a secondary index on 'sbtest14'...
Creating a secondary index on 'sbtest23'...
Creating a secondary index on 'sbtest22'...

运行测试脚本

[mysql@localhost lua]$ ./sysbench oltp_read_write.lua --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-db=test --mysql-user=root --mysql-password=abcd1234 --table_size=250000 --tables=25 --threads=32 --events=0 --report-interval=1 --time=600 --percentile=95 --report-interval=1 run
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)

Running the test with following options:
Number of threads: 32
Report intermediate results every 1 second(s)
Initializing random number generator from current time


Initializing worker threads...

Threads started!

[ 1s ] thds: 32 tps: 420.88 qps: 8842.27 (r/w/o: 6223.49/1745.85/872.93) lat (ms,95%): 132.49 err/s: 0.00 reconn/s: 0.00
[ 2s ] thds: 32 tps: 440.30 qps: 8782.91 (r/w/o: 6165.15/1739.17/878.59) lat (ms,95%): 132.49 err/s: 0.00 reconn/s: 0.00
[ 3s ] thds: 32 tps: 446.97 qps: 9031.33 (r/w/o: 6325.53/1809.87/895.93) lat (ms,95%): 127.81 err/s: 0.00 reconn/s: 0.00
[ 4s ] thds: 32 tps: 460.97 qps: 9095.42 (r/w/o: 6349.60/1826.88/918.94) lat (ms,95%): 132.49 err/s: 0.00 reconn/s: 0.00
[ 5s ] thds: 32 tps: 449.06 qps: 8969.11 (r/w/o: 6266.78/1801.22/901.11) lat (ms,95%): 123.28 err/s: 0.00 reconn/s: 0.00
[ 6s ] thds: 32 tps: 450.00 qps: 9064.95 (r/w/o: 6361.97/1802.99/900.00) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 7s ] thds: 32 tps: 449.53 qps: 9007.52 (r/w/o: 6333.33/1776.13/898.05) lat (ms,95%): 123.28 err/s: 0.00 reconn/s: 0.00
[ 8s ] thds: 32 tps: 446.41 qps: 8827.02 (r/w/o: 6163.60/1769.61/893.81) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 9s ] thds: 32 tps: 414.03 qps: 8322.70 (r/w/o: 5808.49/1686.14/828.07) lat (ms,95%): 127.81 err/s: 0.00 reconn/s: 0.00
[ 10s ] thds: 32 tps: 415.00 qps: 8302.07 (r/w/o: 5824.05/1648.01/830.01) lat (ms,95%): 132.49 err/s: 0.00 reconn/s: 0.00
[ 11s ] thds: 32 tps: 440.56 qps: 8794.13 (r/w/o: 6155.79/1757.23/881.11) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 12s ] thds: 32 tps: 392.43 qps: 7793.52 (r/w/o: 5465.98/1542.69/784.86) lat (ms,95%): 132.49 err/s: 0.00 reconn/s: 0.00
[ 13s ] thds: 32 tps: 216.97 qps: 4355.35 (r/w/o: 3034.55/886.87/433.94) lat (ms,95%): 363.18 err/s: 0.00 reconn/s: 0.00
[ 14s ] thds: 32 tps: 192.01 qps: 3796.14 (r/w/o: 2662.10/750.03/384.01) lat (ms,95%): 397.39 err/s: 0.00 reconn/s: 0.00
[ 15s ] thds: 32 tps: 86.00 qps: 1767.09 (r/w/o: 1249.06/346.02/172.01) lat (ms,95%): 511.33 err/s: 0.00 reconn/s: 0.00
[ 16s ] thds: 32 tps: 71.00 qps: 1421.09 (r/w/o: 994.07/285.02/142.01) lat (ms,95%): 977.74 err/s: 0.00 reconn/s: 0.00
[ 17s ] thds: 32 tps: 115.98 qps: 2316.68 (r/w/o: 1620.78/463.94/231.97) lat (ms,95%): 646.19 err/s: 0.00 reconn/s: 0.00
[ 18s ] thds: 32 tps: 115.96 qps: 2267.18 (r/w/o: 1575.43/459.83/231.92) lat (ms,95%): 682.06 err/s: 0.00 reconn/s: 0.00
[ 19s ] thds: 32 tps: 120.06 qps: 2454.22 (r/w/o: 1727.86/486.24/240.12) lat (ms,95%): 493.24 err/s: 0.00 reconn/s: 0.00
[ 20s ] thds: 32 tps: 91.00 qps: 1779.97 (r/w/o: 1234.98/362.99/182.00) lat (ms,95%): 694.45 err/s: 0.00 reconn/s: 0.00
[ 21s ] thds: 32 tps: 47.99 qps: 966.87 (r/w/o: 678.91/191.97/95.99) lat (ms,95%): 1069.86 err/s: 0.00 reconn/s: 0.00
[ 22s ] thds: 32 tps: 65.01 qps: 1283.20 (r/w/o: 895.14/258.04/130.02) lat (ms,95%): 1149.76 err/s: 0.00 reconn/s: 0.00
[ 23s ] thds: 32 tps: 30.99 qps: 659.69 (r/w/o: 478.77/118.94/61.97) lat (ms,95%): 1032.01 err/s: 0.00 reconn/s: 0.00
[ 24s ] thds: 32 tps: 90.03 qps: 1850.71 (r/w/o: 1295.50/375.14/180.07) lat (ms,95%): 1352.03 err/s: 0.00 reconn/s: 0.00
[ 25s ] thds: 32 tps: 77.01 qps: 1500.11 (r/w/o: 1041.07/305.02/154.01) lat (ms,95%): 773.68 err/s: 0.00 reconn/s: 0.00
[ 26s ] thds: 32 tps: 90.00 qps: 1741.99 (r/w/o: 1212.00/350.00/180.00) lat (ms,95%): 450.77 err/s: 0.00 reconn/s: 0.00
[ 27s ] thds: 32 tps: 31.00 qps: 685.98 (r/w/o: 493.99/130.00/62.00) lat (ms,95%): 1453.01 err/s: 0.00 reconn/s: 0.00
[ 28s ] thds: 32 tps: 56.00 qps: 1068.04 (r/w/o: 736.03/220.01/112.00) lat (ms,95%): 1376.60 err/s: 0.00 reconn/s: 0.00
[ 29s ] thds: 32 tps: 36.00 qps: 752.99 (r/w/o: 535.00/146.00/72.00) lat (ms,95%): 1304.21 err/s: 0.00 reconn/s: 0.00
[ 30s ] thds: 32 tps: 32.00 qps: 621.99 (r/w/o: 432.00/126.00/64.00) lat (ms,95%): 1589.90 err/s: 0.00 reconn/s: 0.00
[ 31s ] thds: 32 tps: 26.00 qps: 541.01 (r/w/o: 379.01/110.00/52.00) lat (ms,95%): 1903.57 err/s: 0.00 reconn/s: 0.00
[ 32s ] thds: 32 tps: 23.00 qps: 429.00 (r/w/o: 296.00/87.00/46.00) lat (ms,95%): 1739.68 err/s: 0.00 reconn/s: 0.00
[ 33s ] thds: 32 tps: 16.00 qps: 347.00 (r/w/o: 253.00/62.00/32.00) lat (ms,95%): 1938.16 err/s: 0.00 reconn/s: 0.00
[ 34s ] thds: 32 tps: 54.00 qps: 1120.99 (r/w/o: 778.99/234.00/108.00) lat (ms,95%): 2539.17 err/s: 0.00 reconn/s: 0.00
[ 35s ] thds: 32 tps: 363.96 qps: 7212.21 (r/w/o: 5042.45/1441.84/727.92) lat (ms,95%): 164.45 err/s: 0.00 reconn/s: 0.00
[ 36s ] thds: 32 tps: 362.04 qps: 7243.81 (r/w/o: 5077.57/1442.16/724.08) lat (ms,95%): 164.45 err/s: 0.00 reconn/s: 0.00
[ 37s ] thds: 32 tps: 352.90 qps: 7110.99 (r/w/o: 4988.59/1416.60/705.80) lat (ms,95%): 158.63 err/s: 0.00 reconn/s: 0.00
[ 38s ] thds: 32 tps: 363.75 qps: 7270.06 (r/w/o: 5074.59/1467.97/727.50) lat (ms,95%): 155.80 err/s: 0.00 reconn/s: 0.00
[ 39s ] thds: 32 tps: 372.75 qps: 7467.08 (r/w/o: 5229.56/1493.02/744.50) lat (ms,95%): 155.80 err/s: 0.00 reconn/s: 0.00
[ 40s ] thds: 32 tps: 296.80 qps: 5913.04 (r/w/o: 4137.23/1181.21/594.60) lat (ms,95%): 186.54 err/s: 0.00 reconn/s: 0.00
[ 41s ] thds: 32 tps: 356.77 qps: 7188.59 (r/w/o: 5033.92/1441.13/713.55) lat (ms,95%): 158.63 err/s: 0.00 reconn/s: 0.00
[ 42s ] thds: 32 tps: 377.95 qps: 7489.91 (r/w/o: 5230.24/1503.78/755.89) lat (ms,95%): 142.39 err/s: 0.00 reconn/s: 0.00
[ 43s ] thds: 32 tps: 382.97 qps: 7599.32 (r/w/o: 5316.52/1518.86/763.93) lat (ms,95%): 153.02 err/s: 0.00 reconn/s: 0.00
[ 44s ] thds: 32 tps: 378.08 qps: 7641.59 (r/w/o: 5358.11/1526.32/757.16) lat (ms,95%): 144.97 err/s: 0.00 reconn/s: 0.00
[ 45s ] thds: 32 tps: 388.08 qps: 7789.51 (r/w/o: 5458.05/1554.30/777.15) lat (ms,95%): 142.39 err/s: 0.00 reconn/s: 0.00
[ 46s ] thds: 32 tps: 398.74 qps: 7983.89 (r/w/o: 5595.42/1590.98/797.49) lat (ms,95%): 132.49 err/s: 0.00 reconn/s: 0.00
[ 47s ] thds: 32 tps: 402.27 qps: 8038.38 (r/w/o: 5607.75/1626.09/804.54) lat (ms,95%): 132.49 err/s: 0.00 reconn/s: 0.00
[ 48s ] thds: 32 tps: 411.50 qps: 8199.11 (r/w/o: 5753.06/1623.04/823.01) lat (ms,95%): 130.13 err/s: 0.00 reconn/s: 0.00
[ 49s ] thds: 32 tps: 409.49 qps: 8186.82 (r/w/o: 5725.87/1641.97/818.98) lat (ms,95%): 125.52 err/s: 0.00 reconn/s: 0.00
[ 50s ] thds: 32 tps: 406.97 qps: 8123.41 (r/w/o: 5686.59/1622.88/813.94) lat (ms,95%): 127.81 err/s: 0.00 reconn/s: 0.00
[ 51s ] thds: 32 tps: 420.95 qps: 8411.07 (r/w/o: 5877.35/1692.81/840.91) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 52s ] thds: 32 tps: 423.08 qps: 8431.50 (r/w/o: 5904.05/1680.30/847.15) lat (ms,95%): 123.28 err/s: 0.00 reconn/s: 0.00
[ 53s ] thds: 32 tps: 417.95 qps: 8478.98 (r/w/o: 5939.28/1703.79/835.90) lat (ms,95%): 125.52 err/s: 0.00 reconn/s: 0.00
[ 54s ] thds: 32 tps: 427.01 qps: 8537.15 (r/w/o: 5990.11/1693.03/854.02) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 55s ] thds: 32 tps: 316.04 qps: 6210.76 (r/w/o: 4339.53/1239.15/632.08) lat (ms,95%): 200.47 err/s: 0.00 reconn/s: 0.00
[ 56s ] thds: 32 tps: 224.00 qps: 4544.02 (r/w/o: 3193.02/903.00/448.00) lat (ms,95%): 287.38 err/s: 0.00 reconn/s: 0.00
[ 57s ] thds: 32 tps: 194.00 qps: 3862.91 (r/w/o: 2691.94/782.98/387.99) lat (ms,95%): 350.33 err/s: 0.00 reconn/s: 0.00
[ 58s ] thds: 32 tps: 168.00 qps: 3388.08 (r/w/o: 2376.06/676.02/336.01) lat (ms,95%): 411.96 err/s: 0.00 reconn/s: 0.00
[ 59s ] thds: 32 tps: 114.99 qps: 2200.90 (r/w/o: 1529.93/440.98/229.99) lat (ms,95%): 569.67 err/s: 0.00 reconn/s: 0.00
[ 60s ] thds: 32 tps: 59.00 qps: 1226.05 (r/w/o: 868.04/240.01/118.01) lat (ms,95%): 580.02 err/s: 0.00 reconn/s: 0.00
[ 61s ] thds: 32 tps: 43.00 qps: 880.00 (r/w/o: 626.00/168.00/86.00) lat (ms,95%): 1533.66 err/s: 0.00 reconn/s: 0.00
[ 62s ] thds: 32 tps: 35.00 qps: 661.00 (r/w/o: 451.00/140.00/70.00) lat (ms,95%): 1903.57 err/s: 0.00 reconn/s: 0.00
[ 63s ] thds: 32 tps: 33.00 qps: 684.00 (r/w/o: 477.00/141.00/66.00) lat (ms,95%): 1427.08 err/s: 0.00 reconn/s: 0.00
[ 64s ] thds: 32 tps: 14.00 qps: 355.00 (r/w/o: 247.00/80.00/28.00) lat (ms,95%): 1803.47 err/s: 0.00 reconn/s: 0.00
[ 65s ] thds: 32 tps: 30.00 qps: 520.01 (r/w/o: 364.01/96.00/60.00) lat (ms,95%): 2585.31 err/s: 0.00 reconn/s: 0.00
[ 66s ] thds: 32 tps: 33.00 qps: 642.98 (r/w/o: 450.99/126.00/66.00) lat (ms,95%): 1618.78 err/s: 0.00 reconn/s: 0.00
[ 67s ] thds: 32 tps: 23.00 qps: 495.01 (r/w/o: 352.00/98.00/45.00) lat (ms,95%): 3208.88 err/s: 0.00 reconn/s: 0.00
[ 68s ] thds: 32 tps: 20.00 qps: 353.00 (r/w/o: 238.00/74.00/41.00) lat (ms,95%): 2159.29 err/s: 0.00 reconn/s: 0.00
[ 69s ] thds: 32 tps: 18.00 qps: 399.00 (r/w/o: 294.00/69.00/36.00) lat (ms,95%): 2159.29 err/s: 0.00 reconn/s: 0.00
[ 70s ] thds: 32 tps: 17.00 qps: 311.00 (r/w/o: 210.00/67.00/34.00) lat (ms,95%): 2985.89 err/s: 0.00 reconn/s: 0.00
[ 71s ] thds: 32 tps: 15.00 qps: 345.99 (r/w/o: 247.99/68.00/30.00) lat (ms,95%): 2632.28 err/s: 0.00 reconn/s: 0.00
[ 72s ] thds: 32 tps: 23.00 qps: 513.01 (r/w/o: 353.00/114.00/46.00) lat (ms,95%): 3040.14 err/s: 0.00 reconn/s: 0.00
[ 73s ] thds: 32 tps: 75.00 qps: 1474.01 (r/w/o: 1027.01/298.00/149.00) lat (ms,95%): 2362.72 err/s: 0.00 reconn/s: 0.00
[ 74s ] thds: 32 tps: 408.91 qps: 8116.21 (r/w/o: 5673.75/1624.64/817.82) lat (ms,95%): 137.35 err/s: 0.00 reconn/s: 0.00
[ 75s ] thds: 32 tps: 405.08 qps: 8147.58 (r/w/o: 5716.11/1620.31/811.16) lat (ms,95%): 130.13 err/s: 0.00 reconn/s: 0.00
[ 76s ] thds: 32 tps: 415.01 qps: 8294.11 (r/w/o: 5793.08/1671.02/830.01) lat (ms,95%): 123.28 err/s: 0.00 reconn/s: 0.00
[ 77s ] thds: 32 tps: 410.97 qps: 8212.34 (r/w/o: 5758.54/1631.87/821.93) lat (ms,95%): 125.52 err/s: 0.00 reconn/s: 0.00
[ 78s ] thds: 32 tps: 425.00 qps: 8493.92 (r/w/o: 5948.94/1695.98/848.99) lat (ms,95%): 125.52 err/s: 0.00 reconn/s: 0.00
[ 79s ] thds: 32 tps: 420.04 qps: 8408.77 (r/w/o: 5883.54/1685.15/840.08) lat (ms,95%): 125.52 err/s: 0.00 reconn/s: 0.00
[ 80s ] thds: 32 tps: 420.99 qps: 8447.77 (r/w/o: 5902.84/1701.95/842.98) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 81s ] thds: 32 tps: 423.49 qps: 8470.71 (r/w/o: 5933.79/1690.95/845.97) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 82s ] thds: 32 tps: 428.53 qps: 8574.58 (r/w/o: 6006.41/1710.11/858.06) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 83s ] thds: 32 tps: 423.99 qps: 8455.88 (r/w/o: 5920.92/1686.98/847.99) lat (ms,95%): 123.28 err/s: 0.00 reconn/s: 0.00
[ 84s ] thds: 32 tps: 427.01 qps: 8547.17 (r/w/o: 5985.12/1709.03/853.02) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 85s ] thds: 32 tps: 432.84 qps: 8644.74 (r/w/o: 6036.73/1742.34/865.67) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 86s ] thds: 32 tps: 424.06 qps: 8545.31 (r/w/o: 6006.92/1689.26/849.13) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 87s ] thds: 32 tps: 439.04 qps: 8763.83 (r/w/o: 6126.58/1759.17/878.08) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 88s ] thds: 32 tps: 425.73 qps: 8453.71 (r/w/o: 5899.31/1702.93/851.47) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 89s ] thds: 32 tps: 439.30 qps: 8777.91 (r/w/o: 6155.14/1744.17/878.59) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 90s ] thds: 32 tps: 423.96 qps: 8585.13 (r/w/o: 6026.39/1710.83/847.91) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 91s ] thds: 32 tps: 446.07 qps: 8862.44 (r/w/o: 6175.00/1797.29/890.14) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 92s ] thds: 32 tps: 420.96 qps: 8506.29 (r/w/o: 5970.50/1691.86/843.93) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 93s ] thds: 32 tps: 447.03 qps: 8906.66 (r/w/o: 6223.46/1790.13/893.07) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 94s ] thds: 32 tps: 425.02 qps: 8528.49 (r/w/o: 5974.35/1703.10/851.05) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 95s ] thds: 32 tps: 446.98 qps: 8904.52 (r/w/o: 6240.67/1769.91/893.95) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 96s ] thds: 32 tps: 397.01 qps: 7899.15 (r/w/o: 5536.11/1569.03/794.02) lat (ms,95%): 130.13 err/s: 0.00 reconn/s: 0.00
[ 97s ] thds: 32 tps: 158.00 qps: 3164.01 (r/w/o: 2212.01/636.00/316.00) lat (ms,95%): 493.24 err/s: 0.00 reconn/s: 0.00
[ 98s ] thds: 32 tps: 169.99 qps: 3335.72 (r/w/o: 2322.81/672.94/339.97) lat (ms,95%): 623.33 err/s: 0.00 reconn/s: 0.00
[ 99s ] thds: 32 tps: 364.97 qps: 7267.36 (r/w/o: 5083.56/1453.87/729.94) lat (ms,95%): 186.54 err/s: 0.00 reconn/s: 0.00
[ 100s ] thds: 32 tps: 161.02 qps: 3277.33 (r/w/o: 2305.23/650.07/322.03) lat (ms,95%): 419.45 err/s: 0.00 reconn/s: 0.00
[ 101s ] thds: 32 tps: 106.01 qps: 2091.14 (r/w/o: 1465.10/414.03/212.01) lat (ms,95%): 623.33 err/s: 0.00 reconn/s: 0.00
[ 102s ] thds: 32 tps: 86.00 qps: 1720.00 (r/w/o: 1202.00/346.00/172.00) lat (ms,95%): 746.32 err/s: 0.00 reconn/s: 0.00
[ 103s ] thds: 32 tps: 49.00 qps: 978.95 (r/w/o: 684.96/195.99/97.99) lat (ms,95%): 893.56 err/s: 0.00 reconn/s: 0.00
[ 104s ] thds: 32 tps: 60.00 qps: 1250.08 (r/w/o: 888.06/242.02/120.01) lat (ms,95%): 1280.93 err/s: 0.00 reconn/s: 0.00
[ 105s ] thds: 32 tps: 62.00 qps: 1269.00 (r/w/o: 875.00/270.00/124.00) lat (ms,95%): 960.30 err/s: 0.00 reconn/s: 0.00
[ 106s ] thds: 32 tps: 38.00 qps: 719.01 (r/w/o: 517.01/126.00/76.00) lat (ms,95%): 1304.21 err/s: 0.00 reconn/s: 0.00
[ 107s ] thds: 32 tps: 40.00 qps: 849.99 (r/w/o: 601.99/168.00/80.00) lat (ms,95%): 1280.93 err/s: 0.00 reconn/s: 0.00
[ 108s ] thds: 32 tps: 34.00 qps: 603.00 (r/w/o: 407.00/128.00/68.00) lat (ms,95%): 1938.16 err/s: 0.00 reconn/s: 0.00
[ 109s ] thds: 32 tps: 43.00 qps: 863.01 (r/w/o: 610.01/167.00/86.00) lat (ms,95%): 1589.90 err/s: 0.00 reconn/s: 0.00
[ 110s ] thds: 32 tps: 33.00 qps: 672.98 (r/w/o: 460.99/146.00/66.00) lat (ms,95%): 1678.14 err/s: 0.00 reconn/s: 0.00
[ 111s ] thds: 32 tps: 45.00 qps: 905.99 (r/w/o: 635.00/181.00/90.00) lat (ms,95%): 1506.29 err/s: 0.00 reconn/s: 0.00
[ 112s ] thds: 32 tps: 403.96 qps: 8150.26 (r/w/o: 5710.48/1631.85/807.93) lat (ms,95%): 215.44 err/s: 0.00 reconn/s: 0.00
[ 113s ] thds: 32 tps: 420.64 qps: 8397.85 (r/w/o: 5880.00/1676.57/841.28) lat (ms,95%): 123.28 err/s: 0.00 reconn/s: 0.00
[ 114s ] thds: 32 tps: 422.35 qps: 8403.06 (r/w/o: 5878.94/1679.41/844.71) lat (ms,95%): 125.52 err/s: 0.00 reconn/s: 0.00
[ 115s ] thds: 32 tps: 425.99 qps: 8500.75 (r/w/o: 5956.82/1692.95/850.97) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 116s ] thds: 32 tps: 424.80 qps: 8544.93 (r/w/o: 5961.16/1733.18/850.60) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 117s ] thds: 32 tps: 431.22 qps: 8580.33 (r/w/o: 6001.03/1716.87/862.43) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 118s ] thds: 32 tps: 424.89 qps: 8539.75 (r/w/o: 5990.42/1699.55/849.78) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 119s ] thds: 32 tps: 442.95 qps: 8876.97 (r/w/o: 6208.28/1782.79/885.90) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 120s ] thds: 32 tps: 434.19 qps: 8659.88 (r/w/o: 6066.72/1725.77/867.39) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 121s ] thds: 32 tps: 425.77 qps: 8521.47 (r/w/o: 5963.83/1705.09/852.55) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 122s ] thds: 32 tps: 427.10 qps: 8543.91 (r/w/o: 5993.34/1696.38/854.19) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 123s ] thds: 32 tps: 422.06 qps: 8469.29 (r/w/o: 5915.90/1709.26/844.13) lat (ms,95%): 123.28 err/s: 0.00 reconn/s: 0.00
[ 124s ] thds: 32 tps: 437.56 qps: 8684.22 (r/w/o: 6078.86/1731.25/874.12) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 125s ] thds: 32 tps: 434.44 qps: 8817.95 (r/w/o: 6166.26/1782.81/868.88) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 126s ] thds: 32 tps: 437.97 qps: 8667.40 (r/w/o: 6072.58/1717.88/876.94) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 127s ] thds: 32 tps: 446.95 qps: 8913.91 (r/w/o: 6224.24/1795.78/893.89) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 128s ] thds: 32 tps: 431.13 qps: 8700.71 (r/w/o: 6117.90/1720.54/862.27) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 129s ] thds: 32 tps: 444.03 qps: 8874.52 (r/w/o: 6209.36/1777.10/888.05) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 130s ] thds: 32 tps: 439.98 qps: 8677.59 (r/w/o: 6048.72/1751.92/876.96) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 131s ] thds: 32 tps: 442.61 qps: 8922.13 (r/w/o: 6270.47/1764.44/887.22) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 132s ] thds: 32 tps: 431.41 qps: 8659.25 (r/w/o: 6045.76/1749.67/863.82) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 133s ] thds: 32 tps: 444.97 qps: 8906.38 (r/w/o: 6257.56/1758.88/889.94) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 134s ] thds: 32 tps: 434.82 qps: 8629.48 (r/w/o: 6028.54/1731.29/869.65) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 135s ] thds: 32 tps: 325.15 qps: 6502.92 (r/w/o: 4555.04/1297.58/650.29) lat (ms,95%): 219.36 err/s: 0.00 reconn/s: 0.00
[ 136s ] thds: 32 tps: 197.00 qps: 3920.05 (r/w/o: 2749.03/777.01/394.00) lat (ms,95%): 344.08 err/s: 0.00 reconn/s: 0.00
[ 137s ] thds: 32 tps: 166.00 qps: 3322.02 (r/w/o: 2317.02/673.01/332.00) lat (ms,95%): 612.21 err/s: 0.00 reconn/s: 0.00
[ 138s ] thds: 32 tps: 161.00 qps: 3236.99 (r/w/o: 2272.99/642.00/322.00) lat (ms,95%): 467.30 err/s: 0.00 reconn/s: 0.00
[ 139s ] thds: 32 tps: 115.00 qps: 2266.06 (r/w/o: 1583.04/453.01/230.01) lat (ms,95%): 590.56 err/s: 0.00 reconn/s: 0.00
[ 140s ] thds: 32 tps: 65.94 qps: 1379.65 (r/w/o: 979.04/268.74/131.87) lat (ms,95%): 746.32 err/s: 0.00 reconn/s: 0.00
[ 141s ] thds: 32 tps: 80.05 qps: 1572.02 (r/w/o: 1089.71/322.21/160.10) lat (ms,95%): 1129.24 err/s: 0.00 reconn/s: 0.00
[ 142s ] thds: 32 tps: 62.02 qps: 1207.38 (r/w/o: 840.26/243.08/124.04) lat (ms,95%): 943.16 err/s: 0.00 reconn/s: 0.00
[ 143s ] thds: 32 tps: 21.00 qps: 484.89 (r/w/o: 356.92/85.98/41.99) lat (ms,95%): 1258.08 err/s: 0.00 reconn/s: 0.00
[ 144s ] thds: 32 tps: 52.01 qps: 994.21 (r/w/o: 682.14/208.04/104.02) lat (ms,95%): 1589.90 err/s: 0.00 reconn/s: 0.00
[ 145s ] thds: 32 tps: 65.00 qps: 1286.00 (r/w/o: 895.00/261.00/130.00) lat (ms,95%): 1129.24 err/s: 0.00 reconn/s: 0.00
[ 146s ] thds: 32 tps: 49.00 qps: 1026.01 (r/w/o: 734.01/194.00/98.00) lat (ms,95%): 1013.60 err/s: 0.00 reconn/s: 0.00
[ 147s ] thds: 32 tps: 49.00 qps: 954.00 (r/w/o: 662.00/194.00/98.00) lat (ms,95%): 1032.01 err/s: 0.00 reconn/s: 0.00
[ 148s ] thds: 32 tps: 36.00 qps: 673.00 (r/w/o: 457.00/144.00/72.00) lat (ms,95%): 1129.24 err/s: 0.00 reconn/s: 0.00
[ 149s ] thds: 32 tps: 285.00 qps: 5838.91 (r/w/o: 4107.93/1160.98/569.99) lat (ms,95%): 759.88 err/s: 0.00 reconn/s: 0.00
[ 150s ] thds: 32 tps: 431.01 qps: 8534.14 (r/w/o: 5949.10/1723.03/862.01) lat (ms,95%): 125.52 err/s: 0.00 reconn/s: 0.00
[ 151s ] thds: 32 tps: 418.99 qps: 8429.71 (r/w/o: 5910.80/1680.94/837.97) lat (ms,95%): 125.52 err/s: 0.00 reconn/s: 0.00
[ 152s ] thds: 32 tps: 435.97 qps: 8661.40 (r/w/o: 6056.58/1732.88/871.94) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 153s ] thds: 32 tps: 423.04 qps: 8415.83 (r/w/o: 5884.58/1685.17/846.08) lat (ms,95%): 123.28 err/s: 0.00 reconn/s: 0.00
[ 154s ] thds: 32 tps: 429.00 qps: 8617.08 (r/w/o: 6040.06/1719.02/858.01) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 155s ] thds: 32 tps: 420.99 qps: 8442.80 (r/w/o: 5911.86/1688.96/841.98) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 156s ] thds: 32 tps: 434.00 qps: 8754.04 (r/w/o: 6128.03/1758.01/868.00) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 157s ] thds: 32 tps: 427.00 qps: 8528.95 (r/w/o: 5966.97/1707.99/854.00) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 158s ] thds: 32 tps: 438.87 qps: 8697.43 (r/w/o: 6095.20/1725.49/876.74) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 159s ] thds: 32 tps: 425.13 qps: 8604.65 (r/w/o: 6017.85/1735.53/851.26) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 160s ] thds: 32 tps: 435.89 qps: 8634.77 (r/w/o: 6046.44/1716.56/871.78) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 161s ] thds: 32 tps: 432.07 qps: 8660.41 (r/w/o: 6052.99/1745.28/862.14) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 162s ] thds: 32 tps: 443.03 qps: 8727.68 (r/w/o: 6092.47/1747.14/888.07) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 163s ] thds: 32 tps: 427.70 qps: 8692.99 (r/w/o: 6112.77/1724.81/855.41) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 164s ] thds: 32 tps: 429.30 qps: 8623.98 (r/w/o: 6032.18/1733.20/858.60) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 165s ] thds: 32 tps: 448.95 qps: 8934.08 (r/w/o: 6253.36/1783.82/896.91) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 166s ] thds: 32 tps: 422.05 qps: 8482.93 (r/w/o: 5961.65/1676.18/845.09) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 167s ] thds: 32 tps: 438.71 qps: 8749.14 (r/w/o: 6097.91/1775.81/875.41) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 168s ] thds: 32 tps: 438.26 qps: 8761.25 (r/w/o: 6137.68/1747.05/876.53) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 169s ] thds: 32 tps: 443.03 qps: 8753.58 (r/w/o: 6095.40/1771.12/887.06) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 170s ] thds: 32 tps: 424.94 qps: 8679.79 (r/w/o: 6129.15/1699.76/850.88) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 171s ] thds: 32 tps: 449.07 qps: 8890.40 (r/w/o: 6197.97/1795.28/897.14) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 172s ] thds: 32 tps: 429.59 qps: 8561.89 (r/w/o: 6002.31/1699.39/860.19) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 173s ] thds: 32 tps: 416.38 qps: 8465.72 (r/w/o: 5927.40/1705.55/832.76) lat (ms,95%): 134.90 err/s: 0.00 reconn/s: 0.00
[ 174s ] thds: 32 tps: 397.80 qps: 7907.96 (r/w/o: 5531.17/1581.19/795.59) lat (ms,95%): 164.45 err/s: 0.00 reconn/s: 0.00
[ 175s ] thds: 32 tps: 342.15 qps: 6691.89 (r/w/o: 4677.02/1330.57/684.30) lat (ms,95%): 215.44 err/s: 0.00 reconn/s: 0.00
[ 176s ] thds: 32 tps: 257.98 qps: 5235.61 (r/w/o: 3677.72/1041.92/515.96) lat (ms,95%): 325.98 err/s: 0.00 reconn/s: 0.00
[ 177s ] thds: 32 tps: 238.04 qps: 4708.83 (r/w/o: 3285.58/947.17/476.08) lat (ms,95%): 253.35 err/s: 0.00 reconn/s: 0.00
[ 178s ] thds: 32 tps: 137.00 qps: 2781.03 (r/w/o: 1959.02/548.01/274.00) lat (ms,95%): 493.24 err/s: 0.00 reconn/s: 0.00
[ 179s ] thds: 32 tps: 104.99 qps: 2092.87 (r/w/o: 1462.91/419.97/209.99) lat (ms,95%): 707.07 err/s: 0.00 reconn/s: 0.00
[ 180s ] thds: 32 tps: 67.00 qps: 1263.07 (r/w/o: 869.05/260.01/134.01) lat (ms,95%): 831.46 err/s: 0.00 reconn/s: 0.00
[ 181s ] thds: 32 tps: 35.00 qps: 815.95 (r/w/o: 595.96/149.99/70.00) lat (ms,95%): 1149.76 err/s: 0.00 reconn/s: 0.00
[ 182s ] thds: 32 tps: 59.00 qps: 1077.08 (r/w/o: 732.05/227.02/118.01) lat (ms,95%): 1129.24 err/s: 0.00 reconn/s: 0.00
[ 183s ] thds: 32 tps: 46.00 qps: 942.96 (r/w/o: 661.97/188.99/92.00) lat (ms,95%): 1129.24 err/s: 0.00 reconn/s: 0.00
[ 184s ] thds: 32 tps: 41.00 qps: 877.04 (r/w/o: 626.03/169.01/82.00) lat (ms,95%): 1235.62 err/s: 0.00 reconn/s: 0.00
[ 185s ] thds: 32 tps: 46.00 qps: 909.00 (r/w/o: 622.00/195.00/92.00) lat (ms,95%): 1533.66 err/s: 0.00 reconn/s: 0.00
[ 186s ] thds: 32 tps: 47.00 qps: 952.99 (r/w/o: 687.99/171.00/94.00) lat (ms,95%): 1327.91 err/s: 0.00 reconn/s: 0.00
[ 187s ] thds: 32 tps: 38.00 qps: 681.00 (r/w/o: 460.00/145.00/76.00) lat (ms,95%): 1304.21 err/s: 0.00 reconn/s: 0.00
[ 188s ] thds: 32 tps: 250.88 qps: 5211.60 (r/w/o: 3663.31/1046.52/501.77) lat (ms,95%): 816.63 err/s: 0.00 reconn/s: 0.00
[ 189s ] thds: 32 tps: 424.19 qps: 8348.83 (r/w/o: 5829.67/1672.77/846.39) lat (ms,95%): 125.52 err/s: 0.00 reconn/s: 0.00
[ 190s ] thds: 32 tps: 419.00 qps: 8383.92 (r/w/o: 5862.95/1680.98/839.99) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 191s ] thds: 32 tps: 436.91 qps: 8757.17 (r/w/o: 6133.72/1749.63/873.82) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 192s ] thds: 32 tps: 408.09 qps: 8137.78 (r/w/o: 5690.24/1631.36/816.18) lat (ms,95%): 127.81 err/s: 0.00 reconn/s: 0.00
[ 193s ] thds: 32 tps: 431.98 qps: 8735.52 (r/w/o: 6118.66/1752.90/863.95) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 194s ] thds: 32 tps: 426.02 qps: 8428.45 (r/w/o: 5910.31/1667.09/851.05) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 195s ] thds: 32 tps: 436.99 qps: 8836.73 (r/w/o: 6195.81/1765.95/874.97) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 196s ] thds: 32 tps: 430.94 qps: 8607.82 (r/w/o: 6012.17/1733.76/861.88) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 197s ] thds: 32 tps: 443.97 qps: 8820.33 (r/w/o: 6174.53/1757.87/887.93) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 198s ] thds: 32 tps: 430.10 qps: 8566.95 (r/w/o: 5997.37/1710.39/859.20) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 199s ] thds: 32 tps: 422.00 qps: 8554.08 (r/w/o: 5990.06/1719.02/845.01) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 200s ] thds: 32 tps: 438.92 qps: 8751.31 (r/w/o: 6133.82/1739.66/877.83) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 201s ] thds: 32 tps: 434.09 qps: 8669.80 (r/w/o: 6057.26/1745.36/867.18) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 202s ] thds: 32 tps: 430.93 qps: 8631.61 (r/w/o: 6052.03/1716.72/862.86) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 203s ] thds: 32 tps: 437.06 qps: 8685.22 (r/w/o: 6070.85/1740.24/874.12) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 204s ] thds: 32 tps: 434.97 qps: 8675.32 (r/w/o: 6063.52/1742.86/868.93) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 205s ] thds: 32 tps: 443.97 qps: 8898.37 (r/w/o: 6232.56/1776.87/888.94) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 206s ] thds: 32 tps: 431.02 qps: 8721.31 (r/w/o: 6112.22/1747.06/862.03) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 207s ] thds: 32 tps: 455.54 qps: 9126.79 (r/w/o: 6395.54/1820.16/911.08) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 208s ] thds: 32 tps: 445.41 qps: 8766.02 (r/w/o: 6131.61/1744.60/889.81) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 209s ] thds: 32 tps: 442.95 qps: 8923.90 (r/w/o: 6249.23/1787.78/886.89) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 210s ] thds: 32 tps: 456.05 qps: 9112.97 (r/w/o: 6359.68/1841.20/912.10) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 211s ] thds: 32 tps: 450.05 qps: 9037.01 (r/w/o: 6352.71/1784.20/900.10) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 212s ] thds: 32 tps: 446.06 qps: 8813.26 (r/w/o: 6150.88/1770.25/892.13) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 213s ] thds: 32 tps: 254.98 qps: 5113.60 (r/w/o: 3592.72/1010.92/509.96) lat (ms,95%): 404.61 err/s: 0.00 reconn/s: 0.00
[ 214s ] thds: 32 tps: 168.96 qps: 3423.17 (r/w/o: 2386.42/698.83/337.92) lat (ms,95%): 530.08 err/s: 0.00 reconn/s: 0.00
[ 215s ] thds: 32 tps: 195.04 qps: 3927.76 (r/w/o: 2748.53/789.15/390.08) lat (ms,95%): 520.62 err/s: 0.00 reconn/s: 0.00
[ 216s ] thds: 32 tps: 135.02 qps: 2668.30 (r/w/o: 1862.21/536.06/270.03) lat (ms,95%): 475.79 err/s: 0.00 reconn/s: 0.00
[ 217s ] thds: 32 tps: 103.00 qps: 2022.02 (r/w/o: 1433.01/383.00/206.00) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00
[ 218s ] thds: 32 tps: 52.00 qps: 1046.99 (r/w/o: 733.00/210.00/104.00) lat (ms,95%): 960.30 err/s: 0.00 reconn/s: 0.00
[ 219s ] thds: 32 tps: 47.00 qps: 881.00 (r/w/o: 599.00/188.00/94.00) lat (ms,95%): 1453.01 err/s: 0.00 reconn/s: 0.00
[ 220s ] thds: 32 tps: 61.00 qps: 1279.00 (r/w/o: 911.00/246.00/122.00) lat (ms,95%): 1069.86 err/s: 0.00 reconn/s: 0.00
[ 221s ] thds: 32 tps: 23.00 qps: 487.00 (r/w/o: 342.00/99.00/46.00) lat (ms,95%): 1191.92 err/s: 0.00 reconn/s: 0.00
[ 222s ] thds: 32 tps: 30.00 qps: 613.00 (r/w/o: 431.00/122.00/60.00) lat (ms,95%): 1869.60 err/s: 0.00 reconn/s: 0.00
[ 223s ] thds: 32 tps: 40.00 qps: 714.01 (r/w/o: 489.00/145.00/80.00) lat (ms,95%): 2493.86 err/s: 0.00 reconn/s: 0.00
[ 224s ] thds: 32 tps: 41.00 qps: 829.01 (r/w/o: 584.01/163.00/82.00) lat (ms,95%): 1648.20 err/s: 0.00 reconn/s: 0.00
[ 225s ] thds: 32 tps: 30.00 qps: 617.99 (r/w/o: 430.00/128.00/60.00) lat (ms,95%): 2009.23 err/s: 0.00 reconn/s: 0.00
[ 226s ] thds: 32 tps: 92.98 qps: 1847.54 (r/w/o: 1289.68/371.91/185.95) lat (ms,95%): 1533.66 err/s: 0.00 reconn/s: 0.00
[ 227s ] thds: 32 tps: 441.10 qps: 8902.10 (r/w/o: 6242.47/1777.42/882.21) lat (ms,95%): 127.81 err/s: 0.00 reconn/s: 0.00
[ 228s ] thds: 32 tps: 431.60 qps: 8604.07 (r/w/o: 5999.47/1741.40/863.20) lat (ms,95%): 125.52 err/s: 0.00 reconn/s: 0.00
[ 229s ] thds: 32 tps: 437.83 qps: 8775.64 (r/w/o: 6159.64/1740.33/875.66) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 230s ] thds: 32 tps: 443.53 qps: 8808.48 (r/w/o: 6159.33/1762.10/887.06) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 231s ] thds: 32 tps: 440.03 qps: 8920.62 (r/w/o: 6244.43/1796.12/880.06) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 232s ] thds: 32 tps: 457.02 qps: 9038.34 (r/w/o: 6320.24/1806.07/912.03) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 233s ] thds: 32 tps: 449.00 qps: 9010.02 (r/w/o: 6334.01/1776.00/900.00) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 234s ] thds: 32 tps: 459.01 qps: 9214.26 (r/w/o: 6433.18/1863.05/918.03) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 235s ] thds: 32 tps: 456.94 qps: 9134.79 (r/w/o: 6394.16/1826.76/913.88) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 236s ] thds: 32 tps: 448.10 qps: 8913.41 (r/w/o: 6234.72/1783.48/895.22) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 237s ] thds: 32 tps: 444.81 qps: 8983.83 (r/w/o: 6300.86/1792.34/890.63) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 238s ] thds: 32 tps: 474.07 qps: 9357.31 (r/w/o: 6532.91/1877.26/947.13) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 239s ] thds: 32 tps: 452.02 qps: 9025.36 (r/w/o: 6327.25/1793.07/905.04) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 240s ] thds: 32 tps: 458.97 qps: 9312.31 (r/w/o: 6509.52/1884.86/917.93) lat (ms,95%): 104.84 err/s: 0.00 reconn/s: 0.00
[ 241s ] thds: 32 tps: 469.99 qps: 9402.71 (r/w/o: 6594.80/1867.94/939.97) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 242s ] thds: 32 tps: 446.07 qps: 8993.38 (r/w/o: 6288.96/1813.28/891.14) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 243s ] thds: 32 tps: 471.85 qps: 9319.07 (r/w/o: 6518.95/1856.42/943.70) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 244s ] thds: 32 tps: 438.15 qps: 8863.00 (r/w/o: 6216.10/1769.60/877.30) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 245s ] thds: 32 tps: 466.00 qps: 9214.07 (r/w/o: 6448.05/1834.01/932.01) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 246s ] thds: 32 tps: 445.95 qps: 9029.00 (r/w/o: 6317.30/1819.80/891.90) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 247s ] thds: 32 tps: 463.02 qps: 9192.39 (r/w/o: 6430.27/1837.08/925.04) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 248s ] thds: 32 tps: 448.00 qps: 8982.97 (r/w/o: 6289.98/1795.99/897.00) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 249s ] thds: 32 tps: 458.94 qps: 9148.77 (r/w/o: 6403.14/1827.75/917.88) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 250s ] thds: 32 tps: 443.08 qps: 8800.65 (r/w/o: 6168.16/1746.33/886.17) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 251s ] thds: 32 tps: 347.95 qps: 7000.07 (r/w/o: 4904.35/1399.81/695.91) lat (ms,95%): 248.83 err/s: 0.00 reconn/s: 0.00
[ 252s ] thds: 32 tps: 354.01 qps: 7116.24 (r/w/o: 4966.17/1443.05/707.02) lat (ms,95%): 227.40 err/s: 0.00 reconn/s: 0.00
[ 253s ] thds: 32 tps: 181.02 qps: 3519.43 (r/w/o: 2477.31/679.08/363.04) lat (ms,95%): 467.30 err/s: 0.00 reconn/s: 0.00
[ 254s ] thds: 32 tps: 221.97 qps: 4457.40 (r/w/o: 3113.58/899.88/443.94) lat (ms,95%): 363.18 err/s: 0.00 reconn/s: 0.00
[ 255s ] thds: 32 tps: 173.02 qps: 3453.46 (r/w/o: 2424.33/683.09/346.05) lat (ms,95%): 404.61 err/s: 0.00 reconn/s: 0.00
[ 256s ] thds: 32 tps: 99.00 qps: 1967.93 (r/w/o: 1378.95/390.99/197.99) lat (ms,95%): 623.33 err/s: 0.00 reconn/s: 0.00
[ 257s ] thds: 32 tps: 46.00 qps: 995.02 (r/w/o: 708.02/195.00/92.00) lat (ms,95%): 893.56 err/s: 0.00 reconn/s: 0.00
[ 258s ] thds: 32 tps: 85.00 qps: 1623.01 (r/w/o: 1123.01/330.00/170.00) lat (ms,95%): 1280.93 err/s: 0.00 reconn/s: 0.00
[ 259s ] thds: 32 tps: 36.00 qps: 808.00 (r/w/o: 584.00/152.00/72.00) lat (ms,95%): 960.30 err/s: 0.00 reconn/s: 0.00
[ 260s ] thds: 32 tps: 71.00 qps: 1311.95 (r/w/o: 892.97/276.99/141.99) lat (ms,95%): 1561.52 err/s: 0.00 reconn/s: 0.00
[ 261s ] thds: 32 tps: 43.00 qps: 879.95 (r/w/o: 626.97/166.99/86.00) lat (ms,95%): 1213.57 err/s: 0.00 reconn/s: 0.00
[ 262s ] thds: 32 tps: 49.00 qps: 970.05 (r/w/o: 669.04/203.01/98.01) lat (ms,95%): 1327.91 err/s: 0.00 reconn/s: 0.00
[ 263s ] thds: 32 tps: 23.99 qps: 571.83 (r/w/o: 408.88/114.97/47.99) lat (ms,95%): 1089.30 err/s: 0.00 reconn/s: 0.00
[ 264s ] thds: 32 tps: 19.01 qps: 384.12 (r/w/o: 270.08/76.02/38.01) lat (ms,95%): 1618.78 err/s: 0.00 reconn/s: 0.00
[ 265s ] thds: 32 tps: 17.00 qps: 336.00 (r/w/o: 247.00/55.00/34.00) lat (ms,95%): 2449.36 err/s: 0.00 reconn/s: 0.00
[ 266s ] thds: 32 tps: 109.99 qps: 2150.81 (r/w/o: 1481.87/448.96/219.98) lat (ms,95%): 2778.39 err/s: 0.00 reconn/s: 0.00
[ 267s ] thds: 32 tps: 436.94 qps: 8725.82 (r/w/o: 6109.17/1742.76/873.88) lat (ms,95%): 125.52 err/s: 0.00 reconn/s: 0.00
[ 268s ] thds: 32 tps: 434.10 qps: 8742.95 (r/w/o: 6129.37/1745.39/868.19) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 269s ] thds: 32 tps: 451.79 qps: 9034.80 (r/w/o: 6305.07/1826.15/903.58) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 270s ] thds: 32 tps: 439.90 qps: 8808.91 (r/w/o: 6185.53/1743.59/879.79) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 271s ] thds: 32 tps: 453.28 qps: 8949.54 (r/w/o: 6243.87/1802.12/903.56) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 272s ] thds: 32 tps: 447.02 qps: 9079.37 (r/w/o: 6377.26/1805.07/897.04) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 273s ] thds: 32 tps: 460.99 qps: 9101.73 (r/w/o: 6361.81/1820.95/918.97) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 274s ] thds: 32 tps: 462.03 qps: 9244.63 (r/w/o: 6466.44/1851.13/927.06) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 275s ] thds: 32 tps: 446.92 qps: 8997.47 (r/w/o: 6302.93/1800.69/893.85) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 276s ] thds: 32 tps: 465.01 qps: 9314.25 (r/w/o: 6502.18/1882.05/930.03) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 277s ] thds: 32 tps: 452.03 qps: 9001.56 (r/w/o: 6307.39/1791.11/903.06) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 278s ] thds: 32 tps: 461.97 qps: 9271.45 (r/w/o: 6501.61/1844.89/924.95) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 279s ] thds: 32 tps: 455.03 qps: 9070.50 (r/w/o: 6359.35/1801.10/910.05) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 280s ] thds: 32 tps: 453.91 qps: 9108.15 (r/w/o: 6366.71/1833.63/907.82) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 281s ] thds: 32 tps: 448.11 qps: 8999.18 (r/w/o: 6305.53/1798.44/895.22) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 282s ] thds: 32 tps: 459.96 qps: 9245.14 (r/w/o: 6466.40/1858.83/919.91) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 283s ] thds: 32 tps: 453.03 qps: 9010.68 (r/w/o: 6283.47/1822.14/905.07) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 284s ] thds: 32 tps: 457.97 qps: 9133.39 (r/w/o: 6411.57/1803.88/917.94) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 285s ] thds: 32 tps: 449.06 qps: 8962.21 (r/w/o: 6251.84/1815.25/895.12) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 286s ] thds: 32 tps: 464.00 qps: 9270.07 (r/w/o: 6510.05/1829.01/931.01) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 287s ] thds: 32 tps: 462.00 qps: 9237.01 (r/w/o: 6467.00/1846.00/924.00) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 288s ] thds: 32 tps: 449.01 qps: 9027.14 (r/w/o: 6342.10/1787.03/898.01) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 289s ] thds: 32 tps: 474.84 qps: 9391.89 (r/w/o: 6535.83/1909.37/946.69) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 290s ] thds: 32 tps: 438.14 qps: 8922.92 (r/w/o: 6273.05/1770.58/879.29) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 291s ] thds: 32 tps: 463.99 qps: 9216.73 (r/w/o: 6443.81/1845.95/926.97) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 292s ] thds: 32 tps: 448.01 qps: 8943.27 (r/w/o: 6248.19/1798.05/897.03) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 293s ] thds: 32 tps: 356.99 qps: 7107.77 (r/w/o: 4987.84/1405.95/713.98) lat (ms,95%): 196.89 err/s: 0.00 reconn/s: 0.00
[ 294s ] thds: 32 tps: 303.97 qps: 6086.48 (r/w/o: 4260.64/1217.90/607.95) lat (ms,95%): 282.25 err/s: 0.00 reconn/s: 0.00
[ 295s ] thds: 32 tps: 241.02 qps: 4832.46 (r/w/o: 3387.32/963.09/482.05) lat (ms,95%): 344.08 err/s: 0.00 reconn/s: 0.00
[ 296s ] thds: 32 tps: 193.01 qps: 3883.14 (r/w/o: 2732.10/765.03/386.01) lat (ms,95%): 363.18 err/s: 0.00 reconn/s: 0.00
[ 297s ] thds: 32 tps: 181.00 qps: 3562.02 (r/w/o: 2474.02/726.00/362.00) lat (ms,95%): 530.08 err/s: 0.00 reconn/s: 0.00
[ 298s ] thds: 32 tps: 115.00 qps: 2285.99 (r/w/o: 1610.99/445.00/230.00) lat (ms,95%): 580.02 err/s: 0.00 reconn/s: 0.00
[ 299s ] thds: 32 tps: 66.00 qps: 1339.95 (r/w/o: 933.96/273.99/131.99) lat (ms,95%): 831.46 err/s: 0.00 reconn/s: 0.00
[ 300s ] thds: 32 tps: 45.00 qps: 866.03 (r/w/o: 599.02/177.01/90.00) lat (ms,95%): 1304.21 err/s: 0.00 reconn/s: 0.00
[ 301s ] thds: 32 tps: 32.00 qps: 682.00 (r/w/o: 490.00/128.00/64.00) lat (ms,95%): 1352.03 err/s: 0.00 reconn/s: 0.00
[ 302s ] thds: 32 tps: 38.00 qps: 773.99 (r/w/o: 536.99/161.00/76.00) lat (ms,95%): 1453.01 err/s: 0.00 reconn/s: 0.00
[ 303s ] thds: 32 tps: 47.00 qps: 916.01 (r/w/o: 638.00/184.00/94.00) lat (ms,95%): 1708.63 err/s: 0.00 reconn/s: 0.00
[ 304s ] thds: 32 tps: 51.00 qps: 1007.01 (r/w/o: 709.01/196.00/102.00) lat (ms,95%): 1352.03 err/s: 0.00 reconn/s: 0.00
[ 305s ] thds: 32 tps: 42.00 qps: 838.00 (r/w/o: 586.00/168.00/84.00) lat (ms,95%): 1427.08 err/s: 0.00 reconn/s: 0.00
[ 306s ] thds: 32 tps: 26.00 qps: 541.00 (r/w/o: 375.00/114.00/52.00) lat (ms,95%): 1280.93 err/s: 0.00 reconn/s: 0.00
[ 307s ] thds: 32 tps: 138.87 qps: 2829.33 (r/w/o: 1995.12/556.47/277.74) lat (ms,95%): 1327.91 err/s: 0.00 reconn/s: 0.00
[ 308s ] thds: 32 tps: 442.38 qps: 8851.53 (r/w/o: 6177.26/1789.52/884.75) lat (ms,95%): 130.13 err/s: 0.00 reconn/s: 0.00
[ 309s ] thds: 32 tps: 438.72 qps: 8795.37 (r/w/o: 6169.05/1748.88/877.44) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 310s ] thds: 32 tps: 450.28 qps: 9027.65 (r/w/o: 6310.95/1816.14/900.56) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 311s ] thds: 32 tps: 419.05 qps: 8361.90 (r/w/o: 5858.63/1665.18/838.09) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 312s ] thds: 32 tps: 448.96 qps: 8925.26 (r/w/o: 6224.49/1804.85/895.93) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 313s ] thds: 32 tps: 452.94 qps: 8971.76 (r/w/o: 6288.13/1775.75/907.87) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 314s ] thds: 32 tps: 439.06 qps: 8826.19 (r/w/o: 6184.83/1763.24/878.12) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 315s ] thds: 32 tps: 435.87 qps: 8751.41 (r/w/o: 6126.19/1753.48/871.74) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 316s ] thds: 32 tps: 449.10 qps: 8942.03 (r/w/o: 6254.42/1790.41/897.20) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 317s ] thds: 32 tps: 454.96 qps: 9059.13 (r/w/o: 6343.39/1806.83/908.91) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 318s ] thds: 32 tps: 452.10 qps: 9212.10 (r/w/o: 6462.47/1843.42/906.21) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 319s ] thds: 32 tps: 456.95 qps: 9078.91 (r/w/o: 6338.24/1826.78/913.89) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 320s ] thds: 32 tps: 451.03 qps: 8983.58 (r/w/o: 6292.41/1791.12/900.06) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 321s ] thds: 32 tps: 461.85 qps: 9152.09 (r/w/o: 6380.97/1846.41/924.71) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 322s ] thds: 32 tps: 456.09 qps: 9225.82 (r/w/o: 6484.28/1828.36/913.18) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 323s ] thds: 32 tps: 437.90 qps: 8862.93 (r/w/o: 6203.55/1783.58/875.80) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 324s ] thds: 32 tps: 463.20 qps: 9225.93 (r/w/o: 6459.75/1839.78/926.39) lat (ms,95%): 104.84 err/s: 0.00 reconn/s: 0.00
[ 325s ] thds: 32 tps: 443.97 qps: 8873.44 (r/w/o: 6221.61/1763.89/887.94) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 326s ] thds: 32 tps: 476.02 qps: 9391.41 (r/w/o: 6557.29/1883.08/951.04) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 327s ] thds: 32 tps: 452.95 qps: 9054.09 (r/w/o: 6321.37/1831.82/900.91) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 328s ] thds: 32 tps: 444.05 qps: 9010.98 (r/w/o: 6340.69/1776.19/894.10) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 329s ] thds: 32 tps: 454.98 qps: 9086.55 (r/w/o: 6349.69/1826.91/909.95) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 330s ] thds: 32 tps: 453.80 qps: 9161.87 (r/w/o: 6412.11/1842.17/907.59) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 331s ] thds: 32 tps: 334.61 qps: 6412.56 (r/w/o: 4470.81/1272.52/669.22) lat (ms,95%): 150.29 err/s: 0.00 reconn/s: 0.00
[ 332s ] thds: 32 tps: 259.44 qps: 5338.96 (r/w/o: 3766.32/1053.77/518.87) lat (ms,95%): 520.62 err/s: 0.00 reconn/s: 0.00
[ 333s ] thds: 32 tps: 126.00 qps: 2512.03 (r/w/o: 1762.02/498.01/252.00) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00
[ 334s ] thds: 32 tps: 196.99 qps: 3913.90 (r/w/o: 2730.93/788.98/393.99) lat (ms,95%): 419.45 err/s: 0.00 reconn/s: 0.00
[ 335s ] thds: 32 tps: 164.00 qps: 3271.05 (r/w/o: 2291.04/652.01/328.01) lat (ms,95%): 442.73 err/s: 0.00 reconn/s: 0.00
[ 336s ] thds: 32 tps: 127.98 qps: 2592.60 (r/w/o: 1824.72/511.92/255.96) lat (ms,95%): 601.29 err/s: 0.00 reconn/s: 0.00
[ 337s ] thds: 32 tps: 103.02 qps: 2018.31 (r/w/o: 1401.21/411.06/206.03) lat (ms,95%): 746.32 err/s: 0.00 reconn/s: 0.00
[ 338s ] thds: 32 tps: 75.99 qps: 1546.87 (r/w/o: 1089.91/305.97/150.99) lat (ms,95%): 623.33 err/s: 0.00 reconn/s: 0.00
[ 339s ] thds: 32 tps: 43.00 qps: 875.08 (r/w/o: 615.06/173.02/87.01) lat (ms,95%): 1089.30 err/s: 0.00 reconn/s: 0.00
[ 340s ] thds: 32 tps: 48.00 qps: 934.98 (r/w/o: 645.98/193.00/96.00) lat (ms,95%): 1589.90 err/s: 0.00 reconn/s: 0.00
[ 341s ] thds: 32 tps: 39.00 qps: 817.00 (r/w/o: 577.00/162.00/78.00) lat (ms,95%): 1533.66 err/s: 0.00 reconn/s: 0.00
[ 342s ] thds: 32 tps: 73.00 qps: 1369.00 (r/w/o: 944.00/279.00/146.00) lat (ms,95%): 1069.86 err/s: 0.00 reconn/s: 0.00
[ 343s ] thds: 32 tps: 36.94 qps: 768.70 (r/w/o: 552.07/142.76/73.88) lat (ms,95%): 1453.01 err/s: 0.00 reconn/s: 0.00
[ 344s ] thds: 32 tps: 32.05 qps: 669.14 (r/w/o: 475.81/129.22/64.11) lat (ms,95%): 1401.61 err/s: 0.00 reconn/s: 0.00
[ 345s ] thds: 32 tps: 31.00 qps: 601.00 (r/w/o: 412.00/127.00/62.00) lat (ms,95%): 1938.16 err/s: 0.00 reconn/s: 0.00
[ 346s ] thds: 32 tps: 236.00 qps: 4752.93 (r/w/o: 3315.95/967.99/468.99) lat (ms,95%): 1129.24 err/s: 0.00 reconn/s: 0.00
[ 347s ] thds: 32 tps: 431.83 qps: 8663.57 (r/w/o: 6066.59/1730.31/866.66) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 348s ] thds: 32 tps: 432.17 qps: 8628.34 (r/w/o: 6049.34/1714.66/864.33) lat (ms,95%): 127.81 err/s: 0.00 reconn/s: 0.00
[ 349s ] thds: 32 tps: 442.97 qps: 8830.44 (r/w/o: 6168.61/1778.89/882.94) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 350s ] thds: 32 tps: 443.00 qps: 8839.04 (r/w/o: 6190.03/1760.01/889.00) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 351s ] thds: 32 tps: 453.91 qps: 9096.21 (r/w/o: 6358.75/1829.64/907.82) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 352s ] thds: 32 tps: 454.11 qps: 9129.29 (r/w/o: 6397.60/1823.46/908.23) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 353s ] thds: 32 tps: 457.97 qps: 9164.38 (r/w/o: 6427.56/1820.88/915.94) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 354s ] thds: 32 tps: 450.00 qps: 9100.08 (r/w/o: 6361.06/1839.02/900.01) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 355s ] thds: 32 tps: 467.97 qps: 9200.38 (r/w/o: 6431.57/1832.88/935.94) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 356s ] thds: 32 tps: 439.98 qps: 8848.53 (r/w/o: 6200.67/1767.91/879.95) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 357s ] thds: 32 tps: 457.98 qps: 9201.60 (r/w/o: 6445.72/1839.92/915.96) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 358s ] thds: 32 tps: 452.99 qps: 9041.75 (r/w/o: 6333.82/1801.95/905.97) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 359s ] thds: 32 tps: 464.72 qps: 9255.51 (r/w/o: 6475.16/1851.90/928.45) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 360s ] thds: 32 tps: 450.38 qps: 8978.52 (r/w/o: 6276.26/1800.51/901.76) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 361s ] thds: 32 tps: 460.65 qps: 9230.91 (r/w/o: 6450.05/1859.57/921.29) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 362s ] thds: 32 tps: 453.28 qps: 9106.54 (r/w/o: 6371.88/1828.11/906.55) lat (ms,95%): 104.84 err/s: 0.00 reconn/s: 0.00
[ 363s ] thds: 32 tps: 456.06 qps: 9088.12 (r/w/o: 6369.79/1807.22/911.11) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 364s ] thds: 32 tps: 454.99 qps: 9054.72 (r/w/o: 6332.81/1811.94/909.97) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 365s ] thds: 32 tps: 458.95 qps: 9188.09 (r/w/o: 6447.36/1821.82/918.91) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 366s ] thds: 32 tps: 446.09 qps: 8956.82 (r/w/o: 6253.27/1812.37/891.18) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 367s ] thds: 32 tps: 456.96 qps: 9193.15 (r/w/o: 6453.40/1824.83/914.92) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 368s ] thds: 32 tps: 456.98 qps: 9053.52 (r/w/o: 6340.66/1799.90/912.95) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 369s ] thds: 32 tps: 445.00 qps: 8994.96 (r/w/o: 6300.97/1803.99/890.00) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 370s ] thds: 32 tps: 440.06 qps: 8705.15 (r/w/o: 6084.80/1739.23/881.12) lat (ms,95%): 125.52 err/s: 0.00 reconn/s: 0.00
[ 371s ] thds: 32 tps: 263.00 qps: 5412.06 (r/w/o: 3787.04/1099.01/526.01) lat (ms,95%): 253.35 err/s: 0.00 reconn/s: 0.00
[ 372s ] thds: 32 tps: 179.99 qps: 3449.78 (r/w/o: 2423.85/665.96/359.98) lat (ms,95%): 467.30 err/s: 0.00 reconn/s: 0.00
[ 373s ] thds: 32 tps: 117.01 qps: 2376.10 (r/w/o: 1670.07/472.02/234.01) lat (ms,95%): 733.00 err/s: 0.00 reconn/s: 0.00
[ 374s ] thds: 32 tps: 227.00 qps: 4513.04 (r/w/o: 3156.03/903.01/454.00) lat (ms,95%): 383.33 err/s: 0.00 reconn/s: 0.00
[ 375s ] thds: 32 tps: 137.00 qps: 2786.01 (r/w/o: 1953.01/559.00/274.00) lat (ms,95%): 467.30 err/s: 0.00 reconn/s: 0.00
[ 376s ] thds: 32 tps: 96.00 qps: 1896.02 (r/w/o: 1331.01/373.00/192.00) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00
[ 377s ] thds: 32 tps: 48.00 qps: 1009.98 (r/w/o: 710.99/203.00/96.00) lat (ms,95%): 1170.65 err/s: 0.00 reconn/s: 0.00
[ 378s ] thds: 32 tps: 55.00 qps: 1091.01 (r/w/o: 765.01/216.00/110.00) lat (ms,95%): 1453.01 err/s: 0.00 reconn/s: 0.00
[ 379s ] thds: 32 tps: 41.00 qps: 797.00 (r/w/o: 541.00/174.00/82.00) lat (ms,95%): 1708.63 err/s: 0.00 reconn/s: 0.00
[ 380s ] thds: 32 tps: 57.00 qps: 1102.01 (r/w/o: 777.01/211.00/114.00) lat (ms,95%): 1589.90 err/s: 0.00 reconn/s: 0.00
[ 381s ] thds: 32 tps: 44.00 qps: 848.00 (r/w/o: 583.00/177.00/88.00) lat (ms,95%): 1032.01 err/s: 0.00 reconn/s: 0.00
[ 382s ] thds: 32 tps: 43.00 qps: 973.00 (r/w/o: 679.00/208.00/86.00) lat (ms,95%): 1678.14 err/s: 0.00 reconn/s: 0.00
[ 383s ] thds: 32 tps: 42.00 qps: 771.00 (r/w/o: 550.00/137.00/84.00) lat (ms,95%): 1506.29 err/s: 0.00 reconn/s: 0.00
[ 384s ] thds: 32 tps: 30.00 qps: 544.00 (r/w/o: 375.00/109.00/60.00) lat (ms,95%): 1803.47 err/s: 0.00 reconn/s: 0.00
[ 385s ] thds: 32 tps: 58.00 qps: 1277.97 (r/w/o: 892.98/268.99/116.00) lat (ms,95%): 1708.63 err/s: 0.00 reconn/s: 0.00
[ 386s ] thds: 32 tps: 461.94 qps: 9151.86 (r/w/o: 6398.20/1830.77/922.89) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 387s ] thds: 32 tps: 435.02 qps: 8701.33 (r/w/o: 6097.23/1733.07/871.03) lat (ms,95%): 125.52 err/s: 0.00 reconn/s: 0.00
[ 388s ] thds: 32 tps: 435.99 qps: 8751.87 (r/w/o: 6138.91/1742.97/869.99) lat (ms,95%): 127.81 err/s: 0.00 reconn/s: 0.00
[ 389s ] thds: 32 tps: 438.00 qps: 8757.91 (r/w/o: 6110.94/1768.98/877.99) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 390s ] thds: 32 tps: 449.60 qps: 9049.02 (r/w/o: 6360.39/1789.42/899.21) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 391s ] thds: 32 tps: 456.27 qps: 9070.36 (r/w/o: 6316.73/1841.09/912.54) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 392s ] thds: 32 tps: 438.18 qps: 8747.62 (r/w/o: 6142.54/1728.71/876.36) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 393s ] thds: 32 tps: 453.94 qps: 9100.85 (r/w/o: 6360.20/1832.77/907.89) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 394s ] thds: 32 tps: 440.02 qps: 8856.43 (r/w/o: 6211.30/1766.09/879.04) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 395s ] thds: 32 tps: 465.96 qps: 9185.12 (r/w/o: 6411.39/1840.82/932.91) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 396s ] thds: 32 tps: 441.05 qps: 8958.03 (r/w/o: 6274.72/1802.21/881.10) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 397s ] thds: 32 tps: 458.99 qps: 9066.88 (r/w/o: 6343.91/1804.98/917.99) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 398s ] thds: 32 tps: 450.95 qps: 9041.94 (r/w/o: 6327.26/1813.79/900.89) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 399s ] thds: 32 tps: 455.03 qps: 9153.70 (r/w/o: 6414.49/1827.14/912.07) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 400s ] thds: 32 tps: 454.92 qps: 9110.38 (r/w/o: 6380.87/1819.68/909.84) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 401s ] thds: 32 tps: 452.13 qps: 9108.63 (r/w/o: 6369.84/1834.53/904.26) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 402s ] thds: 32 tps: 455.96 qps: 9087.26 (r/w/o: 6363.48/1811.85/911.93) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 403s ] thds: 32 tps: 455.04 qps: 9039.72 (r/w/o: 6330.51/1799.14/910.07) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 404s ] thds: 32 tps: 454.78 qps: 9159.62 (r/w/o: 6414.93/1835.12/909.57) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 405s ] thds: 32 tps: 456.17 qps: 9062.37 (r/w/o: 6325.35/1824.68/912.34) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 406s ] thds: 32 tps: 458.64 qps: 9188.86 (r/w/o: 6445.99/1826.58/916.29) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 407s ] thds: 32 tps: 443.35 qps: 8849.99 (r/w/o: 6189.89/1774.40/885.70) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 408s ] thds: 32 tps: 464.05 qps: 9291.91 (r/w/o: 6496.63/1865.18/930.09) lat (ms,95%): 104.84 err/s: 0.00 reconn/s: 0.00
[ 409s ] thds: 32 tps: 452.97 qps: 8982.35 (r/w/o: 6300.54/1777.87/903.93) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 410s ] thds: 32 tps: 457.99 qps: 9295.86 (r/w/o: 6499.90/1877.97/917.99) lat (ms,95%): 104.84 err/s: 0.00 reconn/s: 0.00
[ 411s ] thds: 32 tps: 446.03 qps: 8890.63 (r/w/o: 6242.44/1757.12/891.06) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 412s ] thds: 32 tps: 469.97 qps: 9347.39 (r/w/o: 6526.58/1880.88/939.94) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 413s ] thds: 32 tps: 405.03 qps: 8162.53 (r/w/o: 5739.37/1612.10/811.05) lat (ms,95%): 164.45 err/s: 0.00 reconn/s: 0.00
[ 414s ] thds: 32 tps: 276.86 qps: 5471.28 (r/w/o: 3822.10/1095.46/553.72) lat (ms,95%): 257.95 err/s: 0.00 reconn/s: 0.00
[ 415s ] thds: 32 tps: 276.05 qps: 5509.90 (r/w/o: 3859.63/1098.18/552.09) lat (ms,95%): 325.98 err/s: 0.00 reconn/s: 0.00
[ 416s ] thds: 32 tps: 228.08 qps: 4550.66 (r/w/o: 3179.16/915.33/456.17) lat (ms,95%): 390.30 err/s: 0.00 reconn/s: 0.00
[ 417s ] thds: 32 tps: 233.00 qps: 4630.91 (r/w/o: 3231.94/932.98/465.99) lat (ms,95%): 383.33 err/s: 0.00 reconn/s: 0.00
[ 418s ] thds: 32 tps: 114.00 qps: 2342.97 (r/w/o: 1640.98/473.99/228.00) lat (ms,95%): 733.00 err/s: 0.00 reconn/s: 0.00
[ 419s ] thds: 32 tps: 130.00 qps: 2538.04 (r/w/o: 1777.03/501.01/260.00) lat (ms,95%): 669.89 err/s: 0.00 reconn/s: 0.00
[ 420s ] thds: 32 tps: 99.00 qps: 2038.02 (r/w/o: 1444.02/396.00/198.00) lat (ms,95%): 646.19 err/s: 0.00 reconn/s: 0.00
[ 421s ] thds: 32 tps: 58.00 qps: 1127.96 (r/w/o: 786.97/224.99/116.00) lat (ms,95%): 943.16 err/s: 0.00 reconn/s: 0.00
[ 422s ] thds: 32 tps: 63.00 qps: 1226.03 (r/w/o: 838.02/262.01/126.00) lat (ms,95%): 1050.76 err/s: 0.00 reconn/s: 0.00
[ 423s ] thds: 32 tps: 39.00 qps: 836.00 (r/w/o: 593.00/165.00/78.00) lat (ms,95%): 1618.78 err/s: 0.00 reconn/s: 0.00
[ 424s ] thds: 32 tps: 34.00 qps: 669.01 (r/w/o: 479.00/122.00/68.00) lat (ms,95%): 1739.68 err/s: 0.00 reconn/s: 0.00
[ 425s ] thds: 32 tps: 45.00 qps: 851.00 (r/w/o: 586.00/175.00/90.00) lat (ms,95%): 1618.78 err/s: 0.00 reconn/s: 0.00
[ 426s ] thds: 32 tps: 41.00 qps: 876.98 (r/w/o: 628.99/166.00/82.00) lat (ms,95%): 1069.86 err/s: 0.00 reconn/s: 0.00
[ 427s ] thds: 32 tps: 24.00 qps: 456.01 (r/w/o: 300.01/108.00/48.00) lat (ms,95%): 2045.74 err/s: 0.00 reconn/s: 0.00
[ 428s ] thds: 32 tps: 362.97 qps: 7400.37 (r/w/o: 5174.56/1499.87/725.94) lat (ms,95%): 580.02 err/s: 0.00 reconn/s: 0.00
[ 429s ] thds: 32 tps: 450.03 qps: 8820.64 (r/w/o: 6181.45/1739.13/900.07) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 430s ] thds: 32 tps: 431.83 qps: 8742.54 (r/w/o: 6125.58/1753.31/863.66) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 431s ] thds: 32 tps: 446.12 qps: 8816.39 (r/w/o: 6137.66/1786.48/892.24) lat (ms,95%): 121.08 err/s: 0.00 reconn/s: 0.00
[ 432s ] thds: 32 tps: 434.03 qps: 8709.59 (r/w/o: 6126.42/1715.12/868.06) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 433s ] thds: 32 tps: 440.02 qps: 8899.46 (r/w/o: 6239.32/1780.09/880.05) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 434s ] thds: 32 tps: 436.00 qps: 8691.93 (r/w/o: 6075.95/1743.99/871.99) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 435s ] thds: 32 tps: 457.00 qps: 9167.00 (r/w/o: 6420.00/1833.00/914.00) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 436s ] thds: 32 tps: 452.77 qps: 8992.41 (r/w/o: 6292.78/1794.08/905.54) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 437s ] thds: 32 tps: 445.17 qps: 8992.53 (r/w/o: 6301.47/1800.71/890.35) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 438s ] thds: 32 tps: 454.96 qps: 9083.18 (r/w/o: 6356.43/1816.84/909.92) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 439s ] thds: 32 tps: 458.06 qps: 9149.28 (r/w/o: 6383.89/1849.26/916.13) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 440s ] thds: 32 tps: 455.94 qps: 9083.84 (r/w/o: 6375.19/1797.77/910.88) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 441s ] thds: 32 tps: 449.09 qps: 8962.71 (r/w/o: 6269.20/1794.34/899.17) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 442s ] thds: 32 tps: 464.97 qps: 9267.31 (r/w/o: 6479.52/1858.86/928.93) lat (ms,95%): 104.84 err/s: 0.00 reconn/s: 0.00
[ 443s ] thds: 32 tps: 440.03 qps: 8913.54 (r/w/o: 6234.38/1798.11/881.05) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 444s ] thds: 32 tps: 462.97 qps: 9169.44 (r/w/o: 6431.61/1811.89/925.94) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 445s ] thds: 32 tps: 446.94 qps: 8934.80 (r/w/o: 6248.16/1793.76/892.88) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 446s ] thds: 32 tps: 457.04 qps: 9175.82 (r/w/o: 6429.57/1832.16/914.08) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 447s ] thds: 32 tps: 446.03 qps: 8907.57 (r/w/o: 6240.40/1774.11/893.06) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 448s ] thds: 32 tps: 461.83 qps: 9257.64 (r/w/o: 6460.65/1874.32/922.67) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 449s ] thds: 32 tps: 459.10 qps: 9089.89 (r/w/o: 6363.33/1807.38/919.19) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 450s ] thds: 32 tps: 447.07 qps: 9039.40 (r/w/o: 6334.98/1810.28/894.14) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 451s ] thds: 32 tps: 457.88 qps: 9109.71 (r/w/o: 6398.39/1795.55/915.77) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 452s ] thds: 32 tps: 446.96 qps: 8990.21 (r/w/o: 6277.45/1818.84/893.92) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 453s ] thds: 32 tps: 236.10 qps: 4648.92 (r/w/o: 3262.35/914.38/472.20) lat (ms,95%): 337.94 err/s: 0.00 reconn/s: 0.00
[ 454s ] thds: 32 tps: 156.00 qps: 3128.99 (r/w/o: 2188.00/629.00/312.00) lat (ms,95%): 520.62 err/s: 0.00 reconn/s: 0.00
[ 455s ] thds: 32 tps: 153.00 qps: 3019.01 (r/w/o: 2107.01/606.00/306.00) lat (ms,95%): 657.93 err/s: 0.00 reconn/s: 0.00
[ 456s ] thds: 32 tps: 186.00 qps: 3719.95 (r/w/o: 2605.96/741.99/371.99) lat (ms,95%): 427.07 err/s: 0.00 reconn/s: 0.00
[ 457s ] thds: 32 tps: 166.00 qps: 3350.10 (r/w/o: 2351.07/667.02/332.01) lat (ms,95%): 419.45 err/s: 0.00 reconn/s: 0.00
[ 458s ] thds: 32 tps: 72.00 qps: 1501.97 (r/w/o: 1056.98/300.99/144.00) lat (ms,95%): 682.06 err/s: 0.00 reconn/s: 0.00
[ 459s ] thds: 32 tps: 69.00 qps: 1345.01 (r/w/o: 939.01/268.00/138.00) lat (ms,95%): 1708.63 err/s: 0.00 reconn/s: 0.00
[ 460s ] thds: 32 tps: 40.00 qps: 767.01 (r/w/o: 534.00/153.00/80.00) lat (ms,95%): 1304.21 err/s: 0.00 reconn/s: 0.00
[ 461s ] thds: 32 tps: 54.00 qps: 1089.98 (r/w/o: 759.99/222.00/108.00) lat (ms,95%): 1129.24 err/s: 0.00 reconn/s: 0.00
[ 462s ] thds: 32 tps: 53.00 qps: 1063.93 (r/w/o: 751.95/205.99/105.99) lat (ms,95%): 1258.08 err/s: 0.00 reconn/s: 0.00
[ 463s ] thds: 32 tps: 45.00 qps: 905.06 (r/w/o: 628.04/187.01/90.01) lat (ms,95%): 1258.08 err/s: 0.00 reconn/s: 0.00
[ 464s ] thds: 32 tps: 61.00 qps: 1181.99 (r/w/o: 825.99/234.00/122.00) lat (ms,95%): 1327.91 err/s: 0.00 reconn/s: 0.00
[ 465s ] thds: 32 tps: 24.00 qps: 558.00 (r/w/o: 410.00/100.00/48.00) lat (ms,95%): 1304.21 err/s: 0.00 reconn/s: 0.00
[ 466s ] thds: 32 tps: 54.00 qps: 1007.99 (r/w/o: 683.99/216.00/108.00) lat (ms,95%): 1533.66 err/s: 0.00 reconn/s: 0.00
[ 467s ] thds: 32 tps: 224.87 qps: 4592.31 (r/w/o: 3207.12/937.45/447.74) lat (ms,95%): 831.46 err/s: 0.00 reconn/s: 0.00
[ 468s ] thds: 32 tps: 455.26 qps: 9000.09 (r/w/o: 6298.56/1790.01/911.52) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 469s ] thds: 32 tps: 448.98 qps: 9013.53 (r/w/o: 6309.67/1804.91/898.95) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 470s ] thds: 32 tps: 435.03 qps: 8814.52 (r/w/o: 6186.37/1758.10/870.05) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 471s ] thds: 32 tps: 452.01 qps: 8943.19 (r/w/o: 6246.14/1793.04/904.02) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 472s ] thds: 32 tps: 447.97 qps: 8948.42 (r/w/o: 6266.59/1785.88/895.94) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 473s ] thds: 32 tps: 451.99 qps: 9010.85 (r/w/o: 6302.90/1804.97/902.99) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 474s ] thds: 32 tps: 460.04 qps: 9194.76 (r/w/o: 6442.53/1831.15/921.08) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 475s ] thds: 32 tps: 439.99 qps: 8900.70 (r/w/o: 6235.79/1784.94/879.97) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 476s ] thds: 32 tps: 446.98 qps: 9030.69 (r/w/o: 6319.78/1816.94/893.97) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 477s ] thds: 32 tps: 461.03 qps: 9164.53 (r/w/o: 6417.37/1825.11/922.05) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 478s ] thds: 32 tps: 455.01 qps: 9139.10 (r/w/o: 6406.07/1824.02/909.01) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 479s ] thds: 32 tps: 466.98 qps: 9197.70 (r/w/o: 6421.79/1840.94/934.97) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 480s ] thds: 32 tps: 439.98 qps: 8904.56 (r/w/o: 6249.69/1774.91/879.96) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 481s ] thds: 32 tps: 457.97 qps: 9153.45 (r/w/o: 6401.62/1835.89/915.95) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 482s ] thds: 32 tps: 446.02 qps: 8945.45 (r/w/o: 6251.31/1803.09/891.04) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 483s ] thds: 32 tps: 465.04 qps: 9233.72 (r/w/o: 6472.50/1832.14/929.07) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 484s ] thds: 32 tps: 452.01 qps: 9015.10 (r/w/o: 6311.07/1798.02/906.01) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 485s ] thds: 32 tps: 451.00 qps: 9006.96 (r/w/o: 6295.97/1810.99/900.00) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 486s ] thds: 32 tps: 459.01 qps: 9217.15 (r/w/o: 6455.10/1842.03/920.01) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 487s ] thds: 32 tps: 448.90 qps: 8955.99 (r/w/o: 6277.59/1780.60/897.80) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 488s ] thds: 32 tps: 468.05 qps: 9351.95 (r/w/o: 6542.66/1875.19/934.09) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 489s ] thds: 32 tps: 436.75 qps: 8818.91 (r/w/o: 6156.45/1786.97/875.49) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 490s ] thds: 32 tps: 473.24 qps: 9442.70 (r/w/o: 6635.30/1860.93/946.47) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 491s ] thds: 32 tps: 459.08 qps: 9083.57 (r/w/o: 6339.10/1826.32/918.16) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 492s ] thds: 32 tps: 424.00 qps: 8456.08 (r/w/o: 5927.06/1681.02/848.01) lat (ms,95%): 130.13 err/s: 0.00 reconn/s: 0.00
[ 493s ] thds: 32 tps: 249.00 qps: 5069.05 (r/w/o: 3561.04/1010.01/498.01) lat (ms,95%): 344.08 err/s: 0.00 reconn/s: 0.00
[ 494s ] thds: 32 tps: 177.98 qps: 3512.54 (r/w/o: 2449.68/706.91/355.95) lat (ms,95%): 442.73 err/s: 0.00 reconn/s: 0.00
[ 495s ] thds: 32 tps: 153.00 qps: 3080.97 (r/w/o: 2156.98/617.99/306.00) lat (ms,95%): 502.20 err/s: 0.00 reconn/s: 0.00
[ 496s ] thds: 32 tps: 160.00 qps: 3194.96 (r/w/o: 2237.97/636.99/320.00) lat (ms,95%): 549.52 err/s: 0.00 reconn/s: 0.00
[ 497s ] thds: 32 tps: 136.02 qps: 2676.40 (r/w/o: 1866.28/538.08/272.04) lat (ms,95%): 590.56 err/s: 0.00 reconn/s: 0.00
[ 498s ] thds: 32 tps: 92.00 qps: 1850.01 (r/w/o: 1297.01/369.00/184.00) lat (ms,95%): 707.07 err/s: 0.00 reconn/s: 0.00
[ 499s ] thds: 32 tps: 80.00 qps: 1643.96 (r/w/o: 1168.97/314.99/160.00) lat (ms,95%): 1129.24 err/s: 0.00 reconn/s: 0.00
[ 500s ] thds: 32 tps: 79.00 qps: 1536.06 (r/w/o: 1063.04/315.01/158.01) lat (ms,95%): 1069.86 err/s: 0.00 reconn/s: 0.00
[ 501s ] thds: 32 tps: 45.00 qps: 894.95 (r/w/o: 624.97/179.99/90.00) lat (ms,95%): 977.74 err/s: 0.00 reconn/s: 0.00
[ 502s ] thds: 32 tps: 48.00 qps: 1026.04 (r/w/o: 730.03/200.01/96.00) lat (ms,95%): 1327.91 err/s: 0.00 reconn/s: 0.00
[ 503s ] thds: 32 tps: 79.00 qps: 1518.00 (r/w/o: 1047.00/313.00/158.00) lat (ms,95%): 1013.60 err/s: 0.00 reconn/s: 0.00
[ 504s ] thds: 32 tps: 45.00 qps: 872.99 (r/w/o: 610.99/172.00/90.00) lat (ms,95%): 1149.76 err/s: 0.00 reconn/s: 0.00
[ 505s ] thds: 32 tps: 32.00 qps: 644.97 (r/w/o: 439.98/140.99/64.00) lat (ms,95%): 1170.65 err/s: 0.00 reconn/s: 0.00
[ 506s ] thds: 32 tps: 25.00 qps: 482.03 (r/w/o: 345.02/87.01/50.00) lat (ms,95%): 1938.16 err/s: 0.00 reconn/s: 0.00
[ 507s ] thds: 32 tps: 31.00 qps: 680.00 (r/w/o: 491.00/127.00/62.00) lat (ms,95%): 1938.16 err/s: 0.00 reconn/s: 0.00
[ 508s ] thds: 32 tps: 428.94 qps: 8616.79 (r/w/o: 6025.15/1733.76/857.88) lat (ms,95%): 434.83 err/s: 0.00 reconn/s: 0.00
[ 509s ] thds: 32 tps: 438.98 qps: 8745.52 (r/w/o: 6120.66/1748.90/875.95) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 510s ] thds: 32 tps: 436.05 qps: 8840.06 (r/w/o: 6182.74/1783.21/874.10) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 511s ] thds: 32 tps: 445.01 qps: 8798.18 (r/w/o: 6157.12/1751.03/890.02) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 512s ] thds: 32 tps: 446.88 qps: 8890.62 (r/w/o: 6231.33/1765.53/893.76) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 513s ] thds: 32 tps: 450.13 qps: 9109.67 (r/w/o: 6364.86/1844.54/900.26) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 514s ] thds: 32 tps: 447.95 qps: 8979.92 (r/w/o: 6307.24/1776.79/895.89) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 515s ] thds: 32 tps: 439.97 qps: 8804.50 (r/w/o: 6148.65/1776.90/878.95) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 516s ] thds: 32 tps: 462.09 qps: 9176.86 (r/w/o: 6426.30/1825.37/925.19) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 517s ] thds: 32 tps: 443.87 qps: 8880.34 (r/w/o: 6228.13/1765.47/886.73) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 518s ] thds: 32 tps: 452.05 qps: 9043.97 (r/w/o: 6322.68/1816.19/905.10) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 519s ] thds: 32 tps: 462.04 qps: 9197.77 (r/w/o: 6433.54/1840.15/924.08) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 520s ] thds: 32 tps: 440.03 qps: 8840.59 (r/w/o: 6170.41/1790.12/880.06) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 521s ] thds: 32 tps: 459.94 qps: 9246.73 (r/w/o: 6491.11/1835.75/919.87) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 522s ] thds: 32 tps: 445.04 qps: 8887.87 (r/w/o: 6218.61/1779.17/890.09) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 523s ] thds: 32 tps: 454.01 qps: 9121.17 (r/w/o: 6392.12/1821.03/908.02) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 524s ] thds: 32 tps: 462.96 qps: 9160.20 (r/w/o: 6407.44/1826.84/925.92) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 525s ] thds: 32 tps: 443.03 qps: 8944.63 (r/w/o: 6259.44/1799.13/886.06) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 526s ] thds: 32 tps: 456.89 qps: 9118.80 (r/w/o: 6392.45/1812.56/913.78) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 527s ] thds: 32 tps: 454.03 qps: 9089.51 (r/w/o: 6353.36/1828.10/908.05) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 528s ] thds: 32 tps: 448.12 qps: 9008.38 (r/w/o: 6296.67/1815.48/896.24) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 529s ] thds: 32 tps: 459.00 qps: 9093.93 (r/w/o: 6375.95/1799.99/917.99) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 530s ] thds: 32 tps: 463.94 qps: 9155.72 (r/w/o: 6392.11/1837.74/925.87) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 531s ] thds: 32 tps: 446.99 qps: 9114.86 (r/w/o: 6406.90/1811.97/895.99) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 532s ] thds: 32 tps: 431.04 qps: 8696.90 (r/w/o: 6071.63/1763.18/862.09) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 533s ] thds: 32 tps: 472.03 qps: 9296.53 (r/w/o: 6527.37/1825.10/944.05) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 534s ] thds: 32 tps: 394.00 qps: 7795.04 (r/w/o: 5434.03/1573.01/788.00) lat (ms,95%): 150.29 err/s: 0.00 reconn/s: 0.00
[ 535s ] thds: 32 tps: 228.99 qps: 4652.90 (r/w/o: 3267.93/926.98/457.99) lat (ms,95%): 383.33 err/s: 0.00 reconn/s: 0.00
[ 536s ] thds: 32 tps: 212.01 qps: 4219.17 (r/w/o: 2954.12/841.03/424.02) lat (ms,95%): 363.18 err/s: 0.00 reconn/s: 0.00
[ 537s ] thds: 32 tps: 167.00 qps: 3375.98 (r/w/o: 2381.99/660.00/334.00) lat (ms,95%): 467.30 err/s: 0.00 reconn/s: 0.00
[ 538s ] thds: 32 tps: 112.00 qps: 2198.98 (r/w/o: 1511.98/463.00/224.00) lat (ms,95%): 646.19 err/s: 0.00 reconn/s: 0.00
[ 539s ] thds: 32 tps: 80.00 qps: 1566.00 (r/w/o: 1092.00/314.00/160.00) lat (ms,95%): 861.95 err/s: 0.00 reconn/s: 0.00
[ 540s ] thds: 32 tps: 106.00 qps: 2184.93 (r/w/o: 1549.95/422.99/211.99) lat (ms,95%): 733.00 err/s: 0.00 reconn/s: 0.00
[ 541s ] thds: 32 tps: 65.00 qps: 1274.04 (r/w/o: 891.03/253.01/130.00) lat (ms,95%): 802.05 err/s: 0.00 reconn/s: 0.00
[ 542s ] thds: 32 tps: 82.00 qps: 1662.91 (r/w/o: 1169.94/328.98/163.99) lat (ms,95%): 1032.01 err/s: 0.00 reconn/s: 0.00
[ 543s ] thds: 32 tps: 53.00 qps: 1031.06 (r/w/o: 716.04/209.01/106.01) lat (ms,95%): 960.30 err/s: 0.00 reconn/s: 0.00
[ 544s ] thds: 32 tps: 57.00 qps: 1106.98 (r/w/o: 766.99/226.00/114.00) lat (ms,95%): 1191.92 err/s: 0.00 reconn/s: 0.00
[ 545s ] thds: 32 tps: 29.00 qps: 655.96 (r/w/o: 474.97/122.99/58.00) lat (ms,95%): 1708.63 err/s: 0.00 reconn/s: 0.00
[ 546s ] thds: 32 tps: 49.00 qps: 978.07 (r/w/o: 681.05/199.01/98.01) lat (ms,95%): 1401.61 err/s: 0.00 reconn/s: 0.00
[ 547s ] thds: 32 tps: 31.00 qps: 576.00 (r/w/o: 402.00/112.00/62.00) lat (ms,95%): 1739.68 err/s: 0.00 reconn/s: 0.00
[ 548s ] thds: 32 tps: 37.00 qps: 732.98 (r/w/o: 500.99/158.00/74.00) lat (ms,95%): 1648.20 err/s: 0.00 reconn/s: 0.00
[ 549s ] thds: 32 tps: 442.01 qps: 8873.15 (r/w/o: 6208.10/1781.03/884.01) lat (ms,95%): 363.18 err/s: 0.00 reconn/s: 0.00
[ 550s ] thds: 32 tps: 444.98 qps: 8857.51 (r/w/o: 6200.66/1766.90/889.95) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 551s ] thds: 32 tps: 439.97 qps: 8860.49 (r/w/o: 6195.64/1785.90/878.95) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 552s ] thds: 32 tps: 441.01 qps: 8841.22 (r/w/o: 6194.16/1764.04/883.02) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 553s ] thds: 32 tps: 448.95 qps: 8966.93 (r/w/o: 6290.25/1778.79/897.89) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 554s ] thds: 32 tps: 445.54 qps: 8908.72 (r/w/o: 6224.54/1793.11/891.07) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 555s ] thds: 32 tps: 445.56 qps: 8963.45 (r/w/o: 6286.05/1786.27/891.13) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 556s ] thds: 32 tps: 457.99 qps: 9131.73 (r/w/o: 6379.81/1836.94/914.97) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 557s ] thds: 32 tps: 448.01 qps: 8994.21 (r/w/o: 6299.15/1798.04/897.02) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 558s ] thds: 32 tps: 459.98 qps: 9176.64 (r/w/o: 6426.75/1829.93/919.96) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 559s ] thds: 32 tps: 470.02 qps: 9253.36 (r/w/o: 6464.25/1849.07/940.04) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 560s ] thds: 32 tps: 450.72 qps: 9126.42 (r/w/o: 6400.09/1824.88/901.45) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 561s ] thds: 32 tps: 458.25 qps: 9218.02 (r/w/o: 6447.51/1854.01/916.50) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 562s ] thds: 32 tps: 462.68 qps: 9199.65 (r/w/o: 6448.55/1825.74/925.36) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 563s ] thds: 32 tps: 449.28 qps: 9016.67 (r/w/o: 6299.96/1819.14/897.56) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 564s ] thds: 32 tps: 460.95 qps: 9207.07 (r/w/o: 6454.35/1829.82/922.91) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 565s ] thds: 32 tps: 461.07 qps: 9259.33 (r/w/o: 6479.93/1857.27/922.13) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 566s ] thds: 32 tps: 450.94 qps: 9028.75 (r/w/o: 6311.13/1815.75/901.88) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 567s ] thds: 32 tps: 475.05 qps: 9414.06 (r/w/o: 6599.74/1864.21/950.11) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 568s ] thds: 32 tps: 448.03 qps: 8993.62 (r/w/o: 6291.43/1806.12/896.06) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 569s ] thds: 32 tps: 463.97 qps: 9260.44 (r/w/o: 6473.61/1858.89/927.94) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 570s ] thds: 32 tps: 463.80 qps: 9242.01 (r/w/o: 6458.21/1856.20/927.60) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 571s ] thds: 32 tps: 448.20 qps: 9147.04 (r/w/o: 6415.83/1834.81/896.40) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 572s ] thds: 32 tps: 460.01 qps: 9024.27 (r/w/o: 6325.19/1779.05/920.03) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 573s ] thds: 32 tps: 449.99 qps: 9067.88 (r/w/o: 6340.91/1826.98/899.99) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 574s ] thds: 32 tps: 347.02 qps: 6845.43 (r/w/o: 4810.30/1341.08/694.04) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 575s ] thds: 32 tps: 233.00 qps: 4645.04 (r/w/o: 3244.03/935.01/466.00) lat (ms,95%): 397.39 err/s: 0.00 reconn/s: 0.00
[ 576s ] thds: 32 tps: 196.00 qps: 3955.93 (r/w/o: 2772.95/791.99/390.99) lat (ms,95%): 419.45 err/s: 0.00 reconn/s: 0.00
[ 577s ] thds: 32 tps: 186.00 qps: 3637.05 (r/w/o: 2525.04/739.01/373.01) lat (ms,95%): 411.96 err/s: 0.00 reconn/s: 0.00
[ 578s ] thds: 32 tps: 157.00 qps: 3260.01 (r/w/o: 2303.01/643.00/314.00) lat (ms,95%): 511.33 err/s: 0.00 reconn/s: 0.00
[ 579s ] thds: 32 tps: 125.00 qps: 2578.93 (r/w/o: 1801.95/526.99/249.99) lat (ms,95%): 549.52 err/s: 0.00 reconn/s: 0.00
[ 580s ] thds: 32 tps: 94.00 qps: 1743.02 (r/w/o: 1217.02/338.00/188.00) lat (ms,95%): 831.46 err/s: 0.00 reconn/s: 0.00
[ 581s ] thds: 32 tps: 68.00 qps: 1370.90 (r/w/o: 965.93/268.98/135.99) lat (ms,95%): 1170.65 err/s: 0.00 reconn/s: 0.00
[ 582s ] thds: 32 tps: 86.01 qps: 1783.15 (r/w/o: 1236.11/375.03/172.01) lat (ms,95%): 759.88 err/s: 0.00 reconn/s: 0.00
[ 583s ] thds: 32 tps: 70.99 qps: 1347.77 (r/w/o: 959.83/245.96/141.98) lat (ms,95%): 995.51 err/s: 0.00 reconn/s: 0.00
[ 584s ] thds: 32 tps: 35.01 qps: 687.12 (r/w/o: 473.08/144.03/70.01) lat (ms,95%): 1327.91 err/s: 0.00 reconn/s: 0.00
[ 585s ] thds: 32 tps: 39.00 qps: 893.01 (r/w/o: 628.00/187.00/78.00) lat (ms,95%): 1376.60 err/s: 0.00 reconn/s: 0.00
[ 586s ] thds: 32 tps: 34.00 qps: 624.00 (r/w/o: 442.00/114.00/68.00) lat (ms,95%): 2082.91 err/s: 0.00 reconn/s: 0.00
[ 587s ] thds: 32 tps: 56.00 qps: 1084.00 (r/w/o: 752.00/220.00/112.00) lat (ms,95%): 1533.66 err/s: 0.00 reconn/s: 0.00
[ 588s ] thds: 32 tps: 28.00 qps: 522.00 (r/w/o: 350.00/116.00/56.00) lat (ms,95%): 1149.76 err/s: 0.00 reconn/s: 0.00
[ 589s ] thds: 32 tps: 23.00 qps: 506.00 (r/w/o: 380.00/80.00/46.00) lat (ms,95%): 1739.68 err/s: 0.00 reconn/s: 0.00
[ 590s ] thds: 32 tps: 292.94 qps: 5919.69 (r/w/o: 4115.09/1218.73/585.87) lat (ms,95%): 1050.76 err/s: 0.00 reconn/s: 0.00
[ 591s ] thds: 32 tps: 439.02 qps: 8742.39 (r/w/o: 6138.27/1726.08/878.04) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 592s ] thds: 32 tps: 445.03 qps: 8846.51 (r/w/o: 6178.35/1778.10/890.05) lat (ms,95%): 114.72 err/s: 0.00 reconn/s: 0.00
[ 593s ] thds: 32 tps: 435.71 qps: 8847.08 (r/w/o: 6197.85/1777.81/871.42) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 594s ] thds: 32 tps: 443.34 qps: 8681.58 (r/w/o: 6062.59/1733.31/885.67) lat (ms,95%): 118.92 err/s: 0.00 reconn/s: 0.00
[ 595s ] thds: 32 tps: 444.00 qps: 8976.99 (r/w/o: 6292.99/1795.00/889.00) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
[ 596s ] thds: 32 tps: 460.00 qps: 9136.96 (r/w/o: 6399.97/1816.99/920.00) lat (ms,95%): 116.80 err/s: 0.00 reconn/s: 0.00
[ 597s ] thds: 32 tps: 436.02 qps: 8766.38 (r/w/o: 6128.26/1767.08/871.04) lat (ms,95%): 110.66 err/s: 0.00 reconn/s: 0.00
[ 598s ] thds: 32 tps: 460.94 qps: 9206.79 (r/w/o: 6451.15/1832.76/922.88) lat (ms,95%): 108.68 err/s: 0.00 reconn/s: 0.00
[ 599s ] thds: 32 tps: 437.99 qps: 8836.73 (r/w/o: 6200.81/1759.95/875.97) lat (ms,95%): 112.67 err/s: 0.00 reconn/s: 0.00
[ 600s ] thds: 32 tps: 450.99 qps: 9061.70 (r/w/o: 6318.79/1845.94/896.97) lat (ms,95%): 106.75 err/s: 0.00 reconn/s: 0.00
SQL statistics:
    queries performed:
        read:                            2592128
        write:                           740608
        other:                           370304
        total:                           3703040
    transactions:                        185152 (308.53 per sec.)
    queries:                             3703040 (6170.56 per sec.)
    ignored errors:                      0      (0.00 per sec.)
    reconnects:                          0      (0.00 per sec.)

Throughput:
    events/s (eps):                      308.5280
    time elapsed:                        600.1141s
    total number of events:              185152

Latency (ms):
         min:                                    8.88
         avg:                                  103.70
         max:                                 3847.36
         95th percentile:                      253.35
         sum:                             19200637.19

Threads fairness:
    events (avg/stddev):           5786.0000/53.95
    execution time (avg/stddev):   600.0199/0.03

清理测试数据

[mysql@localhost lua]$ ./sysbench oltp_read_write.lua --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-db=test --mysql-user=root --mysql-password=abcd1234 --table_size=250000 --tables=25 --threads=32 --events=0 --report-interval=1 --time=600 --percentile=95 --report-interval=1 cleanup
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)

Dropping table 'sbtest1'...
Dropping table 'sbtest2'...
Dropping table 'sbtest3'...
Dropping table 'sbtest4'...
Dropping table 'sbtest5'...
Dropping table 'sbtest6'...
Dropping table 'sbtest7'...
Dropping table 'sbtest8'...
Dropping table 'sbtest9'...
Dropping table 'sbtest10'...
Dropping table 'sbtest11'...
Dropping table 'sbtest12'...
Dropping table 'sbtest13'...
Dropping table 'sbtest14'...
Dropping table 'sbtest15'...
Dropping table 'sbtest16'...
Dropping table 'sbtest17'...
Dropping table 'sbtest18'...
Dropping table 'sbtest19'...
Dropping table 'sbtest20'...
Dropping table 'sbtest21'...
Dropping table 'sbtest22'...
Dropping table 'sbtest23'...
Dropping table 'sbtest24'...
Dropping table 'sbtest25'...

sysbench 测试MySQL磁盘IOPS

sysbench 测试MySQL磁盘IOPS
1. 安装

https://github.com/akopytov/sysbench.git # 通过git clone得到源码

2. 上传到MySQL服务器并解压

[root@localhost soft]# unzip sysbench-master.zip
[root@localhost soft]# mv sysbench-master sysbench

[root@localhost sysbench]# ./autogen.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
libtoolize: copying file `config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
autoreconf: running: /usr/bin/autoconf
autoreconf: running: /usr/bin/autoheader
autoreconf: running: automake --add-missing --copy --no-force
configure.ac:59: installing 'config/ar-lib'
configure.ac:45: installing 'config/compile'
configure.ac:27: installing 'config/config.guess'
configure.ac:27: installing 'config/config.sub'
configure.ac:32: installing 'config/install-sh'
configure.ac:32: installing 'config/missing'
src/Makefile.am: installing 'config/depcomp'
parallel-tests: installing 'config/test-driver'
autoreconf: Leaving directory `.'

2.1 关联mysql的头文件和库

[root@localhost sysbench]# ./configure  --with-mysql-includes=/mysqlsoft/mysql/include/  --with-mysql-libs=/mysqlsoft/mysql/lib/
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking how to run the C preprocessor... gcc -E
checking whether gcc -std=gnu99 and cc understand -c and -o together... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for C compiler vendor... gnu
checking for gcc architecture flag...
checking for x86 cpuid 0 output... d:756e6547:6c65746e:49656e69
checking for x86 cpuid 1 output... 306e7:2040800:9e982203:1fabfbff
checking whether C compiler accepts -march=ivybridge... no
checking whether C compiler accepts -march=core-avx-i... yes
checking for gcc architecture flag... -march=core-avx-i
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc -std=gnu99... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc -std=gnu99 object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC
checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes
checking if gcc -std=gnu99 static flag -static works... no
checking if gcc -std=gnu99 supports -c -o file.o... yes
checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu99 linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... yes
checking for C compiler vendor... (cached) gnu
checking whether to compile with MySQL support... yes
checking whether to compile with PostgreSQL support... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether to build with system or bundled LuaJIT... bundled
checking whether to build with system or bundled Concurrency Kit... bundled
checking whether SHM_HUGETLB is declared... yes
checking whether O_SYNC is declared... yes
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for sqrt in -lm... yes
checking MySQL includes... (cached) /mysqlsoft/mysql/include/
checking MySQL libraries... (cached) /mysqlsoft/mysql/lib/
checking for library containing mysql_real_connect... -lmysqlclient
checking if mysql.h defines MYSQL_OPT_SSL_MODE... yes
checking libaio.h usability... no
checking libaio.h presence... no
checking for libaio.h... no
checking for ANSI C header files... (cached) yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/aio.h usability... no
checking sys/aio.h presence... no
checking for sys/aio.h... no
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking thread.h usability... no
checking thread.h presence... no
checking for thread.h... no
checking for unistd.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking for off_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for thread local storage (TLS) class... __thread
checking for __attribute__((format))... yes
checking for __attribute__((unused))... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking size of size_t... 8
checking size of bool... 1
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... yes
checking for getpagesize... yes
checking for working mmap... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... yes
checking for library containing clock_gettime... none required
checking for alarm... yes
checking for clock_gettime... yes
checking for directio... no
checking for fdatasync... yes
checking for gettimeofday... yes
checking for isatty... yes
checking for memalign... yes
checking for memset... yes
checking for posix_memalign... yes
checking for pthread_cancel... yes
checking for pthread_yield... yes
checking for setvbuf... yes
checking for sqrt... yes
checking for strdup... yes
checking for thr_setconcurrency... no
checking for valloc... yes
checking for pthread_once... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating third_party/luajit/Makefile
config.status: creating third_party/concurrency_kit/Makefile
config.status: creating src/Makefile
config.status: creating src/drivers/Makefile
config.status: creating src/drivers/mysql/Makefile
config.status: creating src/drivers/pgsql/Makefile
config.status: creating src/tests/Makefile
config.status: creating src/tests/cpu/Makefile
config.status: creating src/tests/fileio/Makefile
config.status: creating src/tests/memory/Makefile
config.status: creating src/tests/threads/Makefile
config.status: creating src/tests/mutex/Makefile
config.status: creating src/lua/Makefile
config.status: creating src/lua/internal/Makefile
config.status: creating tests/Makefile
config.status: creating tests/include/config.sh
config.status: creating snap/snapcraft.yaml
config.status: creating config/config.h
config.status: executing depfiles commands
config.status: executing libtool commands
===============================================================================
sysbench version   : 1.1.0
CC                 : gcc -std=gnu99
CFLAGS             : -O3 -funroll-loops -ggdb3  -march=core-avx-i -Wall -Wextra -Wpointer-arith -Wbad-function-cast -Wstrict-prototypes -Wnested-externs -Wno-format-zero-length -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wcast-align -Wvla   -pthread
CPPFLAGS           : -D_GNU_SOURCE   -I$(top_srcdir)/src -I$(abs_top_builddir)/third_party/luajit/inc -I$(abs_top_builddir)/third_party/concurrency_kit/include
LDFLAGS            : -L/usr/local/lib
LIBS               : -lm

prefix             : /usr/local
bindir             : ${prefix}/bin
libexecdir         : ${prefix}/libexec
mandir             : ${prefix}/share/man
datadir            : ${prefix}/share

MySQL support      : yes
PostgreSQL support : no

LuaJIT             : bundled
LUAJIT_CFLAGS      : -I$(abs_top_builddir)/third_party/luajit/inc
LUAJIT_LIBS        : $(abs_top_builddir)/third_party/luajit/lib/libluajit-5.1.a -ldl
LUAJIT_LDFLAGS     : -rdynamic

Concurrency Kit    : bundled
CK_CFLAGS          : -I$(abs_top_builddir)/third_party/concurrency_kit/include
CK_LIBS            : $(abs_top_builddir)/third_party/concurrency_kit/lib/libck.a
configure flags    :
===============================================================================

2.2 编译源码
[root@localhost sysbench]# make -j 4

2.3 安装(默认安装到 /usr/local/bin , 如果有自定义目录,configure增加参数 –prefix=自定义目录)
[root@localhost sysbench]# make install

添加LD_LIBRARY_PATH

[root@localhost ~]# echo "export LD_LIBRARY_PATH=/mysqlsoft/mysql/lib/:$LD_LIBRARY_PATH" >> ~/.bashrc

[root@localhost ~]# source ~/.bashrc
[root@localhost ~]# sysbench –version
sysbench 1.1.0

3. 测试
生成测试文件

[root@localhost ~]# sysbench  fileio   help
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)

fileio options:
  --file-num=N                  number of files to create [128]
  --file-block-size=N           block size to use in all IO operations [16384]
  --file-total-size=SIZE        total size of files to create [2G]
  --file-test-mode=STRING       test mode {seqwr, seqrewr, seqrd, rndrd, rndwr, rndrw}
  --file-io-mode=STRING         file operations mode {sync,async,mmap} [sync]
  --file-extra-flags=[LIST,...] list of additional flags to use to open files {sync,dsync,direct} []
  --file-fsync-freq=N           do fsync() after this number of requests (0 - don't use fsync()) [100]
  --file-fsync-all[=on|off]     do fsync() after each write operation [off]
  --file-fsync-end[=on|off]     do fsync() at the end of test [on]
  --file-fsync-mode=STRING      which method to use for synchronization {fsync, fdatasync} [fsync]
  --file-merged-requests=N      merge at most this number of IO requests if possible (0 - don't merge) [0]
  --file-rw-ratio=N             reads/writes ratio for combined test [1.5]

其他说明

  # --file-num=N                  创建文件数
  # --file-block-size=N           block size大小
  # --file-total-size=SIZE        文件数的大小总和
  # --file-test-mode=STRING       测试模式 {seqwr, seqrewr, seqrd, rndrd, rndwr, rndrw} (顺序写,顺序读写,顺序读,随机读,随机写,随机读写)
  # --file-io-mode=STRING         文件操作方式 {sync,async,mmap}
  # --file-extra-flags=STRING     打开文件的额外标志 {sync,dsync,direct} []
  # --file-fsync-freq=N           多少请求后执行fsync。默认是0,不执行
  # --file-fsync-all=[on|off]     是否每次操作后都执行fsync
  # --file-fsync-end=[on|off]     测完成后执行fsync,默认是on
  # --file-fsync-mode=STRING      同步的方法 {fsync, fdatasync}默认是 [fsync]
  # --file-merged-requests=N      最多多少IO请求被合并,默认为0,不合并
  # --file-rw-ratio=N             读写比例默认是 [1.5],即 3:2
[root@localhost ~]# sysbench  fileio --file-num=4 --file-block-size=8K --file-total-size=1G --file-test-mode=rndrd --file-extra-flags=direct prepare
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)

4 files, 262144Kb each, 1024Mb total
Creating files for the test...
Extra file open flags: directio
Creating file test_file.0
Creating file test_file.1
Creating file test_file.2
Creating file test_file.3
1073741824 bytes written in 29.00 seconds (35.30 MiB/sec).

开始测试(–time=30简单测试,测试30秒 –report-interval=3 # 每3秒产生报告)

[root@localhost ~]# sysbench  fileio  --file-num=4  --file-block-size=8K  --file-total-size=1G  --file-test-mode=rndrd  --file-extra-flags=direct  --threads=4 --time=30 --report-interval=3  run
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta3)

Running the test with following options:
Number of threads: 4
Report intermediate results every 3 second(s)
Initializing random number generator from current time


Extra file open flags: directio
4 files, 256MiB each
1GiB total file size
Block size 8KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random read test
Initializing worker threads...

Threads started!

[ 3s ] reads: 4.48 MiB/s writes: 0.00 MiB/s fsyncs: 0.00/s latency (ms,95%): 15.268
[ 6s ] reads: 4.39 MiB/s writes: 0.00 MiB/s fsyncs: 0.00/s latency (ms,95%): 15.828
[ 9s ] reads: 4.61 MiB/s writes: 0.00 MiB/s fsyncs: 0.00/s latency (ms,95%): 14.995
[ 12s ] reads: 4.73 MiB/s writes: 0.00 MiB/s fsyncs: 0.00/s latency (ms,95%): 13.953
[ 15s ] reads: 4.77 MiB/s writes: 0.00 MiB/s fsyncs: 0.00/s latency (ms,95%): 13.953
[ 18s ] reads: 4.81 MiB/s writes: 0.00 MiB/s fsyncs: 0.00/s latency (ms,95%): 14.207
[ 21s ] reads: 4.82 MiB/s writes: 0.00 MiB/s fsyncs: 0.00/s latency (ms,95%): 14.728
[ 24s ] reads: 4.84 MiB/s writes: 0.00 MiB/s fsyncs: 0.00/s latency (ms,95%): 14.995
[ 27s ] reads: 5.09 MiB/s writes: 0.00 MiB/s fsyncs: 0.00/s latency (ms,95%): 13.953
[ 30s ] reads: 5.16 MiB/s writes: 0.00 MiB/s fsyncs: 0.00/s latency (ms,95%): 14.207

Throughput:
         read:  IOPS=610.59 4.77 MiB/s (5.00 MB/s) #4.77*1024/8;
         write: IOPS=0.00 0.00 MiB/s (0.00 MB/s)
         fsync: IOPS=0.00

Latency (ms):
         min:                                  0.18
         avg:                                  6.54
         max:                                 45.86
         95th percentile:                     14.46
         sum:                             119902.59

Oracle 11G RAC复制备库RMAN-03002 RMAN-05501 RMAN-03015 RMAN-03009 RMAN-10038故障

Oracle 11G RAC复制备库RMAN-03002 RMAN-05501 RMAN-03015 RMAN-03009 RMAN-10038故障

网络服务名配置如下(csdbs为主库,csdb为备库):

csdb =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 11.11.10.101)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = csdb)
    )
  )


csdbs =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 11.11.10.108)(PORT = 1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 11.11.10.109)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = csdb)(UR=A)
    )
  )

执行复制命令:

[oracle@dbst1 ~]$ rman target sys/abcd1234@csdbs auxiliary sys/abcd1234@csdb

Recovery Manager: Release 11.2.0.4.0 - Production on Sun Sep 18 22:06:27 2022

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: csdb (DBID=4138492706)
connected to auxiliary database: csdb (not mounted)

RMAN> duplicate target database for standby from active database nofilenamecheck;

Starting Duplicate Db at 18-SEP-22
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=1700 device type=DISK

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '/u01/app/oracle/product/11.2.0.4/db/dbs/orapwcsdb1' auxiliary format
 '/u01/app/oracle/product/11.2.0.4/db/dbs/orapwcsdb'   ;
}
executing Memory Script

Starting backup at 18-SEP-22
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=4121 instance=csdb1 device type=DISK
Finished backup at 18-SEP-22

contents of Memory Script:
{
   backup as copy current controlfile for standby auxiliary format  '/u01/app/oracle/oradata/csdb/control01.ctl';
   restore clone controlfile to  '/u01/app/oracle/oradata/csdb/control02.ctl' from
 '/u01/app/oracle/oradata/csdb/control01.ctl';
}
executing Memory Script

Starting backup at 18-SEP-22
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=/u01/app/oracle/product/11.2.0.4/db/dbs/snapcf_csdb1.f tag=TAG20220918T220701 RECID=182 STAMP=1115762822
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 18-SEP-22

Starting restore at 18-SEP-22
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 18-SEP-22

contents of Memory Script:
{
   sql clone 'alter database mount standby database';
}
executing Memory Script

sql statement: alter database mount standby database

contents of Memory Script:
{
   set newname for tempfile  1 to
 "/u01/app/oracle/oradata/csdb/temp01.dbf";
   switch clone tempfile all;
   set newname for datafile  1 to
 "/u01/app/oracle/oradata/csdb/system01.dbf";
   set newname for datafile  2 to
 "/u01/app/oracle/oradata/csdb/sysaux01.dbf";
   set newname for datafile  3 to
 "/u01/app/oracle/oradata/csdb/undotbs01.dbf";
   set newname for datafile  4 to
 "/u01/app/oracle/oradata/csdb/users01.dbf";
   set newname for datafile  5 to
 "/u01/app/oracle/oradata/csdb/example01.dbf";
   set newname for datafile  8 to
 "/u01/app/oracle/oradata/csdb/swpt01";
   set newname for datafile  11 to
 "/u01/app/oracle/oradata/csdb/users02.dbf";
   set newname for datafile  12 to
 "/u01/app/oracle/oradata/csdb/users03.dbf";
   set newname for datafile  13 to
 "/u01/app/oracle/oradata/csdb/users04.dbf";
   set newname for datafile  14 to
 "/u01/app/oracle/oradata/csdb/users05.dbf";
   set newname for datafile  15 to
 "/u01/app/oracle/oradata/csdb/users06.dbf";
   set newname for datafile  16 to
 "/u01/app/oracle/oradata/csdb/users07.dbf";
   set newname for datafile  17 to
 "/u01/app/oracle/oradata/csdb/users08.dbf";
   set newname for datafile  18 to
 "/u01/app/oracle/oradata/csdb/users09.dbf";
   set newname for datafile  19 to
 "/u01/app/oracle/oradata/csdb/users10.dbf";
   set newname for datafile  20 to
 "/u01/app/oracle/oradata/csdb/users11.dbf";
   set newname for datafile  21 to
 "/u01/app/oracle/oradata/csdb/users12.dbf";
   set newname for datafile  22 to
 "/u01/app/oracle/oradata/csdb/users13.dbf";
   set newname for datafile  23 to
 "/u01/app/oracle/oradata/csdb/users14.dbf";
   set newname for datafile  25 to
 "/u01/app/oracle/oradata/csdb/users16.dbf";
   set newname for datafile  26 to
 "/u01/app/oracle/oradata/csdb/users17.dbf";
   set newname for datafile  27 to
 "/u01/app/oracle/oradata/csdb/users15.dbf";
   set newname for datafile  28 to
 "/u01/app/oracle/oradata/csdb/users18.dbf";
   set newname for datafile  29 to
 "/u01/app/oracle/oradata/csdb/users19.dbf";
   set newname for datafile  30 to
 "/u01/app/oracle/oradata/csdb/users20.dbf";
   set newname for datafile  31 to
 "/u01/app/oracle/oradata/csdb/users21.dbf";
   set newname for datafile  32 to
 "/u01/app/oracle/oradata/csdb/users22.dbf";
   set newname for datafile  33 to
 "/u01/app/oracle/oradata/csdb/users23.dbf";
   set newname for datafile  34 to
 "/u01/app/oracle/oradata/csdb/users24.dbf";
   set newname for datafile  35 to
 "/u01/app/oracle/oradata/csdb/users25.dbf";
   set newname for datafile  36 to
 "/u01/app/oracle/oradata/csdb/users26.dbf";
   set newname for datafile  37 to
 "/u01/app/oracle/oradata/csdb/users27.dbf";
   set newname for datafile  38 to
 "/u01/app/oracle/oradata/csdb/users28.dbf";
   set newname for datafile  39 to
 "/u01/app/oracle/oradata/csdb/users29.dbf";
   set newname for datafile  40 to
 "/u01/app/oracle/oradata/csdb/users30.dbf";
   set newname for datafile  41 to
 "/u01/app/oracle/oradata/csdb/undotbs02.dbf";
   set newname for datafile  42 to
 "/u01/app/oracle/oradata/csdb/undotbs03.dbf";
   set newname for datafile  49 to
 "/u01/app/oracle/oradata/csdb/datafile/undotbs2.262.1109177757";
   set newname for datafile  50 to
 "/u01/app/oracle/oradata/csdb/datafile/undotbs2.263.1109178111";
   set newname for datafile  51 to
 "/u01/app/oracle/oradata/csdb/datafile/undotbs2.264.1109178457";
   set newname for datafile  52 to
 "/u01/app/oracle/oradata/csdb/datafile/users.284.1109186395";
   set newname for datafile  53 to
 "/u01/app/oracle/oradata/csdb/datafile/users.285.1109186791";
   set newname for datafile  54 to
 "/u01/app/oracle/oradata/csdb/datafile/users.286.1109187157";
   set newname for datafile  55 to
 "/u01/app/oracle/oradata/csdb/datafile/users.287.1109187493";
   set newname for datafile  56 to
 "/u01/app/oracle/oradata/csdb/users31.dbf";
   set newname for datafile  57 to
 "/u01/app/oracle/oradata/csdb/users32.dbf";
   backup as copy reuse
   datafile  1 auxiliary format
 "/u01/app/oracle/oradata/csdb/system01.dbf"   datafile
 2 auxiliary format
 "/u01/app/oracle/oradata/csdb/sysaux01.dbf"   datafile
 3 auxiliary format
 "/u01/app/oracle/oradata/csdb/undotbs01.dbf"   datafile
 4 auxiliary format
 "/u01/app/oracle/oradata/csdb/users01.dbf"   datafile
 5 auxiliary format
 "/u01/app/oracle/oradata/csdb/example01.dbf"   datafile
 8 auxiliary format
 "/u01/app/oracle/oradata/csdb/swpt01"   datafile
 11 auxiliary format
 "/u01/app/oracle/oradata/csdb/users02.dbf"   datafile
 12 auxiliary format
 "/u01/app/oracle/oradata/csdb/users03.dbf"   datafile
 13 auxiliary format
 "/u01/app/oracle/oradata/csdb/users04.dbf"   datafile
 14 auxiliary format
 "/u01/app/oracle/oradata/csdb/users05.dbf"   datafile
 15 auxiliary format
 "/u01/app/oracle/oradata/csdb/users06.dbf"   datafile
 16 auxiliary format
 "/u01/app/oracle/oradata/csdb/users07.dbf"   datafile
 17 auxiliary format
 "/u01/app/oracle/oradata/csdb/users08.dbf"   datafile
 18 auxiliary format
 "/u01/app/oracle/oradata/csdb/users09.dbf"   datafile
 19 auxiliary format
 "/u01/app/oracle/oradata/csdb/users10.dbf"   datafile
 20 auxiliary format
 "/u01/app/oracle/oradata/csdb/users11.dbf"   datafile
 21 auxiliary format
 "/u01/app/oracle/oradata/csdb/users12.dbf"   datafile
 22 auxiliary format
 "/u01/app/oracle/oradata/csdb/users13.dbf"   datafile
 23 auxiliary format
 "/u01/app/oracle/oradata/csdb/users14.dbf"   datafile
 25 auxiliary format
 "/u01/app/oracle/oradata/csdb/users16.dbf"   datafile
 26 auxiliary format
 "/u01/app/oracle/oradata/csdb/users17.dbf"   datafile
 27 auxiliary format
 "/u01/app/oracle/oradata/csdb/users15.dbf"   datafile
 28 auxiliary format
 "/u01/app/oracle/oradata/csdb/users18.dbf"   datafile
 29 auxiliary format
 "/u01/app/oracle/oradata/csdb/users19.dbf"   datafile
 30 auxiliary format
 "/u01/app/oracle/oradata/csdb/users20.dbf"   datafile
 31 auxiliary format
 "/u01/app/oracle/oradata/csdb/users21.dbf"   datafile
 32 auxiliary format
 "/u01/app/oracle/oradata/csdb/users22.dbf"   datafile
 33 auxiliary format
 "/u01/app/oracle/oradata/csdb/users23.dbf"   datafile
 34 auxiliary format
 "/u01/app/oracle/oradata/csdb/users24.dbf"   datafile
 35 auxiliary format
 "/u01/app/oracle/oradata/csdb/users25.dbf"   datafile
 36 auxiliary format
 "/u01/app/oracle/oradata/csdb/users26.dbf"   datafile
 37 auxiliary format
 "/u01/app/oracle/oradata/csdb/users27.dbf"   datafile
 38 auxiliary format
 "/u01/app/oracle/oradata/csdb/users28.dbf"   datafile
 39 auxiliary format
 "/u01/app/oracle/oradata/csdb/users29.dbf"   datafile
 40 auxiliary format
 "/u01/app/oracle/oradata/csdb/users30.dbf"   datafile
 41 auxiliary format
 "/u01/app/oracle/oradata/csdb/undotbs02.dbf"   datafile
 42 auxiliary format
 "/u01/app/oracle/oradata/csdb/undotbs03.dbf"   datafile
 49 auxiliary format
 "/u01/app/oracle/oradata/csdb/datafile/undotbs2.262.1109177757"   datafile
 50 auxiliary format
 "/u01/app/oracle/oradata/csdb/datafile/undotbs2.263.1109178111"   datafile
 51 auxiliary format
 "/u01/app/oracle/oradata/csdb/datafile/undotbs2.264.1109178457"   datafile
 52 auxiliary format
 "/u01/app/oracle/oradata/csdb/datafile/users.284.1109186395"   datafile
 53 auxiliary format
 "/u01/app/oracle/oradata/csdb/datafile/users.285.1109186791"   datafile
 54 auxiliary format
 "/u01/app/oracle/oradata/csdb/datafile/users.286.1109187157"   datafile
 55 auxiliary format
 "/u01/app/oracle/oradata/csdb/datafile/users.287.1109187493"   datafile
 56 auxiliary format
 "/u01/app/oracle/oradata/csdb/users31.dbf"   datafile
 57 auxiliary format
 "/u01/app/oracle/oradata/csdb/users32.dbf"   ;
   sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /u01/app/oracle/oradata/csdb/temp01.dbf in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting backup at 18-SEP-22
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+JHK/csdbs/system01.dbf
output file name=/u01/app/oracle/oradata/csdb/system01.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=+JHK/csdbs/sysaux01.dbf
output file name=/u01/app/oracle/oradata/csdb/sysaux01.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=+JHK/csdbs/undotbs01.dbf
output file name=/u01/app/oracle/oradata/csdb/undotbs01.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:56
channel ORA_DISK_1: starting datafile copy
input datafile file number=00049 name=+JHK/csdbs/datafile/undotbs2.262.1109177757
output file name=/u01/app/oracle/oradata/csdb/datafile/undotbs2.262.1109177757 tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00050 name=+JHK/csdbs/datafile/undotbs2.263.1109178111
output file name=/u01/app/oracle/oradata/csdb/datafile/undotbs2.263.1109178111 tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:05:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00051 name=+JHK/csdbs/datafile/undotbs2.264.1109178457
output file name=/u01/app/oracle/oradata/csdb/datafile/undotbs2.264.1109178457 tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00025 name=+JHK/csdbs/users16.dbf
output file name=/u01/app/oracle/oradata/csdb/users16.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00026 name=+JHK/csdbs/users17.dbf
output file name=/u01/app/oracle/oradata/csdb/users17.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00027 name=+JHK/csdbs/users15.dbf
output file name=/u01/app/oracle/oradata/csdb/users15.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:05:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00028 name=+JHK/csdbs/users18.dbf
output file name=/u01/app/oracle/oradata/csdb/users18.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:46
channel ORA_DISK_1: starting datafile copy
input datafile file number=00029 name=+JHK/csdbs/users19.dbf
output file name=/u01/app/oracle/oradata/csdb/users19.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00030 name=+JHK/csdbs/users20.dbf
output file name=/u01/app/oracle/oradata/csdb/users20.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00031 name=+JHK/csdbs/users21.dbf
output file name=/u01/app/oracle/oradata/csdb/users21.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00032 name=+JHK/csdbs/users22.dbf
output file name=/u01/app/oracle/oradata/csdb/users22.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00033 name=+JHK/csdbs/users23.dbf
output file name=/u01/app/oracle/oradata/csdb/users23.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00034 name=+JHK/csdbs/users24.dbf
output file name=/u01/app/oracle/oradata/csdb/users24.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00035 name=+JHK/csdbs/users25.dbf
output file name=/u01/app/oracle/oradata/csdb/users25.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:46
channel ORA_DISK_1: starting datafile copy
input datafile file number=00036 name=+JHK/csdbs/users26.dbf
output file name=/u01/app/oracle/oradata/csdb/users26.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00037 name=+JHK/csdbs/users27.dbf
output file name=/u01/app/oracle/oradata/csdb/users27.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00038 name=+JHK/csdbs/users28.dbf
output file name=/u01/app/oracle/oradata/csdb/users28.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00039 name=+JHK/csdbs/users29.dbf
output file name=/u01/app/oracle/oradata/csdb/users29.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00040 name=+JHK/csdbs/users30.dbf
output file name=/u01/app/oracle/oradata/csdb/users30.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00041 name=+JHK/csdbs/undotbs02.dbf
output file name=/u01/app/oracle/oradata/csdb/undotbs02.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00042 name=+JHK/csdbs/undotbs03.dbf
output file name=/u01/app/oracle/oradata/csdb/undotbs03.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00052 name=+JHK/csdbs/datafile/users.284.1109186395
output file name=/u01/app/oracle/oradata/csdb/datafile/users.284.1109186395 tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00053 name=+JHK/csdbs/datafile/users.285.1109186791
output file name=/u01/app/oracle/oradata/csdb/datafile/users.285.1109186791 tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00054 name=+JHK/csdbs/datafile/users.286.1109187157
output file name=/u01/app/oracle/oradata/csdb/datafile/users.286.1109187157 tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00055 name=+JHK/csdbs/datafile/users.287.1109187493
output file name=/u01/app/oracle/oradata/csdb/datafile/users.287.1109187493 tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00056 name=+JHK/csdbs/users31.dbf
output file name=/u01/app/oracle/oradata/csdb/users31.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00057 name=+JHK/csdbs/users32.dbf
output file name=/u01/app/oracle/oradata/csdb/users32.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=+JHK/csdbs/users01.dbf
output file name=/u01/app/oracle/oradata/csdb/users01.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:03:05
channel ORA_DISK_1: starting datafile copy
input datafile file number=00011 name=+JHK/csdbs/users02.dbf
output file name=/u01/app/oracle/oradata/csdb/users02.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:03:05
channel ORA_DISK_1: starting datafile copy
input datafile file number=00012 name=+JHK/csdbs/users03.dbf
output file name=/u01/app/oracle/oradata/csdb/users03.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:03:05
channel ORA_DISK_1: starting datafile copy
input datafile file number=00013 name=+JHK/csdbs/users04.dbf
output file name=/u01/app/oracle/oradata/csdb/users04.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:03:05
channel ORA_DISK_1: starting datafile copy
input datafile file number=00014 name=+JHK/csdbs/users05.dbf
output file name=/u01/app/oracle/oradata/csdb/users05.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:03:05
channel ORA_DISK_1: starting datafile copy
input datafile file number=00023 name=+JHK/csdbs/users14.dbf
output file name=/u01/app/oracle/oradata/csdb/users14.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00019 name=+JHK/csdbs/users10.dbf
output file name=/u01/app/oracle/oradata/csdb/users10.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00020 name=+JHK/csdbs/users11.dbf
output file name=/u01/app/oracle/oradata/csdb/users11.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00021 name=+JHK/csdbs/users12.dbf
output file name=/u01/app/oracle/oradata/csdb/users12.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00022 name=+JHK/csdbs/users13.dbf
output file name=/u01/app/oracle/oradata/csdb/users13.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00015 name=+JHK/csdbs/users06.dbf
output file name=/u01/app/oracle/oradata/csdb/users06.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00016 name=+JHK/csdbs/users07.dbf
output file name=/u01/app/oracle/oradata/csdb/users07.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00018 name=+JHK/csdbs/users09.dbf
output file name=/u01/app/oracle/oradata/csdb/users09.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00017 name=+JHK/csdbs/users08.dbf
output file name=/u01/app/oracle/oradata/csdb/users08.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:05
channel ORA_DISK_1: starting datafile copy
input datafile file number=00008 name=+JHK/csdbs/swpt01
output file name=/u01/app/oracle/oradata/csdb/swpt01 tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=+JHK/csdbs/example01.dbf
output file name=/u01/app/oracle/oradata/csdb/example01.dbf tag=TAG20220918T220713
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 19-SEP-22

sql statement: alter system archive log current
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/19/2022 01:26:50
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on ORA_AUX_DISK_1 channel at 09/19/2022 01:26:50
RMAN-10038: database session for channel ORA_AUX_DISK_1 terminated unexpectedly

出现了通道异常终止的错误,根本原因是在执行rman命令时连接主库配置的tns服务名不是指向单实例

修改网络服务名:

csdb =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 11.11.10.101)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = csdb)
    )
  )


csdbs =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 11.11.10.108)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = csdb)(UR=A)
    )
  )

再次执行复制命令

[oracle@csdb admin]$ rman target sys/abcd1234@csdbs1 auxiliary sys/abcd1234@csdb

Recovery Manager: Release 11.2.0.4.0 - Production on Mon Sep 19 12:45:00 2022

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

connected to target database: csdb (DBID=4138492706)
connected to auxiliary database: csdb (not mounted)

RMAN> duplicate target database for standby from active database;

Starting Duplicate Db at 19-SEP-22
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=1982 device type=DISK

contents of Memory Script:
{
   backup as copy reuse
   targetfile  '/u01/app/oracle/product/11.2.0.4/db/dbs/orapwcsdb1' auxiliary format
 '/u01/app/oracle/product/11.2.0.4/db/dbs/orapwcsdb'   ;
}
executing Memory Script

Starting backup at 19-SEP-22
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=3126 instance=csdb1 device type=DISK
Finished backup at 19-SEP-22

contents of Memory Script:
{
   backup as copy current controlfile for standby auxiliary format  '/u01/app/oracle/oradata/csdb/control01.ctl';
   restore clone controlfile to  '/u01/app/oracle/oradata/csdb/control02.ctl' from
 '/u01/app/oracle/oradata/csdb/control01.ctl';
}
executing Memory Script

Starting backup at 19-SEP-22
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
copying standby control file
output file name=+JHK/csdbs/snapcf_csdb1.f tag=TAG20220919T124512 RECID=185 STAMP=1115815514
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:01
Finished backup at 19-SEP-22

Starting restore at 19-SEP-22
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: copied control file copy
Finished restore at 19-SEP-22

contents of Memory Script:
{
   sql clone 'alter database mount standby database';
}
executing Memory Script

sql statement: alter database mount standby database

contents of Memory Script:
{
   set newname for tempfile  1 to
 "/u01/app/oracle/oradata/csdb/temp01.dbf";
   switch clone tempfile all;
   set newname for datafile  1 to
 "/u01/app/oracle/oradata/csdb/system01.dbf";
   set newname for datafile  2 to
 "/u01/app/oracle/oradata/csdb/sysaux01.dbf";
   set newname for datafile  3 to
 "/u01/app/oracle/oradata/csdb/undotbs01.dbf";
   set newname for datafile  4 to
 "/u01/app/oracle/oradata/csdb/users01.dbf";
   set newname for datafile  5 to
 "/u01/app/oracle/oradata/csdb/example01.dbf";
   set newname for datafile  8 to
 "/u01/app/oracle/oradata/csdb/swpt01";
   set newname for datafile  11 to
 "/u01/app/oracle/oradata/csdb/users02.dbf";
   set newname for datafile  12 to
 "/u01/app/oracle/oradata/csdb/users03.dbf";
   set newname for datafile  13 to
 "/u01/app/oracle/oradata/csdb/users04.dbf";
   set newname for datafile  14 to
 "/u01/app/oracle/oradata/csdb/users05.dbf";
   set newname for datafile  15 to
 "/u01/app/oracle/oradata/csdb/users06.dbf";
   set newname for datafile  16 to
 "/u01/app/oracle/oradata/csdb/users07.dbf";
   set newname for datafile  17 to
 "/u01/app/oracle/oradata/csdb/users08.dbf";
   set newname for datafile  18 to
 "/u01/app/oracle/oradata/csdb/users09.dbf";
   set newname for datafile  19 to
 "/u01/app/oracle/oradata/csdb/users10.dbf";
   set newname for datafile  20 to
 "/u01/app/oracle/oradata/csdb/users11.dbf";
   set newname for datafile  21 to
 "/u01/app/oracle/oradata/csdb/users12.dbf";
   set newname for datafile  22 to
 "/u01/app/oracle/oradata/csdb/users13.dbf";
   set newname for datafile  23 to
 "/u01/app/oracle/oradata/csdb/users14.dbf";
   set newname for datafile  25 to
 "/u01/app/oracle/oradata/csdb/users16.dbf";
   set newname for datafile  26 to
 "/u01/app/oracle/oradata/csdb/users17.dbf";
   set newname for datafile  27 to
 "/u01/app/oracle/oradata/csdb/users15.dbf";
   set newname for datafile  28 to
 "/u01/app/oracle/oradata/csdb/users18.dbf";
   set newname for datafile  29 to
 "/u01/app/oracle/oradata/csdb/users19.dbf";
   set newname for datafile  30 to
 "/u01/app/oracle/oradata/csdb/users20.dbf";
   set newname for datafile  31 to
 "/u01/app/oracle/oradata/csdb/users21.dbf";
   set newname for datafile  32 to
 "/u01/app/oracle/oradata/csdb/users22.dbf";
   set newname for datafile  33 to
 "/u01/app/oracle/oradata/csdb/users23.dbf";
   set newname for datafile  34 to
 "/u01/app/oracle/oradata/csdb/users24.dbf";
   set newname for datafile  35 to
 "/u01/app/oracle/oradata/csdb/users25.dbf";
   set newname for datafile  36 to
 "/u01/app/oracle/oradata/csdb/users26.dbf";
   set newname for datafile  37 to
 "/u01/app/oracle/oradata/csdb/users27.dbf";
   set newname for datafile  38 to
 "/u01/app/oracle/oradata/csdb/users28.dbf";
   set newname for datafile  39 to
 "/u01/app/oracle/oradata/csdb/users29.dbf";
   set newname for datafile  40 to
 "/u01/app/oracle/oradata/csdb/users30.dbf";
   set newname for datafile  41 to
 "/u01/app/oracle/oradata/csdb/undotbs02.dbf";
   set newname for datafile  42 to
 "/u01/app/oracle/oradata/csdb/undotbs03.dbf";
   set newname for datafile  49 to
 "/u01/app/oracle/oradata/csdb/datafile/undotbs2.262.1109177757";
   set newname for datafile  50 to
 "/u01/app/oracle/oradata/csdb/datafile/undotbs2.263.1109178111";
   set newname for datafile  51 to
 "/u01/app/oracle/oradata/csdb/datafile/undotbs2.264.1109178457";
   set newname for datafile  52 to
 "/u01/app/oracle/oradata/csdb/datafile/users.284.1109186395";
   set newname for datafile  53 to
 "/u01/app/oracle/oradata/csdb/datafile/users.285.1109186791";
   set newname for datafile  54 to
 "/u01/app/oracle/oradata/csdb/datafile/users.286.1109187157";
   set newname for datafile  55 to
 "/u01/app/oracle/oradata/csdb/datafile/users.287.1109187493";
   set newname for datafile  56 to
 "/u01/app/oracle/oradata/csdb/users31.dbf";
   set newname for datafile  57 to
 "/u01/app/oracle/oradata/csdb/users32.dbf";
   backup as copy reuse
   datafile  1 auxiliary format
 "/u01/app/oracle/oradata/csdb/system01.dbf"   datafile
 2 auxiliary format
 "/u01/app/oracle/oradata/csdb/sysaux01.dbf"   datafile
 3 auxiliary format
 "/u01/app/oracle/oradata/csdb/undotbs01.dbf"   datafile
 4 auxiliary format
 "/u01/app/oracle/oradata/csdb/users01.dbf"   datafile
 5 auxiliary format
 "/u01/app/oracle/oradata/csdb/example01.dbf"   datafile
 8 auxiliary format
 "/u01/app/oracle/oradata/csdb/swpt01"   datafile
 11 auxiliary format
 "/u01/app/oracle/oradata/csdb/users02.dbf"   datafile
 12 auxiliary format
 "/u01/app/oracle/oradata/csdb/users03.dbf"   datafile
 13 auxiliary format
 "/u01/app/oracle/oradata/csdb/users04.dbf"   datafile
 14 auxiliary format
 "/u01/app/oracle/oradata/csdb/users05.dbf"   datafile
 15 auxiliary format
 "/u01/app/oracle/oradata/csdb/users06.dbf"   datafile
 16 auxiliary format
 "/u01/app/oracle/oradata/csdb/users07.dbf"   datafile
 17 auxiliary format
 "/u01/app/oracle/oradata/csdb/users08.dbf"   datafile
 18 auxiliary format
 "/u01/app/oracle/oradata/csdb/users09.dbf"   datafile
 19 auxiliary format
 "/u01/app/oracle/oradata/csdb/users10.dbf"   datafile
 20 auxiliary format
 "/u01/app/oracle/oradata/csdb/users11.dbf"   datafile
 21 auxiliary format
 "/u01/app/oracle/oradata/csdb/users12.dbf"   datafile
 22 auxiliary format
 "/u01/app/oracle/oradata/csdb/users13.dbf"   datafile
 23 auxiliary format
 "/u01/app/oracle/oradata/csdb/users14.dbf"   datafile
 25 auxiliary format
 "/u01/app/oracle/oradata/csdb/users16.dbf"   datafile
 26 auxiliary format
 "/u01/app/oracle/oradata/csdb/users17.dbf"   datafile
 27 auxiliary format
 "/u01/app/oracle/oradata/csdb/users15.dbf"   datafile
 28 auxiliary format
 "/u01/app/oracle/oradata/csdb/users18.dbf"   datafile
 29 auxiliary format
 "/u01/app/oracle/oradata/csdb/users19.dbf"   datafile
 30 auxiliary format
 "/u01/app/oracle/oradata/csdb/users20.dbf"   datafile
 31 auxiliary format
 "/u01/app/oracle/oradata/csdb/users21.dbf"   datafile
 32 auxiliary format
 "/u01/app/oracle/oradata/csdb/users22.dbf"   datafile
 33 auxiliary format
 "/u01/app/oracle/oradata/csdb/users23.dbf"   datafile
 34 auxiliary format
 "/u01/app/oracle/oradata/csdb/users24.dbf"   datafile
 35 auxiliary format
 "/u01/app/oracle/oradata/csdb/users25.dbf"   datafile
 36 auxiliary format
 "/u01/app/oracle/oradata/csdb/users26.dbf"   datafile
 37 auxiliary format
 "/u01/app/oracle/oradata/csdb/users27.dbf"   datafile
 38 auxiliary format
 "/u01/app/oracle/oradata/csdb/users28.dbf"   datafile
 39 auxiliary format
 "/u01/app/oracle/oradata/csdb/users29.dbf"   datafile
 40 auxiliary format
 "/u01/app/oracle/oradata/csdb/users30.dbf"   datafile
 41 auxiliary format
 "/u01/app/oracle/oradata/csdb/undotbs02.dbf"   datafile
 42 auxiliary format
 "/u01/app/oracle/oradata/csdb/undotbs03.dbf"   datafile
 49 auxiliary format
 "/u01/app/oracle/oradata/csdb/datafile/undotbs2.262.1109177757"   datafile
 50 auxiliary format
 "/u01/app/oracle/oradata/csdb/datafile/undotbs2.263.1109178111"   datafile
 51 auxiliary format
 "/u01/app/oracle/oradata/csdb/datafile/undotbs2.264.1109178457"   datafile
 52 auxiliary format
 "/u01/app/oracle/oradata/csdb/datafile/users.284.1109186395"   datafile
 53 auxiliary format
 "/u01/app/oracle/oradata/csdb/datafile/users.285.1109186791"   datafile
 54 auxiliary format
 "/u01/app/oracle/oradata/csdb/datafile/users.286.1109187157"   datafile
 55 auxiliary format
 "/u01/app/oracle/oradata/csdb/datafile/users.287.1109187493"   datafile
 56 auxiliary format
 "/u01/app/oracle/oradata/csdb/users31.dbf"   datafile
 57 auxiliary format
 "/u01/app/oracle/oradata/csdb/users32.dbf"   ;
   sql 'alter system archive log current';
}
executing Memory Script

executing command: SET NEWNAME

renamed tempfile 1 to /u01/app/oracle/oradata/csdb/temp01.dbf in control file

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting backup at 19-SEP-22
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile copy
input datafile file number=00001 name=+JHK/csdbs/system01.dbf
output file name=/u01/app/oracle/oradata/csdb/system01.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00002 name=+JHK/csdbs/sysaux01.dbf
output file name=/u01/app/oracle/oradata/csdb/sysaux01.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:56
channel ORA_DISK_1: starting datafile copy
input datafile file number=00003 name=+JHK/csdbs/undotbs01.dbf
output file name=/u01/app/oracle/oradata/csdb/undotbs01.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:56
channel ORA_DISK_1: starting datafile copy
input datafile file number=00049 name=+JHK/csdbs/datafile/undotbs2.262.1109177757
output file name=/u01/app/oracle/oradata/csdb/datafile/undotbs2.262.1109177757 tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00050 name=+JHK/csdbs/datafile/undotbs2.263.1109178111
output file name=/u01/app/oracle/oradata/csdb/datafile/undotbs2.263.1109178111 tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:05:06
channel ORA_DISK_1: starting datafile copy
input datafile file number=00051 name=+JHK/csdbs/datafile/undotbs2.264.1109178457
output file name=/u01/app/oracle/oradata/csdb/datafile/undotbs2.264.1109178457 tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:56
channel ORA_DISK_1: starting datafile copy
input datafile file number=00025 name=+JHK/csdbs/users16.dbf
output file name=/u01/app/oracle/oradata/csdb/users16.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:46
channel ORA_DISK_1: starting datafile copy
input datafile file number=00026 name=+JHK/csdbs/users17.dbf
output file name=/u01/app/oracle/oradata/csdb/users17.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00027 name=+JHK/csdbs/users15.dbf
output file name=/u01/app/oracle/oradata/csdb/users15.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:46
channel ORA_DISK_1: starting datafile copy
input datafile file number=00028 name=+JHK/csdbs/users18.dbf
output file name=/u01/app/oracle/oradata/csdb/users18.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:46
channel ORA_DISK_1: starting datafile copy
input datafile file number=00029 name=+JHK/csdbs/users19.dbf
output file name=/u01/app/oracle/oradata/csdb/users19.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00030 name=+JHK/csdbs/users20.dbf
output file name=/u01/app/oracle/oradata/csdb/users20.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:46
channel ORA_DISK_1: starting datafile copy
input datafile file number=00031 name=+JHK/csdbs/users21.dbf
output file name=/u01/app/oracle/oradata/csdb/users21.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:46
channel ORA_DISK_1: starting datafile copy
input datafile file number=00032 name=+JHK/csdbs/users22.dbf
output file name=/u01/app/oracle/oradata/csdb/users22.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:46
channel ORA_DISK_1: starting datafile copy
input datafile file number=00033 name=+JHK/csdbs/users23.dbf
output file name=/u01/app/oracle/oradata/csdb/users23.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00034 name=+JHK/csdbs/users24.dbf
output file name=/u01/app/oracle/oradata/csdb/users24.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:36
channel ORA_DISK_1: starting datafile copy
input datafile file number=00035 name=+JHK/csdbs/users25.dbf
output file name=/u01/app/oracle/oradata/csdb/users25.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:46
channel ORA_DISK_1: starting datafile copy
input datafile file number=00036 name=+JHK/csdbs/users26.dbf
output file name=/u01/app/oracle/oradata/csdb/users26.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00037 name=+JHK/csdbs/users27.dbf
output file name=/u01/app/oracle/oradata/csdb/users27.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00038 name=+JHK/csdbs/users28.dbf
output file name=/u01/app/oracle/oradata/csdb/users28.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:46
channel ORA_DISK_1: starting datafile copy
input datafile file number=00039 name=+JHK/csdbs/users29.dbf
output file name=/u01/app/oracle/oradata/csdb/users29.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:46
channel ORA_DISK_1: starting datafile copy
input datafile file number=00040 name=+JHK/csdbs/users30.dbf
output file name=/u01/app/oracle/oradata/csdb/users30.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00041 name=+JHK/csdbs/undotbs02.dbf
output file name=/u01/app/oracle/oradata/csdb/undotbs02.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:46
channel ORA_DISK_1: starting datafile copy
input datafile file number=00042 name=+JHK/csdbs/undotbs03.dbf
output file name=/u01/app/oracle/oradata/csdb/undotbs03.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:36
channel ORA_DISK_1: starting datafile copy
input datafile file number=00052 name=+JHK/csdbs/datafile/users.284.1109186395
output file name=/u01/app/oracle/oradata/csdb/datafile/users.284.1109186395 tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00053 name=+JHK/csdbs/datafile/users.285.1109186791
output file name=/u01/app/oracle/oradata/csdb/datafile/users.285.1109186791 tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00054 name=+JHK/csdbs/datafile/users.286.1109187157
output file name=/u01/app/oracle/oradata/csdb/datafile/users.286.1109187157 tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:46
channel ORA_DISK_1: starting datafile copy
input datafile file number=00055 name=+JHK/csdbs/datafile/users.287.1109187493
output file name=/u01/app/oracle/oradata/csdb/datafile/users.287.1109187493 tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00056 name=+JHK/csdbs/users31.dbf
output file name=/u01/app/oracle/oradata/csdb/users31.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:55
channel ORA_DISK_1: starting datafile copy
input datafile file number=00057 name=+JHK/csdbs/users32.dbf
output file name=/u01/app/oracle/oradata/csdb/users32.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:05:06
channel ORA_DISK_1: starting datafile copy
input datafile file number=00004 name=+JHK/csdbs/users01.dbf
output file name=/u01/app/oracle/oradata/csdb/users01.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:03:35
channel ORA_DISK_1: starting datafile copy
input datafile file number=00011 name=+JHK/csdbs/users02.dbf
output file name=/u01/app/oracle/oradata/csdb/users02.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:03:16
channel ORA_DISK_1: starting datafile copy
input datafile file number=00012 name=+JHK/csdbs/users03.dbf
output file name=/u01/app/oracle/oradata/csdb/users03.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:03:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00013 name=+JHK/csdbs/users04.dbf
output file name=/u01/app/oracle/oradata/csdb/users04.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:07:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00014 name=+JHK/csdbs/users05.dbf
output file name=/u01/app/oracle/oradata/csdb/users05.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:06:05
channel ORA_DISK_1: starting datafile copy
input datafile file number=00023 name=+JHK/csdbs/users14.dbf
output file name=/u01/app/oracle/oradata/csdb/users14.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:45
channel ORA_DISK_1: starting datafile copy
input datafile file number=00019 name=+JHK/csdbs/users10.dbf
output file name=/u01/app/oracle/oradata/csdb/users10.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:06
channel ORA_DISK_1: starting datafile copy
input datafile file number=00020 name=+JHK/csdbs/users11.dbf
output file name=/u01/app/oracle/oradata/csdb/users11.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:04:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00021 name=+JHK/csdbs/users12.dbf
output file name=/u01/app/oracle/oradata/csdb/users12.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:03:25
channel ORA_DISK_1: starting datafile copy
input datafile file number=00022 name=+JHK/csdbs/users13.dbf
output file name=/u01/app/oracle/oradata/csdb/users13.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:26
channel ORA_DISK_1: starting datafile copy
input datafile file number=00015 name=+JHK/csdbs/users06.dbf
output file name=/u01/app/oracle/oradata/csdb/users06.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00016 name=+JHK/csdbs/users07.dbf
output file name=/u01/app/oracle/oradata/csdb/users07.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00018 name=+JHK/csdbs/users09.dbf
output file name=/u01/app/oracle/oradata/csdb/users09.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00017 name=+JHK/csdbs/users08.dbf
output file name=/u01/app/oracle/oradata/csdb/users08.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:02:15
channel ORA_DISK_1: starting datafile copy
input datafile file number=00008 name=+JHK/csdbs/swpt01
output file name=/u01/app/oracle/oradata/csdb/swpt01 tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:26
channel ORA_DISK_1: starting datafile copy
input datafile file number=00005 name=+JHK/csdbs/example01.dbf
output file name=/u01/app/oracle/oradata/csdb/example01.dbf tag=TAG20220919T124526
channel ORA_DISK_1: datafile copy complete, elapsed time: 00:00:07
Finished backup at 19-SEP-22

sql statement: alter system archive log current

contents of Memory Script:
{
   switch clone datafile all;
}
executing Memory Script

datafile 1 switched to datafile copy
input datafile copy RECID=185 STAMP=1115827367 file name=/u01/app/oracle/oradata/csdb/system01.dbf
datafile 2 switched to datafile copy
input datafile copy RECID=186 STAMP=1115827367 file name=/u01/app/oracle/oradata/csdb/sysaux01.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=187 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/undotbs01.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=188 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users01.dbf
datafile 5 switched to datafile copy
input datafile copy RECID=189 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/example01.dbf
datafile 8 switched to datafile copy
input datafile copy RECID=190 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/swpt01
datafile 11 switched to datafile copy
input datafile copy RECID=191 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users02.dbf
datafile 12 switched to datafile copy
input datafile copy RECID=192 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users03.dbf
datafile 13 switched to datafile copy
input datafile copy RECID=193 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users04.dbf
datafile 14 switched to datafile copy
input datafile copy RECID=194 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users05.dbf
datafile 15 switched to datafile copy
input datafile copy RECID=195 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users06.dbf
datafile 16 switched to datafile copy
input datafile copy RECID=196 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users07.dbf
datafile 17 switched to datafile copy
input datafile copy RECID=197 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users08.dbf
datafile 18 switched to datafile copy
input datafile copy RECID=198 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users09.dbf
datafile 19 switched to datafile copy
input datafile copy RECID=199 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users10.dbf
datafile 20 switched to datafile copy
input datafile copy RECID=200 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users11.dbf
datafile 21 switched to datafile copy
input datafile copy RECID=201 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users12.dbf
datafile 22 switched to datafile copy
input datafile copy RECID=202 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users13.dbf
datafile 23 switched to datafile copy
input datafile copy RECID=203 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users14.dbf
datafile 25 switched to datafile copy
input datafile copy RECID=204 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users16.dbf
datafile 26 switched to datafile copy
input datafile copy RECID=205 STAMP=1115827368 file name=/u01/app/oracle/oradata/csdb/users17.dbf
datafile 27 switched to datafile copy
input datafile copy RECID=206 STAMP=1115827369 file name=/u01/app/oracle/oradata/csdb/users15.dbf
datafile 28 switched to datafile copy
input datafile copy RECID=207 STAMP=1115827369 file name=/u01/app/oracle/oradata/csdb/users18.dbf
datafile 29 switched to datafile copy
input datafile copy RECID=208 STAMP=1115827369 file name=/u01/app/oracle/oradata/csdb/users19.dbf
datafile 30 switched to datafile copy
input datafile copy RECID=209 STAMP=1115827369 file name=/u01/app/oracle/oradata/csdb/users20.dbf
datafile 31 switched to datafile copy
input datafile copy RECID=210 STAMP=1115827369 file name=/u01/app/oracle/oradata/csdb/users21.dbf
datafile 32 switched to datafile copy
input datafile copy RECID=211 STAMP=1115827369 file name=/u01/app/oracle/oradata/csdb/users22.dbf
datafile 33 switched to datafile copy
input datafile copy RECID=212 STAMP=1115827369 file name=/u01/app/oracle/oradata/csdb/users23.dbf
datafile 34 switched to datafile copy
input datafile copy RECID=213 STAMP=1115827369 file name=/u01/app/oracle/oradata/csdb/users24.dbf
datafile 35 switched to datafile copy
input datafile copy RECID=214 STAMP=1115827369 file name=/u01/app/oracle/oradata/csdb/users25.dbf
datafile 36 switched to datafile copy
input datafile copy RECID=215 STAMP=1115827369 file name=/u01/app/oracle/oradata/csdb/users26.dbf
datafile 37 switched to datafile copy
input datafile copy RECID=216 STAMP=1115827369 file name=/u01/app/oracle/oradata/csdb/users27.dbf
datafile 38 switched to datafile copy
input datafile copy RECID=217 STAMP=1115827369 file name=/u01/app/oracle/oradata/csdb/users28.dbf
datafile 39 switched to datafile copy
input datafile copy RECID=218 STAMP=1115827369 file name=/u01/app/oracle/oradata/csdb/users29.dbf
datafile 40 switched to datafile copy
input datafile copy RECID=219 STAMP=1115827369 file name=/u01/app/oracle/oradata/csdb/users30.dbf
datafile 41 switched to datafile copy
input datafile copy RECID=220 STAMP=1115827370 file name=/u01/app/oracle/oradata/csdb/undotbs02.dbf
datafile 42 switched to datafile copy
input datafile copy RECID=221 STAMP=1115827370 file name=/u01/app/oracle/oradata/csdb/undotbs03.dbf
datafile 49 switched to datafile copy
input datafile copy RECID=222 STAMP=1115827370 file name=/u01/app/oracle/oradata/csdb/datafile/undotbs2.262.1109177757
datafile 50 switched to datafile copy
input datafile copy RECID=223 STAMP=1115827370 file name=/u01/app/oracle/oradata/csdb/datafile/undotbs2.263.1109178111
datafile 51 switched to datafile copy
input datafile copy RECID=224 STAMP=1115827370 file name=/u01/app/oracle/oradata/csdb/datafile/undotbs2.264.1109178457
datafile 52 switched to datafile copy
input datafile copy RECID=225 STAMP=1115827370 file name=/u01/app/oracle/oradata/csdb/datafile/users.284.1109186395
datafile 53 switched to datafile copy
input datafile copy RECID=226 STAMP=1115827370 file name=/u01/app/oracle/oradata/csdb/datafile/users.285.1109186791
datafile 54 switched to datafile copy
input datafile copy RECID=227 STAMP=1115827370 file name=/u01/app/oracle/oradata/csdb/datafile/users.286.1109187157
datafile 55 switched to datafile copy
input datafile copy RECID=228 STAMP=1115827370 file name=/u01/app/oracle/oradata/csdb/datafile/users.287.1109187493
datafile 56 switched to datafile copy
input datafile copy RECID=229 STAMP=1115827370 file name=/u01/app/oracle/oradata/csdb/users31.dbf
datafile 57 switched to datafile copy
input datafile copy RECID=230 STAMP=1115827370 file name=/u01/app/oracle/oradata/csdb/users32.dbf
Finished Duplicate Db at 19-SEP-22

Oracle Linux 6.7 静默认安装Oracle 11g

Oracle Linux 6.7 静默认安装Oracle 11g
一. 软件版本
操作系统:Oracle Linux 6.7
数据库软件:Oracle Database Enterprise 11.2.4.0

二·安装环境准备
2.1修改IP地址

[root@sjjh ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:50:56:A3:94:C1
TYPE=Ethernet
UUID=d2f38815-5bc0-4ce4-8bdb-bbd48992ebe6
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=10.10.10.101
NETMASK=255.255.255.0
GATEWAY=10.10.10.254

2.2关闭防火墙和SELinux

[root@sjjh ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: nat mangle filter [  OK  ]
iptables: Flushing firewall rules: [  OK  ]
iptables: Unloading modules: [  OK  ]
[root@sjjh ~]# chkconfig iptables off
[root@sjjh ~]# chkconfig libvirtd off
[root@sjjh ~]# chkconfig |grep libvirtd
libvirtd        0:off   1:off   2:off   3:off   4:off   5:off   6:off

2.3 配置本地YUM

[root@sjjh udev]# cd /etc/yum.repos.d/
[root@sjjh yum.repos.d]# ls -lrt
total 8
-rw-r--r--. 1 root root 4949 Sep 18 07:37 public-yum-ol6.repo
[root@sjjh yum.repos.d]# mv public-yum-ol6.repo public-yum-ol6.repo.bak
[root@sjjh yum.repos.d]# mkdir /mnt/vcdrom
[root@sjjh yum.repos.d]# mount -o loop -t iso9660  /soft/Oracle_Linux_Release_6_Update_7_for_x86_64.iso /mnt/vcdrom
[root@sjjh yum.repos.d]# echo "[base]
> name=jy
> baseurl=file:///mnt/vcdrom/
> gpgcheck=0
> enabled=1" > jy.repo

[root@sjjh yum.repos.d]# cat jy.repo
[base]
name=jy
baseurl=file:///mnt/cdrom/
gpgcheck=0
enabled=1

[root@sjjh yum.repos.d]# yum clean all
Loaded plugins: aliases, changelog, kabi, presto, refresh-packagekit, security, tmprepo, ulninfo, verify, versionlock
Loading support for kernel ABI
Cleaning repos: base
Cleaning up Everything
0 delta-package files removed, by presto

2.4创建用户和组
创建用户组

[root@sjjh yum.repos.d]# groupadd -g 54321 oinstall
[root@sjjh yum.repos.d]# groupadd -g 54322 dba
[root@sjjh yum.repos.d]# groupadd -g 54323 oper
[root@sjjh yum.repos.d]# groupadd -g 54324 backupdba
[root@sjjh yum.repos.d]# groupadd -g 54325 dgdba
[root@sjjh yum.repos.d]# groupadd -g 54326 kmdba
[root@sjjh yum.repos.d]# groupadd -g 54327 asmdba
[root@sjjh yum.repos.d]# groupadd -g 54328 asmoper
[root@sjjh yum.repos.d]# groupadd -g 54329 asmadmin
[root@sjjh yum.repos.d]# groupadd -g 54330 racdba
[root@sjjh yum.repos.d]# grep 543 /etc/group
oinstall:x:54321:
dba:x:54322:oracle
oper:x:54323:
backupdba:x:54324:
dgdba:x:54325:
kmdba:x:54326:
asmdba:x:54327:
asmoper:x:54328:
asmadmin:x:54329:
racdba:x:54330:

创建用户

[root@sjjh home]# useradd -u 54321 -g oinstall -G dba,asmadmin,asmdba,asmoper,backupdba,dgdba,kmdba,racdba,oper oracle
[root@sjjh home]# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

2.5创建相关目录

[root@sjjh home]# mkdir -p /u01/tmp
[root@sjjh home]# mkdir -p /u01/app/oracle/product/11.2.0.4/db
[root@sjjh home]# mkdir -p /u01/app/oraInventory
[root@sjjh home]# mkdir -p /u01/app/oracle/oradata
[root@sjjh home]# chown -R oracle:oinstall /u01
[root@sjjh home]# chmod -R 775 /u01

2.6安装软件包

[root@sjjh /]# yum install -y binutils compat-libcap1 compat-libstdc++-33 e2fsprogs e2fsprogs-libs elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-devel libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC ksh libX11 libXau libXi libXtst libxcb smartmontools unixODBC-devel net-tools compat-libstdc++-33* unzip vim* perl
Loaded plugins: aliases, changelog, kabi, presto, refresh-packagekit, security, tmprepo, ulninfo, verify, versionlock
Loading support for kernel ABI
Setting up Install Process
base                                                                                                                                                                                                                | 3.7 kB     00:00 ...
base/primary_db                                                                                                                                                                                                     | 3.0 MB     00:00 ...
Package binutils-2.20.51.0.2-5.43.el6.x86_64 already installed and latest version
Package compat-libcap1-1.10-1.x86_64 already installed and latest version
Package compat-libstdc++-33-3.2.3-69.el6.x86_64 already installed and latest version
Package e2fsprogs-1.42.8-1.0.2.el6.x86_64 already installed and latest version
Package e2fsprogs-libs-1.42.8-1.0.2.el6.x86_64 already installed and latest version
Package elfutils-libelf-0.161-3.el6.x86_64 already installed and latest version
Package elfutils-libelf-devel-0.161-3.el6.x86_64 already installed and latest version
Package gcc-4.4.7-16.el6.x86_64 already installed and latest version
Package gcc-c++-4.4.7-16.el6.x86_64 already installed and latest version
Package glibc-2.12-1.166.el6.x86_64 already installed and latest version
Package glibc-devel-2.12-1.166.el6.x86_64 already installed and latest version
Package libaio-0.3.107-10.el6.x86_64 already installed and latest version
Package libaio-devel-0.3.107-10.el6.x86_64 already installed and latest version
Package libgcc-4.4.7-16.el6.x86_64 already installed and latest version
Package libstdc++-4.4.7-16.el6.x86_64 already installed and latest version
Package libstdc++-devel-4.4.7-16.el6.x86_64 already installed and latest version
Package 1:make-3.81-20.el6.x86_64 already installed and latest version
Package sysstat-9.0.4-27.el6.x86_64 already installed and latest version
Package unixODBC-2.2.14-14.el6.x86_64 already installed and latest version
Package ksh-20120801-28.el6.x86_64 already installed and latest version
Package libX11-1.6.0-6.el6.x86_64 already installed and latest version
Package libXau-1.0.6-4.el6.x86_64 already installed and latest version
Package libXi-1.7.2-2.2.el6.x86_64 already installed and latest version
Package libXtst-1.2.2-2.1.el6.x86_64 already installed and latest version
Package libxcb-1.9.1-3.el6.x86_64 already installed and latest version
Package 1:smartmontools-5.43-1.el6.x86_64 already installed and latest version
Package unixODBC-devel-2.2.14-14.el6.x86_64 already installed and latest version
Package net-tools-1.60-110.el6_2.x86_64 already installed and latest version
Package compat-libstdc++-33-3.2.3-69.el6.x86_64 already installed and latest version
Package unzip-6.0-2.el6_6.x86_64 already installed and latest version
Package 2:vim-minimal-7.4.629-5.el6.x86_64 already installed and latest version
Package 2:vim-filesystem-7.4.629-5.el6.x86_64 already installed and latest version
Package 2:vim-common-7.4.629-5.el6.x86_64 already installed and latest version
Package 2:vim-X11-7.4.629-5.el6.x86_64 already installed and latest version
Package 2:vim-enhanced-7.4.629-5.el6.x86_64 already installed and latest version
Package 4:perl-5.10.1-141.el6.x86_64 already installed and latest version
Nothing to do

检查已经安装的软件包

[root@sjjh /]# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' binutils compat-libcap1 compat-libstdc++-33 e2fsprogs e2fsprogs-libs elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-devel libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC ksh libX11 libXau libXi libXtst libxcb smartmontools unixODBC-devel net-tools unzip vim* perl
binutils-2.20.51.0.2-5.43.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64)
e2fsprogs-1.42.8-1.0.2.el6 (x86_64)
e2fsprogs-libs-1.42.8-1.0.2.el6 (x86_64)
elfutils-libelf-0.161-3.el6 (x86_64)
elfutils-libelf-devel-0.161-3.el6 (x86_64)
gcc-4.4.7-16.el6 (x86_64)
gcc-c++-4.4.7-16.el6 (x86_64)
glibc-2.12-1.166.el6 (x86_64)
glibc-2.12-1.166.el6 (i686)
glibc-devel-2.12-1.166.el6 (x86_64)
libaio-0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6 (x86_64)
libgcc-4.4.7-16.el6 (x86_64)
libgcc-4.4.7-16.el6 (i686)
libstdc++-4.4.7-16.el6 (x86_64)
libstdc++-devel-4.4.7-16.el6 (x86_64)
make-3.81-20.el6 (x86_64)
sysstat-9.0.4-27.el6 (x86_64)
unixODBC-2.2.14-14.el6 (x86_64)
ksh-20120801-28.el6 (x86_64)
libX11-1.6.0-6.el6 (x86_64)
libXau-1.0.6-4.el6 (x86_64)
libXi-1.7.2-2.2.el6 (x86_64)
libXtst-1.2.2-2.1.el6 (x86_64)
libxcb-1.9.1-3.el6 (x86_64)
smartmontools-5.43-1.el6 (x86_64)
unixODBC-devel-2.2.14-14.el6 (x86_64)
net-tools-1.60-110.el6_2 (x86_64)
unzip-6.0-2.el6_6 (x86_64)
package vim* is not installed
perl-5.10.1-141.el6 (x86_64)

2.7编辑hosts文件

[root@sjjh /]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

10.10.10.101 sjjh

2.8 修改系统内核参数

[root@sjjh /]# cat >> /etc/sysctl.conf < kernel.shmall = 4294967296
> kernel.sem = 250 32000 100 128
> kernel.shmmni = 4096
> kernel.shmmax = 429496729600
> net.ipv4.ip_local_port_range = 9000 65500
> net.core.rmem_default = 1048576
> net.core.rmem_max = 4194304
> net.core.wmem_default = 262144
> net.core.wmem_max = 1048576
> fs.file-max = 6815744
> fs.aio-max-nr = 1048576
> vm.swappiness = 0
> vm.dirty_background_ratio = 3
> vm.dirty_ratio = 20
> vm.dirty_expire_centisecs = 500
> vm.dirty_writeback_centisecs = 100
> vm.min_free_kbytes=524288
> net.ipv4.tcp_sack = 0
> net.ipv4.tcp_timestamps = 0
> net.ipv4.conf.default.rp_filter = 0
> net.ipv4.tcp_wmem = 262144
> net.ipv4.tcp_rmem = 4194304
> net.ipv4.ipfrag_high_thresh = 16777216
> net.ipv4.ipfrag_low_thresh = 15728640
> net.ipv4.ipfrag_time=60
> EOF

[root@sjjh /]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmall = 4294967296
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
kernel.shmall = 4294967296
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmmax = 429496729600
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 1048576
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.file-max = 6815744
fs.aio-max-nr = 1048576
vm.swappiness = 0
vm.dirty_background_ratio = 3
vm.dirty_ratio = 20
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
vm.min_free_kbytes = 524288
net.ipv4.tcp_sack = 0
net.ipv4.tcp_timestamps = 0
net.ipv4.conf.default.rp_filter = 0
net.ipv4.tcp_wmem = 262144
net.ipv4.tcp_rmem = 4194304
net.ipv4.ipfrag_high_thresh = 16777216
net.ipv4.ipfrag_low_thresh = 15728640
net.ipv4.ipfrag_time = 60

2.9 配置LIMITS限制参数

[root@sjjh /]# cat >> /etc/security/limits.conf < oracle          soft    nproc           16384
> oracle          hard    nproc           16384
> oracle          soft    nofile          65536
> oracle          hard    nofile          65536
> oracle          soft    memlock         26843545
> oracle          hard    memlock         26843545
> oracle          soft    stack           10240
> oracle          hard    stack           32768
> EOF

2.10配置PAM

[root@sjjh /]# echo "session    required     /lib64/security/pam_limits.so">>/etc/pam.d/login

2.11 配置系统环境变量

[root@sjjh /]# cat >> /etc/profile < if [ \$USER = "oracle" ]; then
>     if [ \$SHELL = "/bin/ksh" ]; then
>         ulimit -p 16384
>         ulimit -n 65536
>     else
>         ulimit -u 16384 -n 65536
>     fi
> fi
> EOF

2.11 配置oracle用户环境变量

[oracle@sjjh ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH


TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/db
export ORACLE_SID=sjjh
export ORACLE_UNQNAME=sjjh
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022
export PATH=$PATH:$ORACLE_HOME/rdbms/lib

[oracle@sjjh ~]$ source .bash_profile
[oracle@sjjh ~]$ echo $ORACLE_SID
sjjh

三·安装数据库软件
3.1解压安装包

[root@sjjh soft]# unzip p13390677_112040_Linux-x86-64_1of7.zip
[root@sjjh soft]# unzip p13390677_112040_Linux-x86-64_2of7.zip

3.2编写响应文件

[oracle@sjjh ~]$ vi dbinstall.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=sjjh
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/db
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=dba
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=sjjh
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/db
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=false
oracle.install.db.optionalComponents=
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oper
oracle.install.db.CLUSTER_NODES=
oracle.install.db.isRACOneInstall=false
oracle.install.db.racOneServiceName=
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=
oracle.install.db.config.starterdb.SID=
oracle.install.db.config.starterdb.characterSet=
oracle.install.db.config.starterdb.memoryOption=false
oracle.install.db.config.starterdb.memoryLimit=
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.enableSecuritySettings=true
oracle.install.db.config.starterdb.password.ALL=
oracle.install.db.config.starterdb.password.SYS=
oracle.install.db.config.starterdb.password.SYSTEM=
oracle.install.db.config.starterdb.password.SYSMAN=
oracle.install.db.config.starterdb.password.DBSNMP=
oracle.install.db.config.starterdb.control=DB_CONTROL
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
oracle.install.db.config.starterdb.automatedBackup.enable=false
oracle.install.db.config.starterdb.automatedBackup.osuid=
oracle.install.db.config.starterdb.automatedBackup.ospwd=
oracle.install.db.config.starterdb.storageType=
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
oracle.install.db.config.asm.diskGroup=
oracle.install.db.config.asm.ASMSNMPPassword=
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=
COLLECTOR_SUPPORTHUB_URL=
oracle.installer.autoupdates.option=SKIP_UPDATES
oracle.installer.autoupdates.downloadUpdatesLoc=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=

3.3执行安装

[oracle@sjjh database]$ ./runInstaller -silent  -force -noconfig  -ignorePrereq -responseFile /home/oracle/dbinstall.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 1731157 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 16383 MB    Passed
Preparing to launch Oracle Universal Installer from /u01/tmp/OraInstall2022-09-18_10-03-38AM. Please wait ...[oracle@sjjh database]$ You can find the log of this install session at:
 /u01/app/oraInventory/logs/installActions2022-09-18_10-03-38AM.log


[oracle@sjjh database]$ ./runInstaller -silent  -force -noconfig  -ignorePrereq -responseFile /home/oracle/dbinstall.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 1731157 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 16383 MB    Passed
Preparing to launch Oracle Universal Installer from /u01/tmp/OraInstall2022-09-18_10-03-38AM. Please wait ...[oracle@sjjh database]$ You can find the log of this install session at:
 /u01/app/oraInventory/logs/installActions2022-09-18_10-03-38AM.log
The installation of Oracle Database 11g was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2022-09-18_10-03-38AM.log' for more details.

As a root user, execute the following script(s):
        1. /u01/app/oraInventory/orainstRoot.sh
        2. /u01/app/oracle/product/11.2.0.4/db/root.sh


Successfully Setup Software.

3.4执行root.sh脚本

[root@sjjh /]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@sjjh /]# /u01/app/oracle/product/11.2.0.4/db/root.sh
Check /u01/app/oracle/product/11.2.0.4/db/install/root_sjjh_2022-09-18_10-11-40.log for the output of root script

四·创建数据库

4.1 配置监听

[oracle@sjjh ~]$ vi netca.rsp
[GENERAL]
RESPONSEFILE_VERSION="11.2"
CREATE_TYPE="CUSTOM"
[oracle.net.ca]
INSTALLED_COMPONENTS={"server","net8","javavm"}
INSTALL_TYPE=""typical""
LISTENER_NUMBER=1
LISTENER_NAMES={"LISTENER"}
LISTENER_PROTOCOLS={"TCP;1521"}
LISTENER_START=""LISTENER""
NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
NSN_NUMBER=1
NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
NSN_SERVICE={"PLSExtProc"}
NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}

[oracle@sjjh ~]$ netca -silent -responsefile /home/oracle/netca.rsp

Parsing command line arguments:
    Parameter "silent" = true
    Parameter "responsefile" = /home/oracle/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control:
      /u01/app/oracle/product/11.2.0.4/db/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
[oracle@sjjh ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-SEP-2022 10:14:34

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                18-SEP-2022 10:14:19
Uptime                    0 days 0 hr. 0 min. 15 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0.4/db/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/sjjh/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sjjh)(PORT=1521)))
The listener supports no services
The command completed successfully

4.2创建配置数据库的响应文件

[oracle@sjjh ~]$ vi dbca.rsp
[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "sjjh"
SID = "sjjh"
DB_UNIQUE_NAME = "sjjhp"
TEMPLATENAME = "General_Purpose.dbc"
characterSet = "ZHS16GBK"
nationalCharacterSet = "AL16UTF16"
sysPassword="xxzx7817600"
systemPassword="xxzx7817600"
storageType = "FS"
datafileDestination=/u01/app/oracle/oradata
recoveryAreaDestination=/u01/app/oracle/flash_recovery_area
totalMemory=2048
sampleSchema=TRUE

4.3 创建数据库

[oracle@sjjh ~]$ dbca -silent  -createDatabase -responseFile /home/oracle/dbca.rsp
Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
57% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/sjjh/sjjh.log" for further details.

[oracle@sjjh ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 18-SEP-2022 10:52:25

Copyright (c) 1991, 2013, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                18-SEP-2022 10:14:19
Uptime                    0 days 0 hr. 38 min. 6 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0.4/db/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/sjjh/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=sjjh)(PORT=1521)))
Services Summary...
Service "sjjh" has 1 instance(s).
  Instance "sjjh", status READY, has 1 handler(s) for this service...
Service "sjjhXDB" has 1 instance(s).
  Instance "sjjh", status READY, has 1 handler(s) for this service...
The command completed successfully

[oracle@sjjh ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Sep 18 10:53:07 2022

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show parameter unique

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_unique_name                       string      sjjh
SQL>

MySQL 5.7配置SSL连接

MySQL 5.7配置SSL连接

如果想服务能够部署自动支持安全连接,使用mysql_ssl_rsa_setup工具来创建缺省SSL与RSA文件

[root@cs2 bin]# ./mysql_ssl_rsa_setup --datadir=/mysqldata/mysql
Generating a 2048 bit RSA private key
......................................................................+++
..............................................................+++
writing new private key to 'ca-key.pem'
-----
Generating a 2048 bit RSA private key
.............+++
..............+++
writing new private key to 'server-key.pem'
-----
Generating a 2048 bit RSA private key
.....................................+++
................................................+++
writing new private key to 'client-key.pem'
-----





启动mysql

[root@cs2 ~]# service mysqld start
Starting MySQL.. SUCCESS!

测试远程登录

-bash-4.2$ mysql -h 10.11.13.19 -P 3306 -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.7.22 MySQL Community Server (GPL)

Copyright (c) 2000, 2015, 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> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SELECT DISTINCT CONCAT('User: [', user, '''@''', host, '];') AS USER_HOST FROM user;
+------------------------------------+
| USER_HOST                          |
+------------------------------------+
| User: [root'@'%];                  |
| User: [mysql.session'@'localhost]; |
| User: [mysql.sys'@'localhost];     |
+------------------------------------+
3 rows in set (0.05 sec)

通过ssl登录mysql服务器

[mysql@localhost ~]$ mysql -h 10.11.13.19 -P 3306 -u root -pabcd123 --ssl-cert=client-cert.pem --ssl-key=client-key.pem
mysql: [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 7
Server version: 5.7.26-log Source distribution

Copyright (c) 2000, 2019, 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> \s
--------------
mysql  Ver 14.14 Distrib 5.7.26, for Linux (x86_64) using  EditLine wrapper

Connection id:          7
Current database:
Current user:           root@10.11.13.19
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.7.26-log Source distribution
Protocol version:       10
Connection:             10.11.13.19 via TCP/IP
Server characterset:    utf8mb4
Db     characterset:    utf8mb4
Client characterset:    gb2312
Conn.  characterset:    gb2312
TCP port:               3306
Uptime:                 14 min 11 sec

Threads: 2  Questions: 13  Slow queries: 0  Opens: 108  Flush tables: 1  Open tables: 101  Queries per second avg: 0.015
--------------

mysql> show variables like 'have_ssl';
+---------------+----------+
| Variable_name | Value    |
+---------------+----------+
| have_ssl      | DISABLED |
+---------------+----------+
1 row in set (0.01 sec)

mysql> show variables like 'require_secure_transport';
+--------------------------+-------+
| Variable_name            | Value |
+--------------------------+-------+
| require_secure_transport | OFF   |
+--------------------------+-------+
1 row in set (0.00 sec)

mysql> show variables like '%ssl%';
+---------------+-----------------+
| Variable_name | Value           |
+---------------+-----------------+
| have_openssl  | DISABLED        |
| have_ssl      | DISABLED        |
| ssl_ca        | ca.pem          |
| ssl_capath    |                 |
| ssl_cert      | server-cert.pem |
| ssl_cipher    |                 |
| ssl_crl       |                 |
| ssl_crlpath   |                 |
| ssl_key       | server-key.pem  |
+---------------+-----------------+

从上面的查询结果可以看到SSL: Not in use,have_ssl和have_openssl为DISABLED,这说明实际上是没有启用ssl。

这是因为通过执行mysql_ssl_rsa_setup命令产生的pem文件的权限为root用户而不是mysql用户造成的,将这些pem文件的权限修改为mysql用户与组 权限不要太大,只用户权限为rw,组与其它用户需要r权限

[root@localhost mysql]# ls -lrt
30172
-rw-r-----. 1 mysql mysql 104857600 321 16:25 ib_logfile1
-rw-r-----. 1 mysql mysql 104857600 321 16:25 ib_logfile2
drwxr-x---. 2 mysql mysql        48 321 16:25 undo
-rw-r-----. 1 mysql mysql        56 321 16:25 auto.cnf
drwxr-x---. 2 mysql mysql      8192 321 16:25 performance_schema
drwxr-x---. 2 mysql mysql      4096 321 16:25 mysql
drwxr-x---. 2 mysql mysql      8192 321 16:25 sys
-rw-r-----. 1 mysql mysql       177 321 16:25 binlog.000001
-rw-r--r--. 1 mysql mysql      1679 321 16:26 ca-key.pem
-rw-r--r--. 1 mysql mysql      1107 321 16:26 ca.pem
-rw-r--r--. 1 root  root       1679 321 16:26 server-key.pem
-rw-r--r--. 1 root  root       1107 321 16:26 server-cert.pem
-rw-r--r--. 1 root  root      1675 321 16:26 client-key.pem
-rw-r--r--. 1 root  root      1107 321 16:26 client-cert.pem
-rw-r--r--. 1 root  root      1675 321 16:26 private_key.pem
-rw-r--r--. 1 root  root       451 321 16:26 public_key.pem
-rw-r-----. 1 mysql mysql    114688 524 17:00 ts2.ibd
-rw-r-----. 1 mysql mysql     98304 524 17:01 ts1.ibd
drwxr-x---. 2 mysql mysql        32 524 17:11 test
-rw-r-----. 1 mysql mysql      9352 621 10:46 binlog.000002
-rw-r-----. 1 mysql mysql       177 621 10:46 binlog.000003
-rw-r-----. 1 mysql mysql       154 9 9 19:55 binlog.000004
-rw-r-----. 1 mysql mysql       177 9 9 20:23 binlog.000005
-rw-r-----. 1 mysql mysql       177 9 9 20:38 binlog.000006
-rw-r-----. 1 mysql mysql       177 9 9 20:44 binlog.000007
-rw-r-----. 1 mysql mysql       122 9 9 20:44 ib_buffer_pool
-rw-r-----. 1 mysql mysql       248 9 9 20:44 binlog.index
-rw-r-----. 1 mysql mysql       154 9 9 20:44 binlog.000008
-rw-r-----. 1 mysql mysql         6 9 9 20:44 mysqld.pid
-rw-r-----. 1 mysql mysql  12582912 9 9 20:44 ibtmp1
-rw-r-----. 1 mysql mysql  10485760 9 9 20:44 ibdata1
-rw-r-----. 1 mysql mysql 104857600 9 9 20:44 ib_logfile0
-rw-r-----. 1 mysql mysql    107011 9 9 20:54 mysql.err

[root@localhost mysql]# chown -R mysql:mysql *.pem
[root@localhost mysql]# ls -lrt
30172
-rw-r-----. 1 mysql mysql 104857600 321 16:25 ib_logfile1
-rw-r-----. 1 mysql mysql 104857600 321 16:25 ib_logfile2
drwxr-x---. 2 mysql mysql        48 321 16:25 undo
-rw-r-----. 1 mysql mysql        56 321 16:25 auto.cnf
drwxr-x---. 2 mysql mysql      8192 321 16:25 performance_schema
drwxr-x---. 2 mysql mysql      4096 321 16:25 mysql
drwxr-x---. 2 mysql mysql      8192 321 16:25 sys
-rw-r-----. 1 mysql mysql       177 321 16:25 binlog.000001
-rw-r--r--. 1 mysql mysql      1679 321 16:26 ca-key.pem
-rw-r--r--. 1 mysql mysql      1107 321 16:26 ca.pem
-rw-r--r--. 1 mysql mysql      1679 321 16:26 server-key.pem
-rw-r--r--. 1 mysql mysql      1107 321 16:26 server-cert.pem
-rw-r--r--. 1 mysql mysql      1675 321 16:26 client-key.pem
-rw-r--r--. 1 mysql mysql      1107 321 16:26 client-cert.pem
-rw-r--r--. 1 mysql mysql      1675 321 16:26 private_key.pem
-rw-r--r--. 1 mysql mysql       451 321 16:26 public_key.pem
-rw-r-----. 1 mysql mysql    114688 524 17:00 ts2.ibd
-rw-r-----. 1 mysql mysql     98304 524 17:01 ts1.ibd
drwxr-x---. 2 mysql mysql        32 524 17:11 test
-rw-r-----. 1 mysql mysql      9352 621 10:46 binlog.000002
-rw-r-----. 1 mysql mysql       177 621 10:46 binlog.000003
-rw-r-----. 1 mysql mysql       154 9 9 19:55 binlog.000004
-rw-r-----. 1 mysql mysql       177 9 9 20:23 binlog.000005
-rw-r-----. 1 mysql mysql       177 9 9 20:38 binlog.000006
-rw-r-----. 1 mysql mysql       177 9 9 20:44 binlog.000007
-rw-r-----. 1 mysql mysql       122 9 9 20:44 ib_buffer_pool
-rw-r-----. 1 mysql mysql       248 9 9 20:44 binlog.index
-rw-r-----. 1 mysql mysql       154 9 9 20:44 binlog.000008
-rw-r-----. 1 mysql mysql         6 9 9 20:44 mysqld.pid
-rw-r-----. 1 mysql mysql  12582912 9 9 20:44 ibtmp1
-rw-r-----. 1 mysql mysql  10485760 9 9 20:44 ibdata1
-rw-r-----. 1 mysql mysql 104857600 9 9 20:44 ib_logfile0
-rw-r-----. 1 mysql mysql    107011 9 9 20:54 mysql.err

pem文件权限太多可能会出现如下错误

[mysql@localhost mysql]$ mysql -h 10.11.13.19 -P 3306 -u root -pabcd123 --ssl-cert=/mysqldata/mysql/client-cert.pem --ssl-key=/mysqldata/mysql/client-key.pem
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2026 (HY000): SSL connection error: SSL_CTX_set_default_verify_paths failed


[root@localhost mysql]# service mysqld restart
Shutting down MySQL.. SUCCESS!
Starting MySQL.. SUCCESS!

[mysql@localhost mysql]$ mysql -h 10.11.13.19 -P 3306 -u root -pabcd123 --ssl-cert=/mysqldata/mysql/client-cert.pem --ssl-key=/mysqldata/mysql/client-key.pem
mysql: [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 4
Server version: 5.7.26-log Source distribution

Copyright (c) 2000, 2019, 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> \s
--------------
mysql  Ver 14.14 Distrib 5.7.26, for Linux (x86_64) using  EditLine wrapper

Connection id:          4
Current database:
Current user:           root@10.11.13.19
SSL:                    Cipher in use is DHE-RSA-AES256-SHA
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.7.26-log Source distribution
Protocol version:       10
Connection:             10.11.13.19 via TCP/IP
Server characterset:    utf8mb4
Db     characterset:    utf8mb4
Client characterset:    gb2312
Conn.  characterset:    gb2312
TCP port:               3306
Uptime:                 59 sec

Threads: 2  Questions: 11  Slow queries: 0  Opens: 108  Flush tables: 1  Open tables: 101  Queries per second avg: 0.186
--------------

创建用户限制用户必须用ssl登录

mysql> create user 'jy'@'%' identified by "123";
Query OK, 0 rows affected (0.02 sec)

mysql> grant all on *.* to 'jy'@'%' require ssl;
Query OK, 0 rows affected, 1 warning (0.02 sec)

虽然要求用ssl但是还是可以使用密码登录,是因为mysql.user表中的ssl_type=ANY

[mysql@localhost ~]$  mysql -h 10.11.13.19 -P 3306 -u jy -p123
mysql: [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 7
Server version: 5.7.26-log Source distribution

Copyright (c) 2000, 2019, 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> \s
--------------
mysql  Ver 14.14 Distrib 5.7.26, for Linux (x86_64) using  EditLine wrapper

Connection id:          7
Current database:
Current user:           jy@10.11.13.19
SSL:                    Cipher in use is DHE-RSA-AES256-SHA
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.7.26-log Source distribution
Protocol version:       10
Connection:             10.11.13.19 via TCP/IP
Server characterset:    utf8mb4
Db     characterset:    utf8mb4
Client characterset:    gb2312
Conn.  characterset:    gb2312
TCP port:               3306
Uptime:                 50 min 18 sec

Threads: 2  Questions: 69  Slow queries: 0  Opens: 139  Flush tables: 1  Open tables: 132  Queries per second avg: 0.022
--------------

mysql> select * from user where user='jy'\G
ERROR 1046 (3D000): No database selected
mysql> select * from mysql.user where user='root'\G
*************************** 1. row ***************************
                  Host: %
                  User: jy
           Select_priv: Y
           Insert_priv: Y
           Update_priv: Y
           Delete_priv: Y
           Create_priv: Y
             Drop_priv: Y
           Reload_priv: Y
         Shutdown_priv: Y
          Process_priv: Y
             File_priv: Y
            Grant_priv: Y
       References_priv: Y
            Index_priv: Y
            Alter_priv: Y
          Show_db_priv: Y
            Super_priv: Y
 Create_tmp_table_priv: Y
      Lock_tables_priv: Y
          Execute_priv: Y
       Repl_slave_priv: Y
      Repl_client_priv: Y
      Create_view_priv: Y
        Show_view_priv: Y
   Create_routine_priv: Y
    Alter_routine_priv: Y
      Create_user_priv: Y
            Event_priv: Y
          Trigger_priv: Y
Create_tablespace_priv: Y
              ssl_type: ANY
            ssl_cipher:
           x509_issuer:
          x509_subject:
         max_questions: 0
           max_updates: 0
       max_connections: 0
  max_user_connections: 0
                plugin: mysql_native_password
 authentication_string: *1AA476D99C1600C9D984E248FBF2FDE3A0BB256E
      password_expired: N
 password_last_changed: 2022-03-21 16:27:48
     password_lifetime: NULL
        account_locked: N
1 row in set (0.00 sec)

修改用户jy的ssl类型为x509

mysql> alter user 'jy'@'%' require x509
    -> ;
Query OK, 0 rows affected (0.01 sec)

在不指定ssl密钥时就不能登录了

[mysql@localhost ~]$ mysql -h 10.11.13.19 -P 3306 -u jy -p123
mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 1045 (28000): Access denied for user 'jy'@'10.11.13.19' (using password: YES)
[mysql@localhost ~]$  mysql -h 10.11.13.19 -P 3306 -u jy -p123 --ssl
mysql: [Warning] Using a password on the command line interface can be insecure.
WARNING: --ssl is deprecated and will be removed in a future version. Use --ssl-mode instead.
ERROR 1045 (28000): Access denied for user 'jy'@'10.11.13.19' (using password: YES)

指定ssl密钥进行登录

[mysql@localhost ~]$  mysql -h 10.11.13.19 -P 3306 -u jy -p123 --ssl-cert=/mysqldata/mysql/client-cert.pem --ssl-key=/mysqldata/mysql/client-key.pem
mysql: [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 9
Server version: 5.7.26-log Source distribution

Copyright (c) 2000, 2019, 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> exit

如果指定ssl密钥进行登录时不指定密钥完整路径时会出现如下错误

[mysql@localhost ~]$  mysql -h 10.11.13.19 -P 3306 -u jy -p123 --ssl-cert=client-cert.pem --ssl-key=client-key.pem
mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [ERROR] SSL error: Unable to get certificate from 'client-cert.pem'
ERROR 2026 (HY000): SSL connection error: Unable to get certificate

Oracle Linux 7.1 静默安装Oracle 18c RAC

Oracle Linux 7.1 静默安装Oracle 18c RAC
一·系统环境规则

1.1网络架构

                         节点1                        节点2
主机名                   18c1                         18c2               
Private IP            88.88.87.1                 88.88.87.2             
Public IP             10.10.13.171             10.10.13.172
VIP                   10.10.13.173             10.10.13.174
SCANIP                10.10.13.175/176/177   
SCAN_NAME             scan-18c

1.2 存储

共享磁盘                ASM磁盘                ASM磁盘组                 大小         冗余
/dev/sdb                /dev/asmdisk1          OCR                       50G          外部
/dev/sdc                /dev/asmdisk2          DATA                      50G          外部

1.3 软件版本
操作系统:Oracle Linux 7.1
集群软件: Oracle Clusterware 18.0.0
数据库软件:Oracle Database Enterprise 18.0.0

二·安装环境准备
2.1修改主机名和IP地址
修改主机名

[root@localhost ~]# hostnamectl set-hostname 18c1
[root@localhost ~]# hostnamectl set-hostname 18c2

2.2修改Private IP地址

[root@18c1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=ens33
UUID=934ab90a-5e97-496c-bd50-65cddd0a838f
DEVICE=ens33
ONBOOT=yes
IPADDR=88.88.87.1
NETMASK=255.255.255.0



[root@18c2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=ens33
UUID=934ab90a-5e97-496c-bd50-65cddd0a838f
DEVICE=ens33
ONBOOT=yes
IPADDR=88.88.87.2
NETMASK=255.255.255.0

2.3 修改Public IP地址

[root@18c1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens32
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=ens32
UUID=79732427-976c-4d80-b58d-dd81d62ebd17
DEVICE=ens32
ONBOOT=yes
IPADDR=10.10.13.171
NETMASK=255.255.255.0
GATEWAY=10.10.13.254

[root@18c2 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens32
TYPE=Ethernet
BOOTPROTO=static
DEFROUTE=yes
PEERDNS=yes
PEERROUTES=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_FAILURE_FATAL=no
NAME=ens32
UUID=79732427-976c-4d80-b58d-dd81d62ebd17
DEVICE=ens32
ONBOOT=yes
IPADDR=10.10.13.172
NETMASK=255.255.255.0
GATEWAY=10.10.13.254

2.4 关闭时间同步服务

[root@18c1 ~]# systemctl stop chronyd
[root@18c1 ~]# systemctl disable chronyd
rm '/etc/systemd/system/multi-user.target.wants/chronyd.service'
[root@18c1 ~]# mv /etc/chrony.conf /etc/chrony.conf.bak


[root@18c2 ~]# systemctl stop chronyd
[root@18c2 ~]# systemctl disable chronyd
rm '/etc/systemd/system/multi-user.target.wants/chronyd.service'
[root@18c2 ~]# mv /etc/chrony.conf /etc/chrony.conf.bak

2.5关闭防火墙和SELinux

[root@18c1 ~]# setenforce 0
[root@18c1 ~]# sed -i "/^SELINUX=/s#enforcing#disabled#" /etc/selinux/config
[root@18c1 ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 


[root@18c2 ~]# setenforce 0
[root@18c2 ~]# sed -i "/^SELINUX=/s#enforcing#disabled#" /etc/selinux/config
[root@18c2 ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 

2.6 配置本地YUM

[root@18c1 ~]# ls -lrt /etc/yum.repos.d/
total 4
-rw-r--r--. 1 root root 2323 Feb 16  2015 public-yum-ol7.repo
[root@18c1 ~]# mv /etc/yum.repos.d/public-yum-ol7.repo /etc/yum.repos.d/public-yum-ol7.repo.bak
[root@18c1 ~]# cat >> /etc/yum.repos.d/jy.repo < [base]
> name=jy
> baseurl=file:///run/media/root/OL-7.1\ Server.x86_64/  
> enabled=1
> gpgcheck=0
> multilib_policy=all
> EOF
[root@18c1 ~]# cat /etc/yum.repos.d/jy.repo
[base]
name=jy
baseurl=file:///run/media/root/OL-7.1\ Server.x86_64/  
enabled=1
gpgcheck=0
multilib_policy=all

[root@18c1 ~]# yum clean all
Loaded plugins: langpacks
Cleaning repos: base
Cleaning up everything
[root@18c1 ~]# yum makecache
Loaded plugins: langpacks
base                                                                                                                                                                                                                | 3.6 kB  00:00:00     
(1/4): base/group_gz                                                                                                                                                                                                | 134 kB  00:00:00     
(2/4): base/filelists_db                                                                                                                                                                                            | 3.4 MB  00:00:00     
(3/4): base/primary_db                                                                                                                                                                                              | 4.0 MB  00:00:00     
(4/4): base/other_db                                                                                                                                                                                                | 1.3 MB  00:00:00     
Metadata Cache Created



[root@18c2 ~]# ls -lrt /etc/yum.repos.d/
total 4
-rw-r--r--. 1 root root 2323 Feb 16  2015 public-yum-ol7.repo
[root@18c2 ~]# mv /etc/yum.repos.d/public-yum-ol7.repo /etc/yum.repos.d/public-yum-ol7.repo.bak
[root@18c2 ~]# cat >> /etc/yum.repos.d/jy.repo < [base]
> name=jy
> baseurl=file:///run/media/root/OL-7.1\ Server.x86_64/  
> enabled=1
> gpgcheck=0
> multilib_policy=all
> EOF
[root@18c2 ~]# cat /etc/yum.repos.d/jy.repo
[base]
name=jy
baseurl=file:///run/media/root/OL-7.1\ Server.x86_64/  
enabled=1
gpgcheck=0
multilib_policy=all



[root@18c2 ~]# yum makecache
Loaded plugins: langpacks
base                                                                                                                                                                                                                | 3.6 kB  00:00:00     
(1/4): base/group_gz                                                                                                                                                                                                | 134 kB  00:00:00     
(2/4): base/filelists_db                                                                                                                                                                                            | 3.4 MB  00:00:00     
(3/4): base/primary_db                                                                                                                                                                                              | 4.0 MB  00:00:00     
(4/4): base/other_db                                                                                                                                                                                                | 1.3 MB  00:00:00     
Metadata Cache Created

2.7 禁用NTP

[root@18c1 ~]# systemctl stop ntpd.service
[root@18c1 ~]# systemctl disable ntpd.service

[root@18c2 ~]# systemctl stop ntpd.service
[root@18c2 ~]# systemctl disable ntpd.service

2.8创建用户和组
创建用户组

[root@18c1 ~]# groupadd -g 54321 oinstall
[root@18c1 ~]# groupadd -g 54322 dba
[root@18c1 ~]# groupadd -g 54323 oper
[root@18c1 ~]# groupadd -g 54324 backupdba
[root@18c1 ~]# groupadd -g 54325 dgdba
[root@18c1 ~]# groupadd -g 54326 kmdba
[root@18c1 ~]# groupadd -g 54327 asmdba
[root@18c1 ~]# groupadd -g 54328 asmoper
[root@18c1 ~]# groupadd -g 54329 asmadmin
[root@18c1 ~]# groupadd -g 54330 racdba

[root@18c1 ~]# grep 543 /etc/group
oinstall:x:54321:
dba:x:54322:
oper:x:54323:
backupdba:x:54324:
dgdba:x:54325:
kmdba:x:54326:
asmdba:x:54327:
asmoper:x:54328:
asmadmin:x:54329:
racdba:x:54330:

[root@18c2 ~]# groupadd -g 54321 oinstall
[root@18c2 ~]# groupadd -g 54322 dba
[root@18c2 ~]# groupadd -g 54323 oper
[root@18c2 ~]# groupadd -g 54324 backupdba
[root@18c2 ~]# groupadd -g 54325 dgdba
[root@18c2 ~]# groupadd -g 54326 kmdba
[root@18c2 ~]# groupadd -g 54327 asmdba
[root@18c2 ~]# groupadd -g 54328 asmoper
[root@18c2 ~]# groupadd -g 54329 asmadmin
[root@18c2 ~]# groupadd -g 54330 racdba
[root@18c2 ~]# grep 543 /etc/group
oinstall:x:54321:
dba:x:54322:
oper:x:54323:
backupdba:x:54324:
dgdba:x:54325:
kmdba:x:54326:
asmdba:x:54327:
asmoper:x:54328:
asmadmin:x:54329:
racdba:x:54330:

创建用户

[root@18c1 ~]# useradd -u 54322 -g oinstall -G asmadmin,asmdba,asmoper,racdba grid
[root@18c1 ~]# useradd -u 54321 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle
[root@18c1 ~]# passwd grid
Changing password for user grid.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@18c1 ~]# passwd oracle
Changing password for user oracle.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: all authentication tokens updated successfully.


[root@18c2 ~]# useradd -u 54322 -g oinstall -G asmadmin,asmdba,asmoper,racdba grid
[root@18c2 ~]# useradd -u 54321 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle
[root@18c2 ~]# passwd grid
Changing password for user grid.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@18c2 ~]# passwd oracle
Changing password for user oracle.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: all authentication tokens updated successfully.

2.9创建相关目录

[root@18c1 ~]# mkdir -p /u01/tmp
[root@18c1 ~]# mkdir -p /u01/app/18.3/grid
[root@18c1 ~]# mkdir -p /u01/app/grid
[root@18c1 ~]# mkdir -p /u01/app/oracle/product/18.3/db
[root@18c1 ~]# mkdir -p /u01/app/oraInventory
[root@18c1 ~]# chown -R grid:oinstall /u01
[root@18c1 ~]# chown oracle:oinstall /u01/app/oracle
[root@18c1 ~]# chmod -R 775 /u01/

[root@18c2 ~]# mkdir -p /u01/tmp
[root@18c2 ~]# mkdir -p /u01/app/18.3/grid
[root@18c2 ~]# mkdir -p /u01/app/grid
[root@18c2 ~]# mkdir -p /u01/app/oracle/product/18.3/db
[root@18c2 ~]# mkdir -p /u01/app/oraInventory
[root@18c2 ~]# chown -R grid:oinstall /u01
[root@18c2 ~]# chown oracle:oinstall /u01/app/oracle
[root@18c2 ~]# chmod -R 775 /u01/

2.10 安装软件包

[root@18c1 ~]# yum install -y bc binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc libstdc++ libstdc++-devel libxcb make net-tools nfs-utils python  python-configshell  python-rtslib python-six targetcli smartmontools sysstat gcc c-c++ gcc-info gcc-locale gcc48 gcc48-info gcc48-locale gcc48-c++
Loaded plugins: langpacks
Package bc-1.06.95-13.el7.x86_64 already installed and latest version
Package binutils-2.23.52.0.1-30.el7.x86_64 already installed and latest version
Package compat-libcap1-1.10-7.el7.x86_64 already installed and latest version
No package compat-libstdc++ available.
Package elfutils-libelf-0.160-1.el7.x86_64 already installed and latest version
Package glibc-2.17-78.0.1.el7.x86_64 already installed and latest version
Package glibc-devel-2.17-78.0.1.el7.x86_64 already installed and latest version
Package libaio-0.3.109-12.el7.x86_64 already installed and latest version
Package libX11-1.6.0-2.1.el7.x86_64 already installed and latest version
Package libXau-1.0.8-2.1.el7.x86_64 already installed and latest version
Package libXi-1.7.2-2.1.el7.x86_64 already installed and latest version
Package libXtst-1.2.2-2.1.el7.x86_64 already installed and latest version
Package libXrender-0.9.8-2.1.el7.x86_64 already installed and latest version
Package libgcc-4.8.3-9.el7.x86_64 already installed and latest version
Package libstdc++-4.8.3-9.el7.x86_64 already installed and latest version
Package libstdc++-devel-4.8.3-9.el7.x86_64 already installed and latest version
Package libxcb-1.9-5.el7.x86_64 already installed and latest version
Package 1:make-3.82-21.el7.x86_64 already installed and latest version
Package net-tools-2.0-0.17.20131004git.el7.x86_64 already installed and latest version
Package 1:nfs-utils-1.3.0-0.8.el7.x86_64 already installed and latest version
Package python-2.7.5-16.el7.x86_64 already installed and latest version
Package 1:python-configshell-1.1.fb14-1.el7.noarch already installed and latest version
Package python-rtslib-2.1.fb50-1.el7.noarch already installed and latest version
Package python-six-1.3.0-4.el7.noarch already installed and latest version
Package targetcli-2.1.fb37-3.el7.noarch already installed and latest version
Package 1:smartmontools-6.2-4.el7.x86_64 already installed and latest version
Package sysstat-10.1.5-7.el7.x86_64 already installed and latest version
Package gcc-4.8.3-9.el7.x86_64 already installed and latest version
No package c-c++ available.
No package gcc-info available.
No package gcc-locale available.
No package gcc48 available.
No package gcc48-info available.
No package gcc48-locale available.
No package gcc48-c++ available.
Resolving Dependencies
--> Running transaction check
---> Package elfutils-libelf-devel.x86_64 0:0.160-1.el7 will be installed
---> Package fontconfig-devel.x86_64 0:2.10.95-7.el7 will be installed
--> Processing Dependency: freetype-devel >= 2.1.4 for package: fontconfig-devel-2.10.95-7.el7.x86_64
--> Processing Dependency: pkgconfig(freetype2) for package: fontconfig-devel-2.10.95-7.el7.x86_64
--> Processing Dependency: pkgconfig(expat) for package: fontconfig-devel-2.10.95-7.el7.x86_64
---> Package ksh.x86_64 0:20120801-22.el7 will be installed
---> Package libXrender-devel.x86_64 0:0.9.8-2.1.el7 will be installed
--> Processing Dependency: pkgconfig(renderproto) >= 0.9 for package: libXrender-devel-0.9.8-2.1.el7.x86_64
--> Processing Dependency: pkgconfig(xproto) for package: libXrender-devel-0.9.8-2.1.el7.x86_64
--> Processing Dependency: pkgconfig(x11) for package: libXrender-devel-0.9.8-2.1.el7.x86_64
---> Package libaio-devel.x86_64 0:0.3.109-12.el7 will be installed
--> Running transaction check
---> Package expat-devel.x86_64 0:2.1.0-8.el7 will be installed
---> Package freetype-devel.x86_64 0:2.4.11-9.el7 will be installed
--> Processing Dependency: zlib-devel for package: freetype-devel-2.4.11-9.el7.x86_64
---> Package libX11-devel.x86_64 0:1.6.0-2.1.el7 will be installed
--> Processing Dependency: pkgconfig(xcb) >= 1.1.92 for package: libX11-devel-1.6.0-2.1.el7.x86_64
--> Processing Dependency: pkgconfig(xcb) for package: libX11-devel-1.6.0-2.1.el7.x86_64
---> Package xorg-x11-proto-devel.noarch 0:7.7-8.el7.1 will be installed
--> Running transaction check
---> Package libxcb-devel.x86_64 0:1.9-5.el7 will be installed
--> Processing Dependency: pkgconfig(xau) >= 0.99.2 for package: libxcb-devel-1.9-5.el7.x86_64
---> Package zlib-devel.x86_64 0:1.2.7-13.el7 will be installed
--> Running transaction check
---> Package libXau-devel.x86_64 0:1.0.8-2.1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================================================================================================================
 Package                                                           Arch                                               Version                                                       Repository                                        Size
===========================================================================================================================================================================================================================================
Installing:
 elfutils-libelf-devel                                             x86_64                                             0.160-1.el7                                                   base                                              34 k
 fontconfig-devel                                                  x86_64                                             2.10.95-7.el7                                                 base                                             127 k
 ksh                                                               x86_64                                             20120801-22.el7                                               base                                             879 k
 libXrender-devel                                                  x86_64                                             0.9.8-2.1.el7                                                 base                                              16 k
 libaio-devel                                                      x86_64                                             0.3.109-12.el7                                                base                                              12 k
Installing for dependencies:
 expat-devel                                                       x86_64                                             2.1.0-8.el7                                                   base                                              56 k
 freetype-devel                                                    x86_64                                             2.4.11-9.el7                                                  base                                             354 k
 libX11-devel                                                      x86_64                                             1.6.0-2.1.el7                                                 base                                             978 k
 libXau-devel                                                      x86_64                                             1.0.8-2.1.el7                                                 base                                              14 k
 libxcb-devel                                                      x86_64                                             1.9-5.el7                                                     base                                             1.0 M
 xorg-x11-proto-devel                                              noarch                                             7.7-8.el7.1                                                   base                                             280 k
 zlib-devel                                                        x86_64                                             1.2.7-13.el7                                                  base                                              49 k

Transaction Summary
===========================================================================================================================================================================================================================================
Install  5 Packages (+7 Dependent packages)

Total download size: 3.7 M
Installed size: 12 M
Downloading packages:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                       15 MB/s | 3.7 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : xorg-x11-proto-devel-7.7-8.el7.1.noarch                                                                                                                                                                                1/12 
  Installing : libXau-devel-1.0.8-2.1.el7.x86_64                                                                                                                                                                                      2/12 
  Installing : libxcb-devel-1.9-5.el7.x86_64                                                                                                                                                                                          3/12 
  Installing : libX11-devel-1.6.0-2.1.el7.x86_64                                                                                                                                                                                      4/12 
  Installing : expat-devel-2.1.0-8.el7.x86_64                                                                                                                                                                                         5/12 
  Installing : zlib-devel-1.2.7-13.el7.x86_64                                                                                                                                                                                         6/12 
  Installing : freetype-devel-2.4.11-9.el7.x86_64                                                                                                                                                                                     7/12 
  Installing : fontconfig-devel-2.10.95-7.el7.x86_64                                                                                                                                                                                  8/12 
  Installing : libXrender-devel-0.9.8-2.1.el7.x86_64                                                                                                                                                                                  9/12 
  Installing : libaio-devel-0.3.109-12.el7.x86_64                                                                                                                                                                                    10/12 
  Installing : elfutils-libelf-devel-0.160-1.el7.x86_64                                                                                                                                                                              11/12 
  Installing : ksh-20120801-22.el7.x86_64                                                                                                                                                                                            12/12 
  Verifying  : ksh-20120801-22.el7.x86_64                                                                                                                                                                                             1/12 
  Verifying  : libXrender-devel-0.9.8-2.1.el7.x86_64                                                                                                                                                                                  2/12 
  Verifying  : zlib-devel-1.2.7-13.el7.x86_64                                                                                                                                                                                         3/12 
  Verifying  : libxcb-devel-1.9-5.el7.x86_64                                                                                                                                                                                          4/12 
  Verifying  : libX11-devel-1.6.0-2.1.el7.x86_64                                                                                                                                                                                      5/12 
  Verifying  : expat-devel-2.1.0-8.el7.x86_64                                                                                                                                                                                         6/12 
  Verifying  : xorg-x11-proto-devel-7.7-8.el7.1.noarch                                                                                                                                                                                7/12 
  Verifying  : elfutils-libelf-devel-0.160-1.el7.x86_64                                                                                                                                                                               8/12 
  Verifying  : libaio-devel-0.3.109-12.el7.x86_64                                                                                                                                                                                     9/12 
  Verifying  : fontconfig-devel-2.10.95-7.el7.x86_64                                                                                                                                                                                 10/12 
  Verifying  : freetype-devel-2.4.11-9.el7.x86_64                                                                                                                                                                                    11/12 
  Verifying  : libXau-devel-1.0.8-2.1.el7.x86_64                                                                                                                                                                                     12/12 

Installed:
  elfutils-libelf-devel.x86_64 0:0.160-1.el7          fontconfig-devel.x86_64 0:2.10.95-7.el7          ksh.x86_64 0:20120801-22.el7          libXrender-devel.x86_64 0:0.9.8-2.1.el7          libaio-devel.x86_64 0:0.3.109-12.el7         

Dependency Installed:
  expat-devel.x86_64 0:2.1.0-8.el7    freetype-devel.x86_64 0:2.4.11-9.el7    libX11-devel.x86_64 0:1.6.0-2.1.el7    libXau-devel.x86_64 0:1.0.8-2.1.el7    libxcb-devel.x86_64 0:1.9-5.el7    xorg-x11-proto-devel.noarch 0:7.7-8.el7.1   
  zlib-devel.x86_64 0:1.2.7-13.el7   

Complete!

安装compat-libstdc++-33-3.2.3-72.el7.i686.rpm,因为名字带有版本信息

[root@18c1 ~]# yum install  compat-libstdc++-33-3.2.3-72.el7.i686
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package compat-libstdc++-33.i686 0:3.2.3-72.el7 will be installed
--> Processing Dependency: libm.so.6 for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1(GLIBC_2.0) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.3) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.0) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1 for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libc.so.6(GLIBC_2.3) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Running transaction check
---> Package glibc.i686 0:2.17-78.0.1.el7 will be installed
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.17-78.0.1.el7.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.17-78.0.1.el7.i686
---> Package libgcc.i686 0:4.8.3-9.el7 will be installed
--> Running transaction check
---> Package nss-softokn-freebl.i686 0:3.16.2.3-9.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================================================================================================================
 Package                                                          Arch                                              Version                                                        Repository                                         Size
===========================================================================================================================================================================================================================================
Installing:
 compat-libstdc++-33                                              i686                                              3.2.3-72.el7                                                   base                                              196 k
Installing for dependencies:
 glibc                                                            i686                                              2.17-78.0.1.el7                                                base                                              4.2 M
 libgcc                                                           i686                                              4.8.3-9.el7                                                    base                                               99 k
 nss-softokn-freebl                                               i686                                              3.16.2.3-9.el7                                                 base                                              186 k

Transaction Summary
===========================================================================================================================================================================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 4.6 M
Installed size: 16 M
Is this ok [y/d/N]: y
Downloading packages:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                       35 MB/s | 4.6 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libgcc-4.8.3-9.el7.i686                                                                                                                                                                                                 1/4 
  Installing : nss-softokn-freebl-3.16.2.3-9.el7.i686                                                                                                                                                                                  2/4 
  Installing : glibc-2.17-78.0.1.el7.i686                                                                                                                                                                                              3/4 
  Installing : compat-libstdc++-33-3.2.3-72.el7.i686                                                                                                                                                                                   4/4 
  Verifying  : compat-libstdc++-33-3.2.3-72.el7.i686                                                                                                                                                                                   1/4 
  Verifying  : glibc-2.17-78.0.1.el7.i686                                                                                                                                                                                              2/4 
  Verifying  : libgcc-4.8.3-9.el7.i686                                                                                                                                                                                                 3/4 
  Verifying  : nss-softokn-freebl-3.16.2.3-9.el7.i686                                                                                                                                                                                  4/4 

Installed:
  compat-libstdc++-33.i686 0:3.2.3-72.el7                                                                                                                                                                                                  

Dependency Installed:
  glibc.i686 0:2.17-78.0.1.el7                                               libgcc.i686 0:4.8.3-9.el7                                               nss-softokn-freebl.i686 0:3.16.2.3-9.el7                                              

Complete!


[root@18c2 ~]# yum install -y bc binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc libstdc++ libstdc++-devel libxcb make net-tools nfs-utils python  python-configshell  python-rtslib python-six targetcli smartmontools sysstat gcc c-c++ gcc-info gcc-locale gcc48 gcc48-info gcc48-locale gcc48-c++
Loaded plugins: langpacks
Package bc-1.06.95-13.el7.x86_64 already installed and latest version
Package binutils-2.23.52.0.1-30.el7.x86_64 already installed and latest version
Package compat-libcap1-1.10-7.el7.x86_64 already installed and latest version
No package compat-libstdc++ available.
Package elfutils-libelf-0.160-1.el7.x86_64 already installed and latest version
Package glibc-2.17-78.0.1.el7.x86_64 already installed and latest version
Package glibc-devel-2.17-78.0.1.el7.x86_64 already installed and latest version
Package libaio-0.3.109-12.el7.x86_64 already installed and latest version
Package libX11-1.6.0-2.1.el7.x86_64 already installed and latest version
Package libXau-1.0.8-2.1.el7.x86_64 already installed and latest version
Package libXi-1.7.2-2.1.el7.x86_64 already installed and latest version
Package libXtst-1.2.2-2.1.el7.x86_64 already installed and latest version
Package libXrender-0.9.8-2.1.el7.x86_64 already installed and latest version
Package libgcc-4.8.3-9.el7.x86_64 already installed and latest version
Package libstdc++-4.8.3-9.el7.x86_64 already installed and latest version
Package libstdc++-devel-4.8.3-9.el7.x86_64 already installed and latest version
Package libxcb-1.9-5.el7.x86_64 already installed and latest version
Package 1:make-3.82-21.el7.x86_64 already installed and latest version
Package net-tools-2.0-0.17.20131004git.el7.x86_64 already installed and latest version
Package 1:nfs-utils-1.3.0-0.8.el7.x86_64 already installed and latest version
Package python-2.7.5-16.el7.x86_64 already installed and latest version
Package 1:python-configshell-1.1.fb14-1.el7.noarch already installed and latest version
Package python-rtslib-2.1.fb50-1.el7.noarch already installed and latest version
Package python-six-1.3.0-4.el7.noarch already installed and latest version
Package targetcli-2.1.fb37-3.el7.noarch already installed and latest version
Package 1:smartmontools-6.2-4.el7.x86_64 already installed and latest version
Package sysstat-10.1.5-7.el7.x86_64 already installed and latest version
Package gcc-4.8.3-9.el7.x86_64 already installed and latest version
No package c-c++ available.
No package gcc-info available.
No package gcc-locale available.
No package gcc48 available.
No package gcc48-info available.
No package gcc48-locale available.
No package gcc48-c++ available.
Resolving Dependencies
--> Running transaction check
---> Package elfutils-libelf-devel.x86_64 0:0.160-1.el7 will be installed
---> Package fontconfig-devel.x86_64 0:2.10.95-7.el7 will be installed
--> Processing Dependency: freetype-devel >= 2.1.4 for package: fontconfig-devel-2.10.95-7.el7.x86_64
--> Processing Dependency: pkgconfig(freetype2) for package: fontconfig-devel-2.10.95-7.el7.x86_64
--> Processing Dependency: pkgconfig(expat) for package: fontconfig-devel-2.10.95-7.el7.x86_64
---> Package ksh.x86_64 0:20120801-22.el7 will be installed
---> Package libXrender-devel.x86_64 0:0.9.8-2.1.el7 will be installed
--> Processing Dependency: pkgconfig(renderproto) >= 0.9 for package: libXrender-devel-0.9.8-2.1.el7.x86_64
--> Processing Dependency: pkgconfig(xproto) for package: libXrender-devel-0.9.8-2.1.el7.x86_64
--> Processing Dependency: pkgconfig(x11) for package: libXrender-devel-0.9.8-2.1.el7.x86_64
---> Package libaio-devel.x86_64 0:0.3.109-12.el7 will be installed
--> Running transaction check
---> Package expat-devel.x86_64 0:2.1.0-8.el7 will be installed
---> Package freetype-devel.x86_64 0:2.4.11-9.el7 will be installed
--> Processing Dependency: zlib-devel for package: freetype-devel-2.4.11-9.el7.x86_64
---> Package libX11-devel.x86_64 0:1.6.0-2.1.el7 will be installed
--> Processing Dependency: pkgconfig(xcb) >= 1.1.92 for package: libX11-devel-1.6.0-2.1.el7.x86_64
--> Processing Dependency: pkgconfig(xcb) for package: libX11-devel-1.6.0-2.1.el7.x86_64
---> Package xorg-x11-proto-devel.noarch 0:7.7-8.el7.1 will be installed
--> Running transaction check
---> Package libxcb-devel.x86_64 0:1.9-5.el7 will be installed
--> Processing Dependency: pkgconfig(xau) >= 0.99.2 for package: libxcb-devel-1.9-5.el7.x86_64
---> Package zlib-devel.x86_64 0:1.2.7-13.el7 will be installed
--> Running transaction check
---> Package libXau-devel.x86_64 0:1.0.8-2.1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================================================================================================================
 Package                                                           Arch                                               Version                                                       Repository                                        Size
===========================================================================================================================================================================================================================================
Installing:
 elfutils-libelf-devel                                             x86_64                                             0.160-1.el7                                                   base                                              34 k
 fontconfig-devel                                                  x86_64                                             2.10.95-7.el7                                                 base                                             127 k
 ksh                                                               x86_64                                             20120801-22.el7                                               base                                             879 k
 libXrender-devel                                                  x86_64                                             0.9.8-2.1.el7                                                 base                                              16 k
 libaio-devel                                                      x86_64                                             0.3.109-12.el7                                                base                                              12 k
Installing for dependencies:
 expat-devel                                                       x86_64                                             2.1.0-8.el7                                                   base                                              56 k
 freetype-devel                                                    x86_64                                             2.4.11-9.el7                                                  base                                             354 k
 libX11-devel                                                      x86_64                                             1.6.0-2.1.el7                                                 base                                             978 k
 libXau-devel                                                      x86_64                                             1.0.8-2.1.el7                                                 base                                              14 k
 libxcb-devel                                                      x86_64                                             1.9-5.el7                                                     base                                             1.0 M
 xorg-x11-proto-devel                                              noarch                                             7.7-8.el7.1                                                   base                                             280 k
 zlib-devel                                                        x86_64                                             1.2.7-13.el7                                                  base                                              49 k

Transaction Summary
===========================================================================================================================================================================================================================================
Install  5 Packages (+7 Dependent packages)

Total download size: 3.7 M
Installed size: 12 M
Downloading packages:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                      7.4 MB/s | 3.7 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : xorg-x11-proto-devel-7.7-8.el7.1.noarch                                                                                                                                                                                1/12 
  Installing : libXau-devel-1.0.8-2.1.el7.x86_64                                                                                                                                                                                      2/12 
  Installing : libxcb-devel-1.9-5.el7.x86_64                                                                                                                                                                                          3/12 
  Installing : libX11-devel-1.6.0-2.1.el7.x86_64                                                                                                                                                                                      4/12 
  Installing : expat-devel-2.1.0-8.el7.x86_64                                                                                                                                                                                         5/12 
  Installing : zlib-devel-1.2.7-13.el7.x86_64                                                                                                                                                                                         6/12 
  Installing : freetype-devel-2.4.11-9.el7.x86_64                                                                                                                                                                                     7/12 
  Installing : fontconfig-devel-2.10.95-7.el7.x86_64                                                                                                                                                                                  8/12 
  Installing : libXrender-devel-0.9.8-2.1.el7.x86_64                                                                                                                                                                                  9/12 
  Installing : libaio-devel-0.3.109-12.el7.x86_64                                                                                                                                                                                    10/12 
  Installing : elfutils-libelf-devel-0.160-1.el7.x86_64                                                                                                                                                                              11/12 
  Installing : ksh-20120801-22.el7.x86_64                                                                                                                                                                                            12/12 
  Verifying  : ksh-20120801-22.el7.x86_64                                                                                                                                                                                             1/12 
  Verifying  : libXrender-devel-0.9.8-2.1.el7.x86_64                                                                                                                                                                                  2/12 
  Verifying  : zlib-devel-1.2.7-13.el7.x86_64                                                                                                                                                                                         3/12 
  Verifying  : libxcb-devel-1.9-5.el7.x86_64                                                                                                                                                                                          4/12 
  Verifying  : libX11-devel-1.6.0-2.1.el7.x86_64                                                                                                                                                                                      5/12 
  Verifying  : expat-devel-2.1.0-8.el7.x86_64                                                                                                                                                                                         6/12 
  Verifying  : xorg-x11-proto-devel-7.7-8.el7.1.noarch                                                                                                                                                                                7/12 
  Verifying  : elfutils-libelf-devel-0.160-1.el7.x86_64                                                                                                                                                                               8/12 
  Verifying  : libaio-devel-0.3.109-12.el7.x86_64                                                                                                                                                                                     9/12 
  Verifying  : fontconfig-devel-2.10.95-7.el7.x86_64                                                                                                                                                                                 10/12 
  Verifying  : freetype-devel-2.4.11-9.el7.x86_64                                                                                                                                                                                    11/12 
  Verifying  : libXau-devel-1.0.8-2.1.el7.x86_64                                                                                                                                                                                     12/12 

Installed:
  elfutils-libelf-devel.x86_64 0:0.160-1.el7          fontconfig-devel.x86_64 0:2.10.95-7.el7          ksh.x86_64 0:20120801-22.el7          libXrender-devel.x86_64 0:0.9.8-2.1.el7          libaio-devel.x86_64 0:0.3.109-12.el7         

Dependency Installed:
  expat-devel.x86_64 0:2.1.0-8.el7    freetype-devel.x86_64 0:2.4.11-9.el7    libX11-devel.x86_64 0:1.6.0-2.1.el7    libXau-devel.x86_64 0:1.0.8-2.1.el7    libxcb-devel.x86_64 0:1.9-5.el7    xorg-x11-proto-devel.noarch 0:7.7-8.el7.1   
  zlib-devel.x86_64 0:1.2.7-13.el7   

Complete!

安装compat-libstdc++-33-3.2.3-72.el7.i686.rpm,因为名字带有版本信息

[root@18c2 ~]# yum install  compat-libstdc++-33-3.2.3-72.el7.i686
Loaded plugins: langpacks
Resolving Dependencies
--> Running transaction check
---> Package compat-libstdc++-33.i686 0:3.2.3-72.el7 will be installed
--> Processing Dependency: libm.so.6 for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1(GLIBC_2.0) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.3) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1(GCC_3.0) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libgcc_s.so.1 for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Processing Dependency: libc.so.6(GLIBC_2.3) for package: compat-libstdc++-33-3.2.3-72.el7.i686
--> Running transaction check
---> Package glibc.i686 0:2.17-78.0.1.el7 will be installed
--> Processing Dependency: libfreebl3.so(NSSRAWHASH_3.12.3) for package: glibc-2.17-78.0.1.el7.i686
--> Processing Dependency: libfreebl3.so for package: glibc-2.17-78.0.1.el7.i686
---> Package libgcc.i686 0:4.8.3-9.el7 will be installed
--> Running transaction check
---> Package nss-softokn-freebl.i686 0:3.16.2.3-9.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================================================================================================================
 Package                                                          Arch                                              Version                                                        Repository                                         Size
===========================================================================================================================================================================================================================================
Installing:
 compat-libstdc++-33                                              i686                                              3.2.3-72.el7                                                   base                                              196 k
Installing for dependencies:
 glibc                                                            i686                                              2.17-78.0.1.el7                                                base                                              4.2 M
 libgcc                                                           i686                                              4.8.3-9.el7                                                    base                                               99 k
 nss-softokn-freebl                                               i686                                              3.16.2.3-9.el7                                                 base                                              186 k

Transaction Summary
===========================================================================================================================================================================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 4.6 M
Installed size: 16 M
Is this ok [y/d/N]: y
Downloading packages:
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                       73 MB/s | 4.6 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : libgcc-4.8.3-9.el7.i686                                                                                                                                                                                                 1/4 
  Installing : nss-softokn-freebl-3.16.2.3-9.el7.i686                                                                                                                                                                                  2/4 
  Installing : glibc-2.17-78.0.1.el7.i686                                                                                                                                                                                              3/4 
  Installing : compat-libstdc++-33-3.2.3-72.el7.i686                                                                                                                                                                                   4/4 
  Verifying  : compat-libstdc++-33-3.2.3-72.el7.i686                                                                                                                                                                                   1/4 
  Verifying  : glibc-2.17-78.0.1.el7.i686                                                                                                                                                                                              2/4 
  Verifying  : libgcc-4.8.3-9.el7.i686                                                                                                                                                                                                 3/4 
  Verifying  : nss-softokn-freebl-3.16.2.3-9.el7.i686                                                                                                                                                                                  4/4 

Installed:
  compat-libstdc++-33.i686 0:3.2.3-72.el7                                                                                                                                                                                                  

Dependency Installed:
  glibc.i686 0:2.17-78.0.1.el7                                               libgcc.i686 0:4.8.3-9.el7                                               nss-softokn-freebl.i686 0:3.16.2.3-9.el7                                              

Complete!

检查已经安装的软件包

[root@18c1 ~]# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' bc binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc libstdc++ libstdc++-devel libxcb make net-tools nfs-utils python  python-configshell  python-rtslib python-six targetcli smartmontools sysstat
bc-1.06.95-13.el7 (x86_64)
binutils-2.23.52.0.1-30.el7 (x86_64)
compat-libcap1-1.10-7.el7 (x86_64)
package compat-libstdc++ is not installed
elfutils-libelf-0.160-1.el7 (x86_64)
elfutils-libelf-devel-0.160-1.el7 (x86_64)
fontconfig-devel-2.10.95-7.el7 (x86_64)
glibc-2.17-78.0.1.el7 (x86_64)
glibc-2.17-78.0.1.el7 (i686)
glibc-devel-2.17-78.0.1.el7 (x86_64)
ksh-20120801-22.el7 (x86_64)
libaio-0.3.109-12.el7 (x86_64)
libaio-devel-0.3.109-12.el7 (x86_64)
libX11-1.6.0-2.1.el7 (x86_64)
libXau-1.0.8-2.1.el7 (x86_64)
libXi-1.7.2-2.1.el7 (x86_64)
libXtst-1.2.2-2.1.el7 (x86_64)
libXrender-0.9.8-2.1.el7 (x86_64)
libXrender-devel-0.9.8-2.1.el7 (x86_64)
libgcc-4.8.3-9.el7 (x86_64)
libgcc-4.8.3-9.el7 (i686)
libstdc++-4.8.3-9.el7 (x86_64)
libstdc++-devel-4.8.3-9.el7 (x86_64)
libxcb-1.9-5.el7 (x86_64)
make-3.82-21.el7 (x86_64)
net-tools-2.0-0.17.20131004git.el7 (x86_64)
nfs-utils-1.3.0-0.8.el7 (x86_64)
python-2.7.5-16.el7 (x86_64)
python-configshell-1.1.fb14-1.el7 (noarch)
python-rtslib-2.1.fb50-1.el7 (noarch)
python-six-1.3.0-4.el7 (noarch)
targetcli-2.1.fb37-3.el7 (noarch)
smartmontools-6.2-4.el7 (x86_64)
sysstat-10.1.5-7.el7 (x86_64)


[root@18c2 ~]# rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' bc binutils compat-libcap1 compat-libstdc++ elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc libstdc++ libstdc++-devel libxcb make net-tools nfs-utils python  python-configshell  python-rtslib python-six targetcli smartmontools sysstat
bc-1.06.95-13.el7 (x86_64)
binutils-2.23.52.0.1-30.el7 (x86_64)
compat-libcap1-1.10-7.el7 (x86_64)
package compat-libstdc++ is not installed
elfutils-libelf-0.160-1.el7 (x86_64)
elfutils-libelf-devel-0.160-1.el7 (x86_64)
fontconfig-devel-2.10.95-7.el7 (x86_64)
glibc-2.17-78.0.1.el7 (x86_64)
glibc-2.17-78.0.1.el7 (i686)
glibc-devel-2.17-78.0.1.el7 (x86_64)
ksh-20120801-22.el7 (x86_64)
libaio-0.3.109-12.el7 (x86_64)
libaio-devel-0.3.109-12.el7 (x86_64)
libX11-1.6.0-2.1.el7 (x86_64)
libXau-1.0.8-2.1.el7 (x86_64)
libXi-1.7.2-2.1.el7 (x86_64)
libXtst-1.2.2-2.1.el7 (x86_64)
libXrender-0.9.8-2.1.el7 (x86_64)
libXrender-devel-0.9.8-2.1.el7 (x86_64)
libgcc-4.8.3-9.el7 (x86_64)
libgcc-4.8.3-9.el7 (i686)
libstdc++-4.8.3-9.el7 (x86_64)
libstdc++-devel-4.8.3-9.el7 (x86_64)
libxcb-1.9-5.el7 (x86_64)
make-3.82-21.el7 (x86_64)
net-tools-2.0-0.17.20131004git.el7 (x86_64)
nfs-utils-1.3.0-0.8.el7 (x86_64)
python-2.7.5-16.el7 (x86_64)
python-configshell-1.1.fb14-1.el7 (noarch)
python-rtslib-2.1.fb50-1.el7 (noarch)
python-six-1.3.0-4.el7 (noarch)
targetcli-2.1.fb37-3.el7 (noarch)
smartmontools-6.2-4.el7 (x86_64)
sysstat-10.1.5-7.el7 (x86_64)

2.11编辑hosts文件

[root@18c1 ~]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

#public-ip
10.10.13.171      18c1
10.10.13.172      18c2

#public-vip
10.10.13.173      18c1-vip
10.10.13.174      18c2-vip

#prive-ip
88.88.87.1        18c1-priv
88.88.87.2        18c2-priv

#scan-ip
10.10.13.175      scan-18c
10.10.13.176      scan-18c
10.10.13.177      scan-18c

[root@18c2 ~]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

#public-ip
10.10.13.171      18c1
10.10.13.172      18c2

#public-vip
10.10.13.173      18c1-vip
10.10.13.174      18c2-vip

#prive-ip
88.88.87.1        18c1-priv
88.88.87.2        18c2-priv

#scan-ip
10.10.13.175      scan-18c
10.10.13.176      scan-18c
10.10.13.177      scan-18c

2.12 修改系统内核参数

[root@18c1 ~]# cat >> /etc/sysctl.conf < kernel.shmall = 4294967296
> kernel.sem = 510 65280 510 128
> kernel.shmmni = 4096
> kernel.shmmax = 429496729500
> net.ipv4.ip_local_port_range = 9000 65500
> net.core.rmem_default = 1048576
> net.core.rmem_max = 4194304
> net.core.wmem_default = 262144
> net.core.wmem_max = 1048576
> fs.file-max = 6815744
> fs.aio-max-nr = 1048576
> vm.swappiness = 0
> vm.dirty_background_ratio = 3
> vm.dirty_ratio = 80
> vm.dirty_expire_centisecs = 500
> vm.dirty_writeback_centisecs = 100
> net.ipv4.tcp_sack = 0
> net.ipv4.tcp_timestamps = 0
> net.ipv4.conf.default.rp_filter = 0
> net.ipv4.tcp_wmem = 262144
> net.ipv4.tcp_rmem = 4194304
> EOF


[root@18c2 ~]# cat >> /etc/sysctl.conf < kernel.shmall = 4294967296
> kernel.sem = 510 65280 510 128
> kernel.shmmni = 4096
> kernel.shmmax = 429496729500
> net.ipv4.ip_local_port_range = 9000 65500
> net.core.rmem_default = 1048576
> net.core.rmem_max = 4194304
> net.core.wmem_default = 262144
> net.core.wmem_max = 1048576
> fs.file-max = 6815744
> fs.aio-max-nr = 1048576
> vm.swappiness = 0
> vm.dirty_background_ratio = 3
> vm.dirty_ratio = 80
> vm.dirty_expire_centisecs = 500
> vm.dirty_writeback_centisecs = 100
> net.ipv4.tcp_sack = 0
> net.ipv4.tcp_timestamps = 0
> net.ipv4.conf.default.rp_filter = 0
> net.ipv4.tcp_wmem = 262144
> net.ipv4.tcp_rmem = 4194304
> EOF

[root@18c1 ~]# sysctl -p
kernel.shmall = 4294967296
kernel.sem = 510 65280 510 128
kernel.shmmni = 4096
kernel.shmmax = 429496729500
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 1048576
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.file-max = 6815744
fs.aio-max-nr = 1048576
vm.swappiness = 0
vm.dirty_background_ratio = 3
vm.dirty_ratio = 80
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
net.ipv4.tcp_sack = 0
net.ipv4.tcp_timestamps = 0
net.ipv4.conf.default.rp_filter = 0
net.ipv4.tcp_wmem = 262144
net.ipv4.tcp_rmem = 4194304


[root@18c2 ~]# sysctl -p
kernel.shmall = 4294967296
kernel.sem = 510 65280 510 128
kernel.shmmni = 4096
kernel.shmmax = 429496729500
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 1048576
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.file-max = 6815744
fs.aio-max-nr = 1048576
vm.swappiness = 0
vm.dirty_background_ratio = 3
vm.dirty_ratio = 80
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
net.ipv4.tcp_sack = 0
net.ipv4.tcp_timestamps = 0
net.ipv4.conf.default.rp_filter = 0
net.ipv4.tcp_wmem = 262144
net.ipv4.tcp_rmem = 4194304

2.13 配置LIMITS限制参数

[root@18c1 ~]# cat >> /etc/security/limits.conf < oracle          soft    nproc           2047
> oracle          hard    nproc           16384
> oracle          soft    nofile          65536
> oracle          hard    nofile          65536
> oracle          soft    memlock         3145728
> oracle          hard    memlock         3145728
> oracle          soft    stack           10240
> oracle          hard    stack           32768
> 
> grid          soft    nproc           2047
> grid          hard    nproc           16384
> grid          soft    nofile          65536
> grid          hard    nofile          65536
> grid          soft    memlock         3145728
> grid          hard    memlock         3145728
> grid          soft    stack           10240
> grid          hard    stack           32768
> EOF

[root@18c2 ~]# cat >> /etc/security/limits.conf < oracle          soft    nproc           2047
> oracle          hard    nproc           16384
> oracle          soft    nofile          65536
> oracle          hard    nofile          65536
> oracle          soft    memlock         3145728
> oracle          hard    memlock         3145728
> oracle          soft    stack           10240
> oracle          hard    stack           32768
> 
> grid          soft    nproc           2047
> grid          hard    nproc           16384
> grid          soft    nofile          65536
> grid          hard    nofile          65536
> grid          soft    memlock         3145728
> grid          hard    memlock         3145728
> grid          soft    stack           10240
> grid          hard    stack           32768
> EOF

2.14配置PAM

[root@18c1 ~]# cat  >> /etc/pam.d/login < session    required     /lib64/security/pam_limits.so 
> EOF

[root@18c2 ~]# cat  >> /etc/pam.d/login < session    required     /lib64/security/pam_limits.so 
> EOF

2.15 配置系统环境变量

[root@18c1 ~]# cat  >> /etc/pam.d/login < if [ \$USER = "oracle" ]; then  
>     if [ \$SHELL = "/bin/ksh" ]; then
>         ulimit -p 16384
>         ulimit -n 65536
>     else
>         ulimit -u 16384 -n 65536
>     fi
> fi
> 
> if [ \$USER = "grid" ]; then  
>     if [ \$SHELL = "/bin/ksh" ]; then
>         ulimit -p 16384
>         ulimit -n 65536
>     else
>         ulimit -u 16384 -n 65536
>     fi
> fi
> EOF

[root@18c2 ~]# cat  >> /etc/pam.d/login < if [ \$USER = "oracle" ]; then  
>     if [ \$SHELL = "/bin/ksh" ]; then
>         ulimit -p 16384
>         ulimit -n 65536
>     else
>         ulimit -u 16384 -n 65536
>     fi
> fi
> 
> if [ \$USER = "grid" ]; then  
>     if [ \$SHELL = "/bin/ksh" ]; then
>         ulimit -p 16384
>         ulimit -n 65536
>     else
>         ulimit -u 16384 -n 65536
>     fi
> fi
> EOF

2.16 配置grid用户环境变量

[grid@18c1 ~]$ vi .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/18.3/grid
export ORACLE_SID=+ASM1
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022
export PATH=$PATH:$ORACLE_HOME/rdbms/lib


[grid@18c2 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/18.3/grid
export ORACLE_SID=+ASM2
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022
export PATH=$PATH:$ORACLE_HOME/rdbms/lib

2.17 配置oracle用户环境变量

[oracle@18c1 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/18.3/db
export ORACLE_SID=ora18c1
export ORACLE_UNQNAME=ora18c
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022
export PATH=$PATH:$ORACLE_HOME/rdbms/lib




[oracle@18c2 ~]$ vi .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

TEMP=/u01/tmp
TMPDIR=/u01/tmp
export TEMP TMPDIR
export LD_ASSUME_KERNEL=3.8.13
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/18.3/db
export ORACLE_SID=ora18c2
export ORACLE_UNQNAME=ora18c
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
umask=022
export PATH=$PATH:$ORACLE_HOME/rdbms/lib

2.18 配置ASM所需磁盘,编辑/etc/udev/rules.d/99-my-asmdevices.rules配置文件

[root@18c1 ~]# fdisk -l

Disk /dev/sdc: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sdb: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000e39cc

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048   209715199   104344576   8e  Linux LVM

Disk /dev/mapper/ol-root: 98.4 GB, 98385788928 bytes, 192159744 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/ol-swap: 8455 MB, 8455716864 bytes, 16515072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


[root@18c2 ~]# fdisk -l

Disk /dev/sdc: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 107.4 GB, 107374182400 bytes, 209715200 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000e39cc

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048     1026047      512000   83  Linux
/dev/sda2         1026048   209715199   104344576   8e  Linux LVM

Disk /dev/sdb: 53.7 GB, 53687091200 bytes, 104857600 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/ol-root: 98.4 GB, 98385788928 bytes, 192159744 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/ol-swap: 8455 MB, 8455716864 bytes, 16515072 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


[root@18c1 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdb
36000c2900cdc8c5166aa71fdb62b37b1
[root@18c1 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdc
36000c2976add1db1089450eb6795b7f1

[root@18c2 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdb
36000c2900cdc8c5166aa71fdb62b37b1
[root@18c2 ~]# /usr/lib/udev/scsi_id -g -u -d /dev/sdc
36000c2976add1db1089450eb6795b7f1

[root@18c1 ~]# vi /etc/udev/rules.d/99-my-asmdevices.rules
KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode", RESULT=="36000c2900cdc8c5166aa71fdb62b37b1", RUN+="/bin/sh -c 'mknod /dev/asmdisk01 b $major $minor; chown grid:asmadmin /dev/asmdisk01; chmod 0660 /dev/asmdisk01'"
KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode", RESULT=="36000c2976add1db1089450eb6795b7f1", RUN+="/bin/sh -c 'mknod /dev/asmdisk02 b $major $minor; chown grid:asmadmin /dev/asmdisk02; chmod 0660 /dev/asmdisk02'"


[root@18c2 ~]# vi /etc/udev/rules.d/99-my-asmdevices.rules
KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode", RESULT=="36000c2900cdc8c5166aa71fdb62b37b1", RUN+="/bin/sh -c 'mknod /dev/asmdisk01 b $major $minor; chown grid:asmadmin /dev/asmdisk01; chmod 0660 /dev/asmdisk01'"
KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode", RESULT=="36000c2976add1db1089450eb6795b7f1", RUN+="/bin/sh -c 'mknod /dev/asmdisk02 b $major $minor; chown grid:asmadmin /dev/asmdisk02; chmod 0660 /dev/asmdisk02'"


[root@18c1 ~]# /sbin/udevadm trigger --type=devices --action=change
[root@18c1 ~]# ls -lrt /dev/asm*
brw-rw----. 1 grid asmadmin 8, 32 Sep 14 10:39 /dev/asmdisk02
brw-rw----. 1 grid asmadmin 8, 16 Sep 14 10:39 /dev/asmdisk01

[root@18c2 ~]# /sbin/udevadm trigger --type=devices --action=change
[root@18c2 ~]# ls -lrt /dev/asm*
brw-rw----. 1 grid asmadmin 8, 16 Sep 14 10:39 /dev/asmdisk01
brw-rw----. 1 grid asmadmin 8, 32 Sep 14 10:39 /dev/asmdisk02

三·安装集群软件
3.1解压grid软件

[grid@18c1 ~]$ cd /soft
[grid@18c1 soft]$ ls -lrt
total 9713788
-rw-r--r--. 1 oracle oinstall 4564649047 Mar 31  2019 LINUX.X64_180000_db_home.zip
-rw-r--r--. 1 grid   oinstall 5382265496 Mar 31  2019 LINUX.X64_180000_grid_home.zip

[grid@18c1 soft]$ unzip -q LINUX.X64_180000_grid_home.zip -d $ORACLE_HOME

3.2 安装CVU

[root@18c1 ~]# export CVUQDISK_GRP=oinstall; 
[root@18c1 ~]# rpm -ivh /u01/app/18.3/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:cvuqdisk-1.0.10-1                ################################# [100%]

把安装包复件到节点2

[root@18c1 ~]# scp /u01/app/18.3/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm 18c2:~ 
The authenticity of host '18c2 (10.10.13.172)' can't be established.
ECDSA key fingerprint is 33:bd:b1:91:b4:06:6d:e9:5a:e5:1c:e4:8a:98:e3:d8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '18c2,10.10.13.172' (ECDSA) to the list of known hosts.
root@18c2's password: 
cvuqdisk-1.0.10-1.rpm                                                                                                                                                                                    100% 8860     8.7KB/s   00:00    
[root@18c1 ~]# 

[root@18c2 ~]# export CVUQDISK_GRP=oinstall;
[root@18c2 ~]# rpm -ivh cvuqdisk-1.0.10-1.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:cvuqdisk-1.0.10-1                ################################# [100%]

3.3 配置SSH信任
给grid,oracle用户进行配置

[root@18c1 ~]# /u01/app/18.3/grid/oui/prov/resources/scripts/sshUserSetup.sh -user grid  -hosts "18c1 18c2" -advanced exverify -confirm
The output of this script is also logged into /tmp/sshUserSetup_2022-09-14-11-01-04.log
Hosts are 18c1 18c2
user is grid
Platform:- Linux 
Checking if the remote hosts are reachable
PING 18c1 (10.10.13.171) 56(84) bytes of data.
64 bytes from 18c1 (10.10.13.171): icmp_seq=1 ttl=64 time=0.034 ms
64 bytes from 18c1 (10.10.13.171): icmp_seq=2 ttl=64 time=0.020 ms
64 bytes from 18c1 (10.10.13.171): icmp_seq=3 ttl=64 time=0.020 ms
64 bytes from 18c1 (10.10.13.171): icmp_seq=4 ttl=64 time=0.018 ms
64 bytes from 18c1 (10.10.13.171): icmp_seq=5 ttl=64 time=0.037 ms

--- 18c1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 0.018/0.025/0.037/0.010 ms
PING 18c2 (10.10.13.172) 56(84) bytes of data.
64 bytes from 18c2 (10.10.13.172): icmp_seq=1 ttl=64 time=0.368 ms
64 bytes from 18c2 (10.10.13.172): icmp_seq=2 ttl=64 time=0.170 ms
64 bytes from 18c2 (10.10.13.172): icmp_seq=3 ttl=64 time=0.178 ms
64 bytes from 18c2 (10.10.13.172): icmp_seq=4 ttl=64 time=0.168 ms
64 bytes from 18c2 (10.10.13.172): icmp_seq=5 ttl=64 time=0.157 ms

--- 18c2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 0.157/0.208/0.368/0.080 ms
Remote host reachability check succeeded.
The following hosts are reachable: 18c1 18c2.
The following hosts are not reachable: .
All hosts are reachable. Proceeding further...
firsthost 18c1
numhosts 2
The script will setup SSH connectivity from the host 18c1 to all
the remote hosts. After the script is executed, the user can use SSH to run
commands on the remote hosts or copy files between this host 18c1
and the remote hosts without being prompted for passwords or confirmations.

NOTE 1:
As part of the setup procedure, this script will use ssh and scp to copy
files between the local host and the remote hosts. Since the script does not
store passwords, you may be prompted for the passwords during the execution of
the script whenever ssh or scp is invoked.

NOTE 2:
AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORY
AND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEGES TO THESE
directories.

Do you want to continue and let the script make the above mentioned changes (yes/no)?
Confirmation provided on the command line

The user chose yes
Please specify if you want to specify a passphrase for the private key this script will create for the local host. Passphrase is used to encrypt the private key and makes SSH much more secure. Type 'yes' or 'no' and then press enter. In case you press 'yes', you would need to enter the passphrase whenever the script executes ssh or scp. no 
The estimated number of times the user would be prompted for a passphrase is 4. In addition, if the private-public files are also newly created, the user would have to specify the passphrase on one additional occasion. 
Enter 'yes' or 'no'.
yes

The user chose yes
Creating .ssh directory on local host, if not present already
Creating authorized_keys file on local host
Changing permissions on authorized_keys to 644 on local host
Creating known_hosts file on local host
Changing permissions on known_hosts to 644 on local host
Creating config file on local host
If a config file exists already at /root/.ssh/config, it would be backed up to /root/.ssh/config.backup.
Removing old private/public keys on local host
Running SSH keygen on local host
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
passphrase too short: have 4 bytes, need > 4
Generating public/private rsa key pair.
Saving the key failed: /root/.ssh/id_rsa.
Creating .ssh directory and setting permissions on remote host 18c1
THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR grid. THIS IS AN SSH REQUIREMENT.
The script would create ~grid/.ssh/config file on remote host 18c1. If a config file exists already at ~grid/.ssh/config, it would be backed up to ~grid/.ssh/config.backup.
The user may be prompted for a password here since the script would be running SSH on host 18c1.
Warning: Permanently added '18c1,10.10.13.171' (ECDSA) to the list of known hosts.
grid@18c1's password: 
Done with creating .ssh directory and setting permissions on remote host 18c1.
Creating .ssh directory and setting permissions on remote host 18c2
THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR grid. THIS IS AN SSH REQUIREMENT.
The script would create ~grid/.ssh/config file on remote host 18c2. If a config file exists already at ~grid/.ssh/config, it would be backed up to ~grid/.ssh/config.backup.
The user may be prompted for a password here since the script would be running SSH on host 18c2.
Warning: Permanently added '18c2,10.10.13.172' (ECDSA) to the list of known hosts.
grid@18c2's password: 
Done with creating .ssh directory and setting permissions on remote host 18c2.
Copying local host public key to the remote host 18c1
The user may be prompted for a password or passphrase here since the script would be using SCP for host 18c1.
grid@18c1's password: 
/root/.ssh/id_rsa.pub: No such file or directory
Done copying local host public key to the remote host 18c1
Copying local host public key to the remote host 18c2
The user may be prompted for a password or passphrase here since the script would be using SCP for host 18c2.
grid@18c2's password: 
/root/.ssh/id_rsa.pub: No such file or directory
Done copying local host public key to the remote host 18c2
cat: /root/.ssh/id_rsa.pub: No such file or directory
Creating keys on remote host 18c1 if they do not exist already. This is required to setup SSH on host 18c1.
grid@18c1's password: 
Generating public/private rsa key pair.
Your identification has been saved in .ssh/id_rsa.
Your public key has been saved in .ssh/id_rsa.pub.
The key fingerprint is:
bf:e3:a6:88:97:da:e0:7f:46:6e:9f:1a:c7:9b:a1:35 grid@18c1
The key's randomart image is:
+--[ RSA 1024]----+
|                 |
|                 |
|                 |
|                 |
|        S        |
|        .o       |
|    .  +. E      |
|   . +o.==oB     |
|    +++++*B.     |
+-----------------+
Creating keys on remote host 18c2 if they do not exist already. This is required to setup SSH on host 18c2.
grid@18c2's password: 
Generating public/private rsa key pair.
Your identification has been saved in .ssh/id_rsa.
Your public key has been saved in .ssh/id_rsa.pub.
The key fingerprint is:
ea:df:a7:75:09:21:8e:b2:c3:6d:03:28:c0:03:8c:c6 grid@18c2
The key's randomart image is:
+--[ RSA 1024]----+
|=                |
|+E               |
|oo        . .    |
| ..  .   o . .   |
|  . . o S . .    |
|   . . *     . . |
|      = +   . o  |
|     . o o ...   |
|      ... oo     |
+-----------------+
grid@18c1's password: 
grid@18c2's password: 
Updating authorized_keys file on remote host 18c1
grid@18c1's password: 
Updating known_hosts file on remote host 18c1
grid@18c1's password: 
The script will run SSH on the remote machine 18c1. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.
grid@18c1's password: 
Updating authorized_keys file on remote host 18c2
grid@18c2's password: 
Updating known_hosts file on remote host 18c2
grid@18c2's password: 
The script will run SSH on the remote machine 18c2. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.
grid@18c2's password: 
SSH setup is complete.

------------------------------------------------------------------------
Verifying SSH setup
===================
The script will now run the date command on the remote nodes using ssh
to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP,
THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR
PASSWORDS. If you see any output other than date or are prompted for the
password, ssh is not setup correctly and you will need to resolve the
issue and set up ssh again.
The possible causes for failure could be:
1. The server settings in /etc/ssh/sshd_config file do not allow ssh
for user grid.
2. The server may have disabled public key based authentication.
3. The client public key on the server may be outdated.
4. ~grid or ~grid/.ssh on the remote host may not be owned by grid.
5. User may not have passed -shared option for shared remote users or
may be passing the -shared option for non-shared remote users.
6. If there is output in addition to the date, but no password is asked,
it may be a security alert shown as part of company policy. Append the
additional text to the /sysman/prov/resources/ignoreMessages.txt file.
------------------------------------------------------------------------
--18c1:--
Running /usr/bin/ssh -x -l grid 18c1 date to verify SSH connectivity has been setup from local host to 18c1.
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
The script will run SSH on the remote machine 18c1. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.
grid@18c1's password: 
Wed Sep 14 11:03:09 CST 2022
------------------------------------------------------------------------
--18c2:--
Running /usr/bin/ssh -x -l grid 18c2 date to verify SSH connectivity has been setup from local host to 18c2.
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
The script will run SSH on the remote machine 18c2. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.
grid@18c2's password: 
Wed Sep 14 11:03:12 CST 2022
------------------------------------------------------------------------
------------------------------------------------------------------------
Verifying SSH connectivity has been setup from 18c1 to 18c1
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.
grid@18c1's password: 
Wed Sep 14 11:03:16 CST 2022
------------------------------------------------------------------------
------------------------------------------------------------------------
Verifying SSH connectivity has been setup from 18c1 to 18c2
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.
grid@18c1's password: 
Wed Sep 14 11:03:20 CST 2022
------------------------------------------------------------------------
-Verification from complete-
SSH verification complete.




[root@18c1 ~]# /u01/app/18.3/grid/oui/prov/resources/scripts/sshUserSetup.sh -user oracle  -hosts "18c1 18c2" -advanced exverify -confirm
The output of this script is also logged into /tmp/sshUserSetup_2022-09-14-11-04-24.log
Hosts are 18c1 18c2
user is oracle
Platform:- Linux 
Checking if the remote hosts are reachable
PING 18c1 (10.10.13.171) 56(84) bytes of data.
64 bytes from 18c1 (10.10.13.171): icmp_seq=1 ttl=64 time=0.027 ms
64 bytes from 18c1 (10.10.13.171): icmp_seq=2 ttl=64 time=0.025 ms
64 bytes from 18c1 (10.10.13.171): icmp_seq=3 ttl=64 time=0.018 ms
64 bytes from 18c1 (10.10.13.171): icmp_seq=4 ttl=64 time=0.023 ms
64 bytes from 18c1 (10.10.13.171): icmp_seq=5 ttl=64 time=0.016 ms

--- 18c1 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.016/0.021/0.027/0.007 ms
PING 18c2 (10.10.13.172) 56(84) bytes of data.
64 bytes from 18c2 (10.10.13.172): icmp_seq=1 ttl=64 time=0.222 ms
64 bytes from 18c2 (10.10.13.172): icmp_seq=2 ttl=64 time=0.145 ms
64 bytes from 18c2 (10.10.13.172): icmp_seq=3 ttl=64 time=0.141 ms
64 bytes from 18c2 (10.10.13.172): icmp_seq=4 ttl=64 time=0.153 ms
64 bytes from 18c2 (10.10.13.172): icmp_seq=5 ttl=64 time=0.142 ms

--- 18c2 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.141/0.160/0.222/0.033 ms
Remote host reachability check succeeded.
The following hosts are reachable: 18c1 18c2.
The following hosts are not reachable: .
All hosts are reachable. Proceeding further...
firsthost 18c1
numhosts 2
The script will setup SSH connectivity from the host 18c1 to all
the remote hosts. After the script is executed, the user can use SSH to run
commands on the remote hosts or copy files between this host 18c1
and the remote hosts without being prompted for passwords or confirmations.

NOTE 1:
As part of the setup procedure, this script will use ssh and scp to copy
files between the local host and the remote hosts. Since the script does not
store passwords, you may be prompted for the passwords during the execution of
the script whenever ssh or scp is invoked.

NOTE 2:
AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORY
AND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEGES TO THESE
directories.

Do you want to continue and let the script make the above mentioned changes (yes/no)?
Confirmation provided on the command line

The user chose yes
Please specify if you want to specify a passphrase for the private key this script will create for the local host. Passphrase is used to encrypt the private key and makes SSH much more secure. Type 'yes' or 'no' and then press enter. In case you press 'yes', you would need to enter the passphrase whenever the script executes ssh or scp. no 
The estimated number of times the user would be prompted for a passphrase is 4. In addition, if the private-public files are also newly created, the user would have to specify the passphrase on one additional occasion. 
Enter 'yes' or 'no'.
yes

The user chose yes
Creating .ssh directory on local host, if not present already
Creating authorized_keys file on local host
Changing permissions on authorized_keys to 644 on local host
Creating known_hosts file on local host
Changing permissions on known_hosts to 644 on local host
Creating config file on local host
If a config file exists already at /root/.ssh/config, it would be backed up to /root/.ssh/config.backup.
Removing old private/public keys on local host
Running SSH keygen on local host
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Generating public/private rsa key pair.
Passphrases do not match.  Try again.
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
3b:8c:65:92:69:ee:94:70:cf:7d:9b:66:73:12:9b:be root@18c1
The key's randomart image is:
+--[ RSA 1024]----+
|                 |
|                 |
|                 |
|       o         |
|    . * S        |
|     = X o  .    |
|      = * . .+   |
|     o   . .Bo.  |
|      .    +E=   |
+-----------------+
Creating .ssh directory and setting permissions on remote host 18c1
THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT.
The script would create ~oracle/.ssh/config file on remote host 18c1. If a config file exists already at ~oracle/.ssh/config, it would be backed up to ~oracle/.ssh/config.backup.
The user may be prompted for a password here since the script would be running SSH on host 18c1.
Warning: Permanently added '18c1,10.10.13.171' (ECDSA) to the list of known hosts.
oracle@18c1's password: 
Done with creating .ssh directory and setting permissions on remote host 18c1.
Creating .ssh directory and setting permissions on remote host 18c2
THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT.
The script would create ~oracle/.ssh/config file on remote host 18c2. If a config file exists already at ~oracle/.ssh/config, it would be backed up to ~oracle/.ssh/config.backup.
The user may be prompted for a password here since the script would be running SSH on host 18c2.
Warning: Permanently added '18c2,10.10.13.172' (ECDSA) to the list of known hosts.
oracle@18c2's password: 
Done with creating .ssh directory and setting permissions on remote host 18c2.
Copying local host public key to the remote host 18c1
The user may be prompted for a password or passphrase here since the script would be using SCP for host 18c1.
oracle@18c1's password: 
Done copying local host public key to the remote host 18c1
Copying local host public key to the remote host 18c2
The user may be prompted for a password or passphrase here since the script would be using SCP for host 18c2.
oracle@18c2's password: 
Done copying local host public key to the remote host 18c2
Creating keys on remote host 18c1 if they do not exist already. This is required to setup SSH on host 18c1.
Enter passphrase for key '/root/.ssh/id_rsa': 
Generating public/private rsa key pair.
Your identification has been saved in .ssh/id_rsa.
Your public key has been saved in .ssh/id_rsa.pub.
The key fingerprint is:
d6:14:54:7b:fc:11:f3:99:4f:69:b0:66:a8:31:70:0f oracle@18c1
The key's randomart image is:
+--[ RSA 1024]----+
|       . Eo... o |
|        o o..oo B|
|         o.o.+o*o|
|         o+ o..oo|
|        S..     o|
|       .         |
|                 |
|                 |
|                 |
+-----------------+
Creating keys on remote host 18c2 if they do not exist already. This is required to setup SSH on host 18c2.
Enter passphrase for key '/root/.ssh/id_rsa': 
Generating public/private rsa key pair.
Your identification has been saved in .ssh/id_rsa.
Your public key has been saved in .ssh/id_rsa.pub.
The key fingerprint is:
2f:de:18:db:83:fe:6f:e9:1a:59:9f:73:82:9f:62:31 oracle@18c2
The key's randomart image is:
+--[ RSA 1024]----+
|                 |
|                 |
|                 |
|                 |
|        S   .    |
|         . oEo . |
|        o.+ .+= .|
|       ..B..=. = |
|       .=.=Bo.o  |
+-----------------+
Enter passphrase for key '/root/.ssh/id_rsa': 
Enter passphrase for key '/root/.ssh/id_rsa': 
Updating authorized_keys file on remote host 18c1
Enter passphrase for key '/root/.ssh/id_rsa': 
Updating known_hosts file on remote host 18c1
Enter passphrase for key '/root/.ssh/id_rsa': 
The script will run SSH on the remote machine 18c1. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.
Enter passphrase for key '/root/.ssh/id_rsa': 
Updating authorized_keys file on remote host 18c2
Enter passphrase for key '/root/.ssh/id_rsa': 
Updating known_hosts file on remote host 18c2
Enter passphrase for key '/root/.ssh/id_rsa': 
The script will run SSH on the remote machine 18c2. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.
Enter passphrase for key '/root/.ssh/id_rsa': 
SSH setup is complete.

------------------------------------------------------------------------
Verifying SSH setup
===================
The script will now run the date command on the remote nodes using ssh
to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP,
THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR
PASSWORDS. If you see any output other than date or are prompted for the
password, ssh is not setup correctly and you will need to resolve the
issue and set up ssh again.
The possible causes for failure could be:
1. The server settings in /etc/ssh/sshd_config file do not allow ssh
for user oracle.
2. The server may have disabled public key based authentication.
3. The client public key on the server may be outdated.
4. ~oracle or ~oracle/.ssh on the remote host may not be owned by oracle.
5. User may not have passed -shared option for shared remote users or
may be passing the -shared option for non-shared remote users.
6. If there is output in addition to the date, but no password is asked,
it may be a security alert shown as part of company policy. Append the
additional text to the /sysman/prov/resources/ignoreMessages.txt file.
------------------------------------------------------------------------
--18c1:--
Running /usr/bin/ssh -x -l oracle 18c1 date to verify SSH connectivity has been setup from local host to 18c1.
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
The script will run SSH on the remote machine 18c1. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.
Enter passphrase for key '/root/.ssh/id_rsa': 
Wed Sep 14 11:06:55 CST 2022
------------------------------------------------------------------------
--18c2:--
Running /usr/bin/ssh -x -l oracle 18c2 date to verify SSH connectivity has been setup from local host to 18c2.
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
The script will run SSH on the remote machine 18c2. The user may be prompted for a passphrase here in case the private key has been encrypted with a passphrase.
Enter passphrase for key '/root/.ssh/id_rsa': 
Wed Sep 14 11:07:00 CST 2022
------------------------------------------------------------------------
------------------------------------------------------------------------
Verifying SSH connectivity has been setup from 18c1 to 18c1
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.
Enter passphrase for key '/root/.ssh/id_rsa': 
Wed Sep 14 11:07:06 CST 2022
------------------------------------------------------------------------
------------------------------------------------------------------------
Verifying SSH connectivity has been setup from 18c1 to 18c2
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.
Enter passphrase for key '/root/.ssh/id_rsa': 
Wed Sep 14 11:07:12 CST 2022
------------------------------------------------------------------------
-Verification from complete-
SSH verification complete.


[root@18c1 ~]# su - grid
Last login: Wed Sep 14 10:52:12 CST 2022 on pts/0
[grid@18c1 ~]$ ssh 18c2 date
Wed Sep 14 11:08:23 CST 2022
[grid@18c1 ~]$ ssh 18c1 date
Wed Sep 14 11:08:30 CST 2022
[grid@18c1 ~]$ exit
logout
[root@18c1 ~]# su - oracle
Last login: Wed Sep 14 10:34:49 CST 2022 on pts/0
[oracle@18c1 ~]$ ssh 18c2 date
Wed Sep 14 11:08:43 CST 2022
[oracle@18c1 ~]$ ssh 18c1 date
Wed Sep 14 11:08:48 CST 2022

[grid@18c2 ~]$ ssh 18c1 date
Wed Sep 14 11:09:13 CST 2022
[grid@18c2 ~]$ ssh 18c2 date
Wed Sep 14 11:09:17 CST 2022
[grid@18c2 ~]$ exit
logout
[root@18c2 ~]# su - oracle
Last login: Wed Sep 14 10:36:22 CST 2022 on pts/0
[oracle@18c2 ~]$ ssh 18c1 date
Wed Sep 14 11:09:33 CST 2022
[oracle@18c2 ~]$ ssh 18c2 date
Wed Sep 14 11:09:41 CST 2022

3.4 安装前环境检查GI

[grid@18c1 ~]$ $ORACLE_HOME/runcluvfy.sh  stage -pre crsinst -n  "18c1,18c2"  -fixup -verbose

根据提示修复检查的问题

[root@18c1 ~]# /u01/tmp/CVU_18.0.0.0.0_grid/runfixup.sh
All Fix-up operations were completed successfully.

[root@18c2 ~]# /u01/tmp/CVU_18.0.0.0.0_grid/runfixup.sh
All Fix-up operations were completed successfully.

3.5开始安装Grid软件

[grid@18c1 ~]$ vi grid.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v18.0.0
INVENTORY_LOCATION=/u01/app/oraInventory
oracle.install.option=CRS_CONFIG
ORACLE_BASE=/u01/app/grid
oracle.install.asm.OSDBA=asmdba
oracle.install.asm.OSOPER=asmoper
oracle.install.asm.OSASM=asmadmin
oracle.install.crs.config.scanType=LOCAL_SCAN
oracle.install.crs.config.gpnp.scanName=scan-18c
oracle.install.crs.config.gpnp.scanPort=1521
oracle.install.crs.config.ClusterConfiguration=STANDALONE
oracle.install.crs.config.configureAsExtendedCluster=false
oracle.install.crs.config.clusterName=ora18c-cluster
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.autoConfigureClusterNodeVIP=false
oracle.install.crs.config.clusterNodes=18c1:18c1-vip:HUB,18c2:18c2-vip:HUB
oracle.install.crs.config.networkInterfaceList=ens33:88.88.87.0:5,ens32:10.10.13.0:1
oracle.install.asm.configureGIMRDataDG=false
oracle.install.crs.config.useIPMI=false
oracle.install.asm.storageOption=ASM
oracle.install.asmOnNAS.configureGIMRDataDG=false
oracle.install.asm.SYSASMPassword=xxzx7817600
oracle.install.asm.diskGroup.name=OCR
oracle.install.asm.diskGroup.redundancy=EXTERNAL
oracle.install.asm.diskGroup.AUSize=4
oracle.install.asm.diskGroup.disks=/dev/asmdisk01
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/asm*
oracle.install.asm.configureAFD=false
oracle.install.asm.monitorPassword=xxzx7817600
oracle.install.crs.configureRHPS=false
oracle.install.crs.config.ignoreDownNodes=false
oracle.install.config.managementOption=NONE
oracle.install.config.omsPort=0
oracle.install.crs.rootconfig.executeRootScript=false

[grid@18c1 ~]$ $ORACLE_HOME/gridSetup.sh -silent -force -noconfig -waitforcompletion -ignorePrereq -responseFile /home/grid/grid.rsp
Launching Oracle Grid Infrastructure Setup Wizard...

[WARNING] [INS-30011] The SYS password entered does not conform to the Oracle recommended standards.
   CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
   ACTION: Provide a password that conforms to the Oracle recommended standards.
[WARNING] [INS-30011] The ASMSNMP password entered does not conform to the Oracle recommended standards.
   CAUSE: Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
   ACTION: Provide a password that conforms to the Oracle recommended standards.
[WARNING] [INS-40109] The specified Oracle Base location is not empty on this server.
   ACTION: Specify an empty location for Oracle Base.
[WARNING] [INS-13013] Target environment does not meet some mandatory requirements.
   CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /u01/tmp/GridSetupActions2022-09-14_11-40-40AM/gridSetupActions2022-09-14_11-40-40AM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /u01/tmp/GridSetupActions2022-09-14_11-40-40AM/gridSetupActions2022-09-14_11-40-40AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
 /u01/app/18.3/grid/install/response/grid_2022-09-14_11-40-40AM.rsp

You can find the log of this install session at:
 /u01/tmp/GridSetupActions2022-09-14_11-40-40AM/gridSetupActions2022-09-14_11-40-40AM.log

As a root user, execute the following script(s):
        1. /u01/app/oraInventory/orainstRoot.sh
        2. /u01/app/18.3/grid/root.sh

Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes: 
[18c1, 18c2]
Execute /u01/app/18.3/grid/root.sh on the following nodes: 
[18c1, 18c2]

Run the script on the local node first. After successful completion, you can start the script in parallel on all other nodes.

Successfully Setup Software with warning(s).
As install user, execute the following command to complete the configuration.
        /u01/app/18.3/grid/gridSetup.sh -executeConfigTools -responseFile /home/grid/grid.rsp [-silent]


Moved the install session logs to:
 /u01/app/oraInventory/logs/GridSetupActions2022-09-14_11-40-40AM

节点一 执行root脚本

[root@18c1 /]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@18c1 /]# /u01/app/18.3/grid/root.sh
Check /u01/app/18.3/grid/install/root_18c1_2022-09-14_12-06-17-524505190.log for the output of root script

节点二 执行root脚本

[root@18c2 /]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@18c2 /]# /u01/app/18.3/grid/root.sh
Check /u01/app/18.3/grid/install/root_18c2_2022-09-14_12-26-02-499327120.log for the output of root script

[grid@18c1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.OCR.GHCHKPT.advm
               OFFLINE OFFLINE      18c1                     STABLE
               OFFLINE OFFLINE      18c2                     STABLE
ora.OCR.dg
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.helper
               OFFLINE OFFLINE      18c1                     STABLE
               OFFLINE OFFLINE      18c2                     IDLE,STABLE
ora.net1.network
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.ocr.ghchkpt.acfs
               OFFLINE OFFLINE      18c1                     volume /opt/oracle/r
                                                             hp_images/chkbase is
                                                             unmounted,STABLE
               OFFLINE OFFLINE      18c2                     STABLE
ora.ons
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.proxy_advm
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.18c1.vip
      1        ONLINE  ONLINE       18c1                     STABLE
ora.18c2.vip
      1        ONLINE  ONLINE       18c2                     STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       18c2                     STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       18c1                     STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       18c1                     STABLE
ora.MGMTLSNR
      1        OFFLINE OFFLINE                               STABLE
ora.asm
      1        ONLINE  ONLINE       18c1                     Started,STABLE
      2        ONLINE  ONLINE       18c2                     Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       18c1                     STABLE
ora.qosmserver
      1        ONLINE  ONLINE       18c1                     STABLE
ora.rhpserver
      1        OFFLINE OFFLINE                               STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       18c2                     STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       18c1                     STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       18c1                     STABLE
--------------------------------------------------------------------------------

3.6创建ASM磁盘组

[grid@18c1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 18.0.0.0.0 - Production on Wed Sep 14 14:53:11 2022
Version 18.3.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.


Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

SQL> create diskgroup DATA external REDUNDANCY disk '/dev/asmdisk02' ATTRIBUTE 'au_size'='4M', 'compatible.rdbms' = '18.0', 'compatible.asm' = '18.0';

Diskgroup created.

节点二执行挂载

[grid@18c2 ~]$ sqlplus / as sysasm

SQL*Plus: Release 18.0.0.0.0 - Production on Wed Sep 14 14:52:53 2022
Version 18.3.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.


Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

SQL> alter diskgroup data mount;

Diskgroup altered.


[grid@18c1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.DATA.dg
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.OCR.GHCHKPT.advm
               OFFLINE OFFLINE      18c1                     STABLE
               OFFLINE OFFLINE      18c2                     STABLE
ora.OCR.dg
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.helper
               OFFLINE OFFLINE      18c1                     STABLE
               OFFLINE OFFLINE      18c2                     IDLE,STABLE
ora.net1.network
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.ocr.ghchkpt.acfs
               OFFLINE OFFLINE      18c1                     volume /opt/oracle/r
                                                             hp_images/chkbase is
                                                             unmounted,STABLE
               OFFLINE OFFLINE      18c2                     STABLE
ora.ons
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.proxy_advm
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.18c1.vip
      1        ONLINE  ONLINE       18c1                     STABLE
ora.18c2.vip
      1        ONLINE  ONLINE       18c2                     STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       18c2                     STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       18c1                     STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       18c1                     STABLE
ora.MGMTLSNR
      1        OFFLINE OFFLINE                               STABLE
ora.asm
      1        ONLINE  ONLINE       18c1                     Started,STABLE
      2        ONLINE  ONLINE       18c2                     Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       18c1                     STABLE
ora.qosmserver
      1        ONLINE  ONLINE       18c1                     STABLE
ora.rhpserver
      1        OFFLINE OFFLINE                               STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       18c2                     STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       18c1                     STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       18c1                     STABLE
--------------------------------------------------------------------------------

四·安装数据库软件
4.1 解压安装包

[oracle@18c1 ~]$ cd /soft
[oracle@18c1 soft]$ ls -lrt
total 9713788
-rw-r--r--. 1 oracle oinstall 4564649047 Mar 31  2019 LINUX.X64_180000_db_home.zip
-rw-r--r--. 1 grid   oinstall 5382265496 Mar 31  2019 LINUX.X64_180000_grid_home.zip

[oracle@18c1 soft]$ unzip -q LINUX.X64_180000_db_home.zip -d $ORACLE_HOME

4.2安装前检查

[grid@18c1 ~]$ORACLE_HOME/runcluvfy.sh stage -pre dbinst -n  "18c1,18c2"  -fixup -verbose
......
Execute "/u01/tmp/CVU_18.0.0.0.0_grid/runfixup.sh" as root user on nodes "18c2,18c1" to perform the fix up operations manually

Press ENTER key to continue after execution of "/u01/tmp/CVU_18.0.0.0.0_grid/runfixup.sh" has completed on nodes "18c2,18c1"

Fix: Group Membership: dba 

  Node Name                             Status                  
  ------------------------------------  ------------------------
  18c2                                  failed                  
  18c1                                  failed                  

ERROR: 
18c2: PRVG-9023 : Manual fix up command "/u01/tmp/CVU_18.0.0.0.0_grid/runfixup.sh" was not issued by root user on node "18c2"

18c1: PRVG-9023 : Manual fix up command "/u01/tmp/CVU_18.0.0.0.0_grid/runfixup.sh" was not issued by root user on node "18c1"

Result: 
"Group Membership: dba" could not be fixed on nodes "18c2,18c1"

Fix up operations for selected fixable prerequisites were unsuccessful on nodes "18c2,18c1"


[root@18c1 ~]# /u01/tmp/CVU_18.0.0.0.0_grid/runfixup.sh
All Fix-up operations were completed successfully.


[root@18c2 ~]# /u01/tmp/CVU_18.0.0.0.0_grid/runfixup.sh
All Fix-up operations were completed successfully.

4.3编写响应文件

[oracle@18c1 ~]$ vi dbinstall.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v18.0.0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oraInventory
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/18.3/db
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=oper
oracle.install.db.OSBACKUPDBA_GROUP=backupdba
oracle.install.db.OSDGDBA_GROUP=dgdba
oracle.install.db.OSKMDBA_GROUP=kmdba
oracle.install.db.OSRACDBA_GROUP=racdba
oracle.install.db.CLUSTER_NODES=18c1,18c2
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE

[oracle@18c1 ~]$ $ORACLE_HOME/runInstaller -silent  -force -noconfig  -ignorePrereq -responseFile /home/oracle/dbinstall.rsp
Launching Oracle Database Setup Wizard...

[WARNING] [INS-13013] Target environment does not meet some mandatory requirements.
   CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/InstallActions2022-09-14_01-09-17PM/installActions2022-09-14_01-09-17PM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/InstallActions2022-09-14_01-09-17PM/installActions2022-09-14_01-09-17PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
 /u01/app/oracle/product/18.3/db/install/response/db_2022-09-14_01-09-17PM.rsp

You can find the log of this install session at:
 /u01/app/oraInventory/logs/InstallActions2022-09-14_01-09-17PM/installActions2022-09-14_01-09-17PM.log

As a root user, execute the following script(s):
        1. /u01/app/oracle/product/18.3/db/root.sh

Execute /u01/app/oracle/product/18.3/db/root.sh on the following nodes: 
[18c1, 18c2]


Successfully Setup Software with warning(s).

4.4执行root.sh脚本

[root@18c1 oracle]# /u01/app/oracle/product/18.3/db/root.sh
Check /u01/app/oracle/product/18.3/db/install/root_18c1_2022-09-14_14-17-43-907653393.log for the output of root script
[root@18c1 oracle]# cat /u01/app/oracle/product/18.3/db/install/root_18c1_2022-09-14_14-17-43-907653393.log
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/18.3/db
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

[root@18c2 18.3]# /u01/app/oracle/product/18.3/db/root.sh
Check /u01/app/oracle/product/18.3/db/install/root_18c2_2022-09-14_14-17-49-252045874.log for the output of root script
[root@18c2 18.3]# cat /u01/app/oracle/product/18.3/db/install/root_18c2_2022-09-14_14-17-49-252045874.log
Performing root user operation.

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/18.3/db
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

五·创建数据库

[oracle@18c1 ~]$ vi dbca.rsp
responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v12.2.0
templateName=General_Purpose.dbc
gdbName=ora18c
sid=ora18c
databaseConfigType=RAC
responseFile=NO_VALUE
characterSet=ZHS16GBK
nationalCharacterSet=AL16UTF16
sysPassword=xxzx7817600
systemPassword=xxzx7817600
createAsContainerDatabase=true
numberOfPDBs=1
pdbName=ora18cpdb
useLocalUndoForPDBs=TRUE
pdbAdminPassword=xxzx7817600
databaseType=MULTIPURPOSE
automaticMemoryManagement=false
totalMemory=3072
redoLogFileSize=50
emConfiguration=NONE
nodelist=18c1,18c2
storageType=ASM
diskGroupName=+DATA
datafileDestination=+DATA
asmsnmpPassword=xxzx7817600
sampleSchema=TRUE

[oracle@18c1 ~]$ dbca -ignorePreReqs -silent  -createDatabase   -responseFile /home/oracle/dbca.rsp
[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'PDBADMIN' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
7% complete
Copying database files
27% complete
Creating and starting Oracle instance
28% complete
31% complete
35% complete
37% complete
40% complete
Creating cluster database views
41% complete
53% complete
Completing Database Creation
57% complete
59% complete
60% complete
Creating Pluggable Databases
64% complete
80% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /u01/app/oracle/cfgtoollogs/dbca/ora18c.
Database Information:
Global Database Name:ora18c
System Identifier(SID) Prefix:ora18c
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/ora18c/ora18c.log" for further details.

[grid@18c1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.DATA.dg
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.OCR.GHCHKPT.advm
               OFFLINE OFFLINE      18c1                     STABLE
               OFFLINE OFFLINE      18c2                     STABLE
ora.OCR.dg
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.helper
               OFFLINE OFFLINE      18c1                     STABLE
               OFFLINE OFFLINE      18c2                     IDLE,STABLE
ora.net1.network
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.ocr.ghchkpt.acfs
               OFFLINE OFFLINE      18c1                     volume /opt/oracle/r
                                                             hp_images/chkbase is
                                                             unmounted,STABLE
               OFFLINE OFFLINE      18c2                     STABLE
ora.ons
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
ora.proxy_advm
               ONLINE  ONLINE       18c1                     STABLE
               ONLINE  ONLINE       18c2                     STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.18c1.vip
      1        ONLINE  ONLINE       18c1                     STABLE
ora.18c2.vip
      1        ONLINE  ONLINE       18c2                     STABLE
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       18c2                     STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       18c1                     STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       18c1                     STABLE
ora.MGMTLSNR
      1        OFFLINE OFFLINE                               STABLE
ora.asm
      1        ONLINE  ONLINE       18c1                     Started,STABLE
      2        ONLINE  ONLINE       18c2                     Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       18c1                     STABLE
ora.ora18c.db
      1        ONLINE  ONLINE       18c1                     Open,HOME=/u01/app/o
                                                             racle/product/18.3/d
                                                             b,STABLE
      2        ONLINE  ONLINE       18c2                     Open,HOME=/u01/app/o
                                                             racle/product/18.3/d
                                                             b,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       18c1                     STABLE
ora.rhpserver
      1        OFFLINE OFFLINE                               STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       18c2                     STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       18c1                     STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       18c1                     STABLE
--------------------------------------------------------------------------------

也可以不指定响应文件直接使用命令行参数来执行

[oracle@18c1 ~]$ dbca -ignorePreReqs -silent -createDatabase -templateName General_Purpose.dbc -gdbName ora18c -sid ora18c -createAsContainerDatabase true -numberOfPDBs 1 -pdbName  ora18cpdb -pdbAdminPassword xxzx7817600 -sysPassword xxzx7817600 -systemPassword xxzx7817600 -datafileDestination 'data/' -redoLogFileSize 50   -storageType ASM  -responseFile NO_VALUE  -characterset ZHS16GBK -nationalCharacterSet AL16UTF16    -sampleSchema  true -automaticMemoryManagement false -totalMemory 3072 -databaseType MULTIPURPOSE -nodelist 18c1,18c2 -listeners ASMNET1LSNR_ASM,LISTENER,LISTENER_SCAN2
[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'PDBADMIN' password entered does not conform to the Oracle recommended standards.
   CAUSE: 
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
   ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
7% complete
Copying database files
27% complete
Creating and starting Oracle instance
28% complete
31% complete
35% complete
37% complete
40% complete
Creating cluster database views
41% complete
53% complete
Completing Database Creation
57% complete
59% complete
60% complete
Creating Pluggable Databases
64% complete
80% complete
Executing Post Configuration Actions
100% complete
Database creation complete. For details check the logfiles at:
 /u01/app/oracle/cfgtoollogs/dbca/ora18c.
Database Information:
Global Database Name:ora18c
System Identifier(SID) Prefix:ora18c
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/ora18c/ora18c.log" for further details.

测试连接

[oracle@18c1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Wed Sep 14 15:32:38 2022
Version 18.3.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.


Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

SQL> desc v$version;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 BANNER                                             VARCHAR2(80)
 BANNER_FULL                                        VARCHAR2(160)
 BANNER_LEGACY                                      VARCHAR2(80)
 CON_ID                                             NUMBER



SQL> select * from v$version;

BANNER                                                                           BANNER_FULL                                                                                                                                                BANNER_LEGACY                                                                 CON_ID
-------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------- ----------
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production           Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production                                                                                     Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production             0
                                                                                 Version 18.3.0.0.0


SQL> show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORA18CPDB                      READ WRITE NO

MySQL 拷贝一个InnoDB分区表到另一个实例

拷贝一个InnoDB分区表到另一个实例
这个过程演示了如何将一个InnoDB分区表从一个正在运行的MySQL服务器实例复制到另一个正在运行的实例。同样的过程,只要稍微做些调整,就可以在同一个实例上对InnoDB分区表执行完全恢复。

1.在源实例上,如果不存在分区表,则创建分区表。在下面的例子中,创建了一个包含三个分区(p0, p1, p2)的表

mysql> use test;
Database changed
mysql> create table t1(i int) engine=innodb partition by key(i) partitions 3;
Query OK, 0 rows affected (0.38 sec)

mysql> insert into t1 values(1),(2),(3),(4),(5),(6),(7),(8),(9);
Query OK, 9 rows affected (0.03 sec)
Records: 9  Duplicates: 0  Warnings: 0
mysql> select * from t1;
+------+
| i    |
+------+
|    4 |
|    5 |
|    1 |
|    6 |
|    7 |
|    2 |
|    3 |
|    8 |
|    9 |
+------+
9 rows in set (0.00 sec)

在/mysqldata/mysql/test目录中,对于三个分区都有一个单独的表空间(.ibd)文件:

[root@localhost ~]# cd /mysqldata/mysql/test
[root@localhost test]# ls -lrt
总用量 304
-rw-r-----. 1 mysql mysql    67 3月  15 16:53 db.opt
-rw-r-----. 1 mysql mysql  8554 3月  16 15:43 t1.frm
-rw-r-----. 1 mysql mysql 98304 3月  16 15:43 t1#P#p1.ibd
-rw-r-----. 1 mysql mysql 98304 3月  16 15:43 t1#P#p2.ibd
-rw-r-----. 1 mysql mysql 98304 3月  16 15:43 t1#P#p0.ibd

2.在目标实例上,创建相同的分区表:

mysql> use test;
Database changed
mysql> create table t1(i int) engine=innodb partition by key(i) partitions 3;
Query OK, 0 rows affected (0.20 sec)

在/mysqldata/mysql/test目录中,对于三个分区都有一个单独的表空间(.ibd)文件:

[root@localhost ~]# cd /mysqldata/mysql/test
[root@localhost test]# ls -lrt
总用量 304
-rw-r-----. 1 mysql mysql    67 3月  15 16:55 db.opt
-rw-r-----. 1 mysql mysql  8554 3月  16 15:45 t1.frm
-rw-r-----. 1 mysql mysql 98304 3月  16 15:45 t1#P#p0.ibd
-rw-r-----. 1 mysql mysql 98304 3月  16 15:45 t1#P#p1.ibd
-rw-r-----. 1 mysql mysql 98304 3月  16 15:45 t1#P#p2.ibd

3.在目标实例上,丢弃分区表的表空间。(在将表空间导入目标实例之前,必须丢弃附加到接收表的表空间。)

mysql> alter table t1 discard tablespace;
Query OK, 0 rows affected (0.09 sec)

组成分区表表空间的三个.ibd文件从/mysqldata/mysql/tes目录中被丢弃,留下以下文件

[root@localhost ~]# cd /mysqldata/mysql/test
[root@localhost test]# ls -lrt
总用量 16
-rw-r-----. 1 mysql mysql   67 3月  15 16:55 db.opt
-rw-r-----. 1 mysql mysql 8554 3月  16 15:45 t1.frm

4.在源实例上,运行FLUSH TABLES… FOR EXPORT用于暂停分区表并创建.cfg元数据文件

mysql> flush tables t1 for export;
Query OK, 0 rows affected (0.01 sec)

在源实例的/mysqldata/mysql/test目录中创建元数据(.cfg)文件,每个表空间(.ibd)文件对应一个元数据文件

[root@localhost ~]# cd /mysqldata/mysql/test
[root@localhost test]# ls -lrt
总用量 316
-rw-r-----. 1 mysql mysql    67 3月  15 16:53 db.opt
-rw-r-----. 1 mysql mysql  8554 3月  16 15:43 t1.frm
-rw-r-----. 1 mysql mysql 98304 3月  16 15:43 t1#P#p1.ibd
-rw-r-----. 1 mysql mysql 98304 3月  16 15:43 t1#P#p2.ibd
-rw-r-----. 1 mysql mysql 98304 3月  16 15:43 t1#P#p0.ibd
-rw-r-----. 1 mysql mysql   375 3月  16 16:00 t1#P#p1.cfg
-rw-r-----. 1 mysql mysql   375 3月  16 16:00 t1#P#p0.cfg
-rw-r-----. 1 mysql mysql   375 3月  16 16:00 t1#P#p2.cfg

FLUSH TABLES……FOR EXPORT语句确保对指定表的更改已刷新到磁盘,以便在实例运行时可以进行二进制表拷贝。当运行FLUSH TABLES … FOR EXPORT时,InnoDB会在数据库目录中为表的表空间文件生成一个.cfg元数据文件。.cfg文件中包含导入表空间文件时验证模式的元数据。FLUSH TABLES … FOR EXPORT只能在表上运行,而不能在单独的表分区上运行。

5.将.ibd和.cfg文件从源实例数据库目录复制到目标实例数据库目录。例如

[root@localhost test]# scp t1*.{ibd,cfg} mysql@192.168.1.243:/mysqldata/mysql/test/
mysql@192.168.1.243's password:
t1#P#p0.ibd                                                                                                                                                                                              100%   96KB  96.0KB/s   00:00
t1#P#p1.ibd                                                                                                                                                                                              100%   96KB  96.0KB/s   00:00
t1#P#p2.ibd                                                                                                                                                                                              100%   96KB  96.0KB/s   00:00
t1#P#p0.cfg                                                                                                                                                                                              100%  375     0.4KB/s   00:00
t1#P#p1.cfg                                                                                                                                                                                              100%  375     0.4KB/s   00:00
t1#P#p2.cfg                                                                                                                                                                                              100%  375     0.4KB/s   00:00
[root@localhost test]#

[root@localhost test]# ls -lrt
总用量 316
-rw-r-----. 1 mysql mysql    67 3月  15 16:55 db.opt
-rw-r-----. 1 mysql mysql  8554 3月  16 15:45 t1.frm
-rw-r-----. 1 mysql mysql 98304 3月  16 16:06 t1#P#p0.ibd
-rw-r-----. 1 mysql mysql 98304 3月  16 16:06 t1#P#p1.ibd
-rw-r-----. 1 mysql mysql 98304 3月  16 16:06 t1#P#p2.ibd
-rw-r-----. 1 mysql mysql   375 3月  16 16:06 t1#P#p0.cfg
-rw-r-----. 1 mysql mysql   375 3月  16 16:06 t1#P#p1.cfg
-rw-r-----. 1 mysql mysql   375 3月  16 16:06 t1#P#p2.cfg

6.在源实例上,使用unlock tables语句来释放由flush tables … for export所获取的锁:

mysql> unlock tables;
Query OK, 0 rows affected (0.00 sec)

在源实例上释放锁时,会向mysql日志文件写入删除.cfg文件的信息:

2022-03-16T08:08:27.653352Z 10 [Note] InnoDB: Deleting the meta-data file './test/t1#P#p0.cfg'
2022-03-16T08:08:27.653656Z 10 [Note] InnoDB: Deleting the meta-data file './test/t1#P#p1.cfg'
2022-03-16T08:08:27.654214Z 10 [Note] InnoDB: Deleting the meta-data file './test/t1#P#p2.cfg'
2022-03-16T08:08:27.654256Z 10 [Note] InnoDB: Resuming purge

7.在目标实例上,导入表空间:

mysql> select * from t1;
ERROR 1814 (HY000): Tablespace has been discarded for table 't1'
mysql> alter table t1 discard tablespace;
Query OK, 0 rows affected (0.09 sec)

mysql> alter table t1 import tablespace;
Query OK, 0 rows affected (0.46 sec)

mysql> select * from t1;
+------+
| i    |
+------+
|    4 |
|    5 |
|    1 |
|    6 |
|    7 |
|    2 |
|    3 |
|    8 |
|    9 |
+------+
9 rows in set (0.01 sec)

MySQL 传输表空间

将file-per-table表空间复制到另一个实例
如何将一个file-per-table表空间从一个MySQL实例复制到另一个实例中,也就是众所周知的可传输表空间特性。

有很多原因可以解释为什么你可以将一个InnoDB文件表空间复制到不同的实例中:
.在不增加生产服务器额外负载的情况下运行报表。

.在新的从服务器上为表设置相同的数据

.在出现问题或错误后恢复表或分区的备份版本。

.作为一种比mysqldump命令导入更快的移动数据的方法。数据立即可用,而不需要重新插入和重建索引

.将每个file-per-table表空间移动到具有更适合系统需求的存储介质的服务器。例如,您可能希望在SSD设备上有繁忙的表,或者在高容量HDD设备上有大型表。

限制和使用说明
.只有当innodb_file_per_table设置为ON(默认设置)时,才可以拷贝表空间。驻留在共享系统表空间中的表不能被静默。

.当一个表被静默时,只允许在受影响的表上执行只读事务

.在导入表空间时,页面大小必须与导入实例的页面大小相匹配。

.当foreign_key_checks设置为1时,对于父-子(主-外键)关系的表空间不支持DISCARD TABLESPACE。在丢弃父-子表的表空间之前,设置foreign_key_checks=0。分区InnoDB表不支持外键。

.ALTER TABLE……IMPORT TABLESPACE不会对导入的数据强制外键约束。如果表之间存在外键约束,那么所有表都应该在同一(逻辑)时间点导出。分区InnoDB表不支持外键。

.ALTER TABLE……IMPORT TABLESPACE 和 ALTER TABLE…IMPORT PARTITION…TABLESPACE不需要.cfg元数据文件来导入一个表空间。但是,如果导入时没有.cfg文件,则不会执行元数据检查,并且会发出类似于下面的警告:

Message: InnoDB: IO Read error: (2, No such file or directory) Error opening '.\
test\t.cfg', will attempt to import without schema verification
1 row in set (0.00 sec)

在期待没用模式不匹配的情况下,不使用.cfg文件进行导入可能会更方便。此外,在无法从.ibd文件收集元数据的崩溃恢复场景中,不需要.cfg文件就可以导入。

.由于.cfg元数据文件的限制,当为分区表导入表空间文件时,不会对分区类型或分区定义差异报告模式不匹配。列差异被报告。

.当在子分区表上运行ALTER TABLE … DISCARD PARTITION … TABLESPACE和ALTER TABLE … IMPORT PARTITION … TABLESPACE,分区和子分区表名都是允许的。当指定分区名时,该分区的子分区将包含在操作中。

.如果两个实例都有GA(通用可用性)状态,并且它们的版本在同一系列可以从另一个MySQL服务器实例导入表空间文件。否则,该文件必须是在导入它的同一个服务器实例上所创建

.在复制场景中,innodb_file_per_table必须在主节点和从节点上都设置为ON。

.在Windows环境下,InnoDB内部存储数据库、表空间和表名时使用小写字母。为了避免在区分大小写的操作系统(如Linux、UNIX)上的导入问题,请在创建数据库、表空间和表时使用小写名称。一种方便的方法是在创建数据库、表空间或表之前,在my.cnf或my.ini文件的[mysqld]部分中添加下面这一行:

[mysqld]
lower_case_table_names=1

.alter table … discard tablespace和alter table … import tabelspace不支持属于InnoDB通用表空间中的表。

.InnoDB表的默认行格式可以通过innodb_default_row_format配置选项进行配置。如果导入的表没有明确定义行格式(ROW_FORMAT),或者使用了ROW_FORMAT=DEFAULT,那么如果源实例上的innodb_default_row_format设置与目标实例上的innodb_default_row_format设置不一致,可能会导致模式不匹配错误

.在使用InnoDB表空间加密特性导出加密的表空间时,InnoDB除了生成一个.cfg元数据文件外,还会生成一个.cfp文件。在目标实例上执行ALTER TABLE…IMPORT TABLESPACE之前,必须将.cfp文件与.cfg文件和表空间文件一起复制到目标实例中。cfp文件包含一个传输密钥和一个加密的表空间密钥。在导入时,InnoDB使用传输密钥来解密表空间密钥。

传输表空间示例
例如1:复制一个InnoDB表到另一个实例
这个过程演示了如何将一个普通的InnoDB表从一个正在运行的MySQL服务器实例复制到另一个正在运行的实例。可以使用相同的过程在相同的实例上执行全表恢复,只是做了一些小小的调整。
1. 在源实例上,如果不存在表,则创建一个表:

mysql> use test;
Database changed
mysql> create table t(c1 int) engine=innodb;
Query OK, 0 rows affected (0.12 sec)

mysql> insert into t values(1);
Query OK, 1 row affected (0.16 sec)

2.在目标实例上,如果不存在表,则创建表:

mysql> use test;
Database changed
mysql> create table t(c1 int) engine=innodb;
Query OK, 0 rows affected (0.09 sec)

3.在目标实例上,丢弃现有的表空间。(在导入表空间之前,InnoDB必须丢弃连接到接收表空间的表空间。)

[mysql@localhost test]$ ls -lrt
总用量 112
-rw-r-----. 1 mysql mysql    67 3月  15 16:55 db.opt
-rw-r-----. 1 mysql mysql  8556 3月  15 16:57 t.frm
-rw-r-----. 1 mysql mysql 98304 3月  15 16:57 t.ibd

mysql> alter table t discard tablespace;
Query OK, 0 rows affected (0.17 sec)



[mysql@localhost test]$ ls -lrt
总用量 16
-rw-r-----. 1 mysql mysql   67 3月  15 16:55 db.opt
-rw-r-----. 1 mysql mysql 8556 3月  15 16:57 t.frm

4.在源实例上,运行FLUSH TABLES…FOR EXPORT将暂停表并创建.cfg元数据文件

mysql> flush tables t for export;
Query OK, 0 rows affected (0.00 sec)


[mysql@localhost test]$ ls -lrt
总用量 116
-rw-r-----. 1 mysql mysql    67 3月  15 16:53 db.opt
-rw-r-----. 1 mysql mysql  8556 3月  15 16:54 t.frm
-rw-r-----. 1 mysql mysql 98304 3月  15 16:54 t.ibd
-rw-r-----. 1 mysql mysql   371 3月  15 17:00 t.cfg

在InnoDB数据目录下创建元数据(.cfg)
注意:FLUSH TABLES …… FOR EXPORT在MySQL 5.6.6版本中可用。该语句确保对指定表的更改已刷新到磁盘,以便在实例运行时可以生成二进制表副本。当FLUSH TABLES … FOR EXPORT时,InnoDB会在表所在的数据库目录中生成一个.cfg文件。cfg文件中包含导入表空间文件时用于模式验证的元数据。

5.将.ibd文件和.cfg元数据文件从源实例复制到目标实例

[mysql@localhost test]$ scp t.{ibd,cfg} mysql@192.168.1.243:/mysqldata/mysql/test/
mysql@192.168.1.243's password:
t.ibd                                                                                                                                                                                                    100%   96KB  96.0KB/s   00:00
t.cfg                                                                                                                                                                                                    100%  371     0.4KB/s   00:00
[mysql@localhost test]$

在释放共享锁之前必须复制.ibd与.cfg文件。

6.在源实例上,使用unlock tables语句来释放由flush tables … for export所获取的锁:

mysql> unlock tables;
Query OK, 0 rows affected (0.00 sec)

7.在目标实例上,导入表空间:
mysql> alter table t import tablespace;
Query OK, 0 rows affected (0.15 sec)

mysql> desc t;
+-------+---------+------+-----+---------+-------+
| Field | Type    | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| c1    | int(11) | YES  |     | NULL    |       |
+-------+---------+------+-----+---------+-------+
1 row in set (0.00 sec)

mysql> select * from t;
+------+
| c1   |
+------+
|    1 |
+------+
1 row in set (0.00 sec)

可以看到表t从一个实例迁移到另一个实例上。

DM8 配置DMDSC主备环境(rac到单节点 )

配置DMDSC主备环境
DMDSC主备环境搭建和单节点主备环境搭建步骤类似,区别主要在于首先要准备DMDSC集群环境。

配置说明
DMDSC集群可以作为主库,也可以作为实时备库、即时备库或者异步备库,当DMDSC集群作为备库配置在数据守护系统中时,要将DMDSC集群作为一个整体配置在源库的dmarch.ini中,也就是DMDSC集群所有节点要配置在同一个归档配置项中,每个节点实例名以“/”分隔开来。

假如DMDSC集群有两个节点GRP1_RT_DSC01和GRP1_RT_DSC02,DMDSC集群要作为备库进行配置,其源库为A,则要在A的dmarch.ini文件中增加DMDSC集群的归档配置,这里以实时备库为例说明如下:

[ARCHIVE_REALTIME1]
ARCH_TYPE = REALTIME
ARCH_DEST = GRP1_RT_DSC01/GRP1_RT_DSC02

如果DMDSC集群要作为即时备库或者异步备库来配置,ARCH_DEST的配置方式和示例中是相同的,ARCH_TYPE则要分别替换为TIMELY或者ASYNC,中括号内的配置项名称中包含的归档类型也建议修改和ARCH_TYPE一致。

环境说明
下面以DMDSC集群和单节点之间搭建实时主备环境为例,对搭建步骤进行说明。

下列机器事先都安装了DM8,安装路径为’/dm8’,执行程序保存在’/dm8/bin’目录中,数据存放路径为’/dm8/data’。

各主备库的实例名建议采用“组名_守护环境_序号”的方式命名,方便按组区分不同实例,注意总长度不能超过16。本示例中组名为“GRP1”,配置为实时主备,主库DMDSC集群的三个节点实例名分别命名为“rac1”、“rac2”,备库命名为“rac_st”。

本次部署为2节点DSC为主库,单机达梦为物理备库

IP规划:

主机名	  服务ip	        心跳ip	        实例名	节点用途
dm8rac1	  10.10.13.201	10.10.13.201	rac1	rac节点1
dm8rac2	  10.10.13.202	10.10.13.202	rac2	rac节点2
dm8rac_st 10.10.13.227	10.10.13.227	rac_st	rac备库

端口规划:

实例名    port_num    mal_inst_dw_port    mal_host          mal_port    mal_dw_port  CSS端口	ASM端口	ASM的MAL端口	DCR检查实例端口
dm1       5236        5237                10.10.13.201      5238        5239         5240       5241    5242            5243
dm2       5236        5237                10.10.13.202      5238        5239         5240       5241    5242            5243
rac_st    5236        5237                10.10.13.227      5238        5239

DSC集群部署
共享存储

/dev/sdb	/dev/raw/raw1	dcr disk	10G
/dev/sdc	/dev/raw/raw2	voting disk	10G
/dev/sdd	/dev/raw/raw3	log disk	10G
/dev/sde	/dev/raw/raw4	data disk1	10G
/dev/sdf	/dev/raw/raw5	data disk2	10G
/dev/sdg	/dev/raw/raw6	data disk3	10G

二、操作系统配置
1、关闭防火墙和SELINUX

[root@gbase ~]# systemctl stop firewalld
[root@gbase ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@gbase ~]# systemctl status firewalld
   firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

Dec 06 17:22:42 gbase systemd[1]: Starting firewalld - dynamic firewall daemon...
Dec 06 17:22:48 gbase systemd[1]: Started firewalld - dynamic firewall daemon.
Dec 07 08:21:59 gbase systemd[1]: Stopping firewalld - dynamic firewall daemon...
Dec 07 08:22:00 gbase systemd[1]: Stopped firewalld - dynamic firewall daemon.

[root@gbase ~]# setenforce 0
[root@gbase ~]# sed -i s:^SELINUX=.*$:SELINUX=disabled:g /etc/selinux/config
[root@gbase ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted


[root@gbase ~]# systemctl stop firewalld
[root@gbase ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@gbase ~]# systemctl status firewalld
   firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:firewalld(1)

Dec 06 17:22:45 gbase systemd[1]: Starting firewalld - dynamic firewall daemon...
Dec 06 17:22:51 gbase systemd[1]: Started firewalld - dynamic firewall daemon.
Dec 07 08:19:39 gbase systemd[1]: Stopping firewalld - dynamic firewall daemon...
Dec 07 08:19:40 gbase systemd[1]: Stopped firewalld - dynamic firewall daemon.
[root@gbase ~]# setenforce 0
[root@gbase ~]# sed -i s:^SELINUX=.*$:SELINUX=disabled:g /etc/selinux/config
[root@gbase ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

2、修改主机名

[root@gbase ~]# hostname dm8rac1
[root@gbase ~]# sed -i s:^HOSTNAME=.*$:HOSTNAME=dm8rac1:g /etc/sysconfig/network
[root@gbase ~]# echo "
 > 10.10.13.201   dm8rac1
 > 10.10.13.202   dm8rac2" >> /etc/hosts
[root@gbase ~]# cat  /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

 10.10.13.201   dm8rac1
 10.10.13.202   dm8rac2


[root@gbase ~]# hostname dm8rac2
[root@gbase ~]# sed -i s:^HOSTNAME=.*$:HOSTNAME=dm8rac2:g /etc/sysconfig/network
[root@gbase ~]#
[root@gbase ~]# echo "
>  10.10.13.201   dm8rac1
>  10.10.13.202   dm8rac2" >> /etc/hosts
[root@gbase ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

 10.10.13.201   dm8rac1
 10.10.13.202   dm8rac2

三、 安装达梦软件

3.1检查Linux(Unix)系统信息

[root@dm8rac1 ~]# getconf LONG_BIT
64

[root@dm8rac2 ~]# getconf LONG_BIT
64

查询操作系统release信息

[root@dm8rac1 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.8 Beta (Maipo)

[root@dm8rac2 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.8 Beta (Maipo)

3.2创建安装用户
为了减少对操作系统的影响,用户不应该以root系统用户来安装和运行DM。用户可以在安装之前为DM创建一个专用的系统用户。
1. 创建安装用户组dinstall。

[root@dm8rac1 ~]# groupadd dinstall

[root@dm8rac2 ~]# groupadd dinstall

2. 创建安装用户dmdba。

[root@dm8rac1 ~]# useradd -g dinstall -m -d /home/dmdba -s /bin/bash dmdba

[root@dm8rac2 ~]# useradd -g dinstall -m -d /home/dmdba -s /bin/bash dmdba

3. 初始化用户密码。

[root@dm8rac1 ~]# passwd dmdba
Changing password for user dmdba.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

[root@dm8rac2 ~]# passwd dmdba
Changing password for user dmdba.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

3.3 Linux(Unix)下检查操作系统限制
在Linux(Unix)系统中,因为ulimit命令的存在,会对程序使用操作系统资源进行限制。为了使DM能够正常运行,建议用户检查当前安装用户的ulimit参数。

运行ulimit -a进行查询。如下图所示:

[root@dm8rac1 ~]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 31152
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 31152
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

[root@dm8rac2 ~]# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 31152
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 31152
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

参数使用限制:
1.data seg size
data seg size (kbytes, -d)
建议用户设置为1048576(即1GB)以上或unlimited(无限制),此参数过小将导致数据库启动失败。
2. file size
file size(blocks, -f)
建议用户设置为unlimited(无限制),此参数过小将导致数据库安装或初始化失败。
3. open files
open files(-n)
建议用户设置为65536以上或unlimited(无限制)。
4.virtual memory
virtual memory (kbytes, -v)
建议用户设置为1048576(即1GB)以上或unlimited(无限制),此参数过小将导致数据库启动失败。

如果用户需要为当前安装用户更改ulimit的资源限制,请修改文件/etc/security/limits.conf。

[root@dm8rac1 ~]# vi /etc/security/limits.conf
dmdba soft data unlimited
dmdba hard data unlimited
dmdba soft fsize unlimited
dmdba hard fsize unlimited
dmdba soft nofile 65536
dmdba hard nofile 65536

[root@dm8rac2 ~]# vi /etc/security/limits.conf
dmdba soft data unlimited
dmdba hard data unlimited
dmdba soft fsize unlimited
dmdba hard fsize unlimited
dmdba soft nofile 65536
dmdba hard nofile 65536

[root@dm8rac1 ~]# su - dmdba
[dmdba@dm8rac1 ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 31152
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 4096
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited


[root@dm8rac2 ~]# su - dmdba
[dmdba@dm8rac2 ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 31152
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 4096
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

3.4.检查系统内存与存储空间
1.检查内存
为了保证DM的正确安装和运行,要尽量保证操作系统至少1GB的可用内存(RAM)。如果可用内存过少,可能导致DM安装或启动失败。用户可以
使用以下命令检查操作内存:
#获取内存总大小

[root@dm8rac1 ~]# grep MemTotal /proc/meminfo
MemTotal:        8009068 kB

[root@dm8rac12 ~]# grep MemTotal /proc/meminfo
MemTotal:        8009068 kB

#获取交换分区大小

[root@dm8rac1 ~]# grep SwapTotal /proc/meminfo
SwapTotal:       8257532 kB

[root@dm8rac2 ~]# grep SwapTotal /proc/meminfo
SwapTotal:       8257532 kB

#获取内存使用详情

[root@dm8rac1 ~]# free -g
              total        used        free      shared  buff/cache   available
Mem:              7           0           6           0           0           6
Swap:             7           0           7

[root@dm8rac2 ~]# free -g
              total        used        free      shared  buff/cache   available
Mem:              7           0           6           0           0           6
Swap:             7           0           7

2.检查存储空间
1) DM完全安装需要1GB的存储空间,用户需要提前规划好安装目录,预留足够的存储空间。用户在DM安装前也应该为数据库实例预留足够的存储空间,规划好数据路径和备份路径。用户可使用以下命令检查存储空间:
#查询目录/dm8可用空间

[root@dm8rac1 ~]# mkdir /dm8
[root@dm8rac1 ~]# chown -R dmdba:dinstall /dm8
[root@dm8rac1 ~]# chmod -R 775 /dm8

[root@dm8rac2 ~]# mkdir /dm8
[root@dm8rac2 ~]# chown -R dmdba:dinstall /dm8
[root@dm8rac2 ~]# chmod -R 775 /dm8

[root@dm8rac1 ~]# df -h /dm8
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root   48G  5.6G   43G  12% /


[root@dm8rac2 ~]# df -h /dm8
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root   48G  5.6G   43G  12% /

2) DM安装程序在安装时将产生临时文件,临时文件需要1GB的存储空间,临时文件目录默认为/tmp。用户可以使用以下命令检查存储空间。
如下图所示:

[root@dm8rac1 ~]# df -h /tmp
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root   48G  5.6G   43G  12% /


[root@dm8rac2 ~]# df -h /tmp
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root   48G  5.6G   43G  12% /

3.5.安装DM
创建目录/soft/dmsoft用来存储挂载iso文件后来显示软件包中的文件

[root@dm8rac1 ~]# cd /soft
[root@dm8rac1 soft]# unzip dm8_20211021_x86_rh6_64_ent.zip
Archive:  dm8_20211021_x86_rh6_64_ent.zip
   creating: dm8_20211021_x86_rh6_64_ent/
  inflating: dm8_20211021_x86_rh6_64_ent/dm8_20211021_x86_rh6_64_ent_8.1.2.84.iso
 extracting: dm8_20211021_x86_rh6_64_ent/dm8_20211021_x86_rh6_64_ent_8.1.2.84.iso_SHA256.txt
 extracting: dm8_20211021_x86_rh6_64_ent/verinfo.txt
[root@dm8rac1 soft]# ls -lrt
total 778320
drwxr-xr-x. 2 root root       132 Nov 12 13:43 dm8_20211021_x86_rh6_64_ent
-rw-r--r--. 1 root root 796998047 Nov 29 10:25 dm8_20211021_x86_rh6_64_ent.zip
[root@dm8rac1 soft]# mv dm8_20211021_x86_rh6_64_ent dm8
[root@dm8rac1 soft]# ls -lrt
total 778320
drwxr-xr-x. 2 root root       132 Nov 12 13:43 dm8
-rw-r--r--. 1 root root 796998047 Nov 29 10:25 dm8_20211021_x86_rh6_64_ent.zip

[root@dm8rac1 soft]# mkdir dmsoft
[root@dm8rac1 soft]# mount -t iso9660 -o loop dm8/dm8_20211021_x86_rh6_64_ent_8.1.2.84.iso  /soft/dmsoft
mount: /dev/loop0 is write-protected, mounting read-only

[root@dm8rac1 soft]# cd dmsoft
[root@dm8rac1 dmsoft]# ls -lrt
total 790160
-r-xr-xr-x. 1 root root   2802503 Oct 21 14:04 DM8 Install.pdf
-r-xr-xr-x. 1 root root 806320703 Oct 21 14:11 DMInstall.bin


[root@dm8rac12 ~]# cd /soft
[root@dm8rac2 soft]# unzip dm8_20211021_x86_rh6_64_ent.zip
Archive:  dm8_20211021_x86_rh6_64_ent.zip
   creating: dm8_20211021_x86_rh6_64_ent/
  inflating: dm8_20211021_x86_rh6_64_ent/dm8_20211021_x86_rh6_64_ent_8.1.2.84.iso
 extracting: dm8_20211021_x86_rh6_64_ent/dm8_20211021_x86_rh6_64_ent_8.1.2.84.iso_SHA256.txt
 extracting: dm8_20211021_x86_rh6_64_ent/verinfo.txt
[root@dm8rac2 soft]# ls -lrt
total 778320
drwxr-xr-x. 2 root root       132 Nov 12 13:43 dm8_20211021_x86_rh6_64_ent
-rw-r--r--. 1 root root 796998047 Nov 29 10:25 dm8_20211021_x86_rh6_64_ent.zip
[root@dm8rac2 soft]# mv dm8_20211021_x86_rh6_64_ent dm8
[root@dm8rac2 soft]# ls -lrt
total 778320
drwxr-xr-x. 2 root root       132 Nov 12 13:43 dm8
-rw-r--r--. 1 root root 796998047 Nov 29 10:25 dm8_20211021_x86_rh6_64_ent.zip

[root@dm8rac2 soft]# mkdir dmsoft
[root@dm8rac2 soft]# mount -t iso9660 -o loop dm8/dm8_20211021_x86_rh6_64_ent_8.1.2.84.iso  /soft/dmsoft
mount: /dev/loop0 is write-protected, mounting read-only

[root@dm8rac2 soft]# cd dmsoft
[root@dm8rac2 dmsoft]# ls -lrt
total 790160
-r-xr-xr-x. 1 root root   2802503 Oct 21 14:04 DM8 Install.pdf
-r-xr-xr-x. 1 root root 806320703 Oct 21 14:11 DMInstall.bin

在/soft/dmsoft目录下存在DMInstall.bin文件, DMInstall.bin文件就是DM的安装程序。在运行安装程序前,需要赋予DMInstall.bin文件执行权限。具体命令如下所示:

[root@dm8rac1 dmsoft]# chmod 755  DMInstall.bin
chmod: changing permissions of ‘DMInstall.bin’: Read-only file system


[root@dm8rac2 dmsoft]# chmod 755  DMInstall.bin
chmod: changing permissions of ‘DMInstall.bin’: Read-only file system

在现实中,许多Linux(Unix)操作系统上是没有图形化界面的,为了使DM能够在这些操作系统上顺利安装,DM提供了命令行的安装方式。在终端进入到安装程序所在文件夹,执行以下命令进行命令行安装:

[dmdba@dm8rac1 dmsoft]$ ./DMInstall.bin -i
Please select the installer's language (E/e:English C/c:Chinese) [E/e]:e
Extract install files.........
Welcome to DM DBMS Installer

Whether to input the path of Key File? (Y/y:Yes N/n:No) [Y/y]:n

Whether to Set The TimeZone? (Y/y:Yes N/n:No) [Y/y]:y
TimeZone:
[ 1]: GTM-12=West Date Line
[ 2]: GTM-11=Samoa
[ 3]: GTM-10=Hawaii
[ 4]: GTM-09=Alaska
[ 5]: GTM-08=Pacific(America and Canada)
[ 6]: GTM-07=Arizona
[ 7]: GTM-06=Central(America and Canada)
[ 8]: GTM-05=East(America and Canada)
[ 9]: GTM-04=Atlantic(America and Canada)
[10]: GTM-03=Brasilia
[11]: GTM-02=Middle Atlantic
[12]: GTM-01=Azores
[13]: GTM=Greenwich Mean Time
[14]: GTM+01=Sarajevo
[15]: GTM+02=Cairo
[16]: GTM+03=Moscow
[17]: GTM+04=AbuDhabi
[18]: GTM+05=Islamabad
[19]: GTM+06=Dakar
[20]: GTM+07=BangKok,Hanoi
[21]: GTM+08=China
[22]: GTM+09=Seoul
[23]: GTM+10=Guam
[24]: GTM+11=Solomon
[25]: GTM+12=Fiji
[26]: GTM+13=Nukualofa
[27]: GTM+14=Kiribati
Please Select the TimeZone [21]:21

Installation Type:
1 Typical
2 Server
3 Client
4 Custom
Please Input the number of the Installation Type [1 Typical]:4
1 Server component
2 Client component
  2.1 Manager
  2.2 Monitor
  2.3 DTS
  2.4 Console
  2.5 Analyzer
  2.6 DISQL
3 DM Drivers
4 Manual component
5 DBMS Service
  5.1 Realtime Audit Service
  5.2 Job Service
  5.3 Instance Monitor Service
  5.4 Assistant Plug-In Service
Please Input the number of the Installation Type [1 2 3 4 5]:1 2 3 4 5
Require Space: 1242M

Please Input the install path [/home/dmdba/dmdbms]:/dm8
Available Space:39G
Please Confirm the install path(/dm8)? (Y/y:Yes N/n:No) [Y/y]:y

Pre-Installation Summary
Installation Location: /dm8
Require Space: 1242M
Available Space: 39G
Version Information:
Expire Date:
Installation Type: Custom
Confirm to Install? (Y/y:Yes N/n:No):y
2021-12-07 10:57:53
[INFO] Installing DM DBMS...
2021-12-07 10:57:54
[INFO] Installing BASE Module...
2021-12-07 10:57:56
[INFO] Installing SERVER Module...
2021-12-07 10:57:56
[INFO] Installing CLIENT Module...
2021-12-07 10:57:57
[INFO] Installing DRIVERS Module...
2021-12-07 10:57:57
[INFO] Installing MANUAL Module...
2021-12-07 10:57:57
[INFO] Installing SERVICE Module...
2021-12-07 10:58:03
[INFO] Move log file to log directory.
2021-12-07 10:58:05
[INFO] Installed DM DBMS completely.

Please execute the commands by root:
/dm8/script/root/root_installer.sh

End

以root用户来执行上面的脚本

[root@dm8rac1 ~]# /dm8/script/root/root_installer.sh
Move /dm8/bin/dm_svc.conf to /etc
Modify the files' mode of DM Server


[dmdba@dm8rac2 dmsoft]$ ./DMInstall.bin -i
Please select the installer's language (E/e:English C/c:Chinese) [E/e]:e
Extract install files.........
Welcome to DM DBMS Installer

Whether to input the path of Key File? (Y/y:Yes N/n:No) [Y/y]:n

Whether to Set The TimeZone? (Y/y:Yes N/n:No) [Y/y]:y
TimeZone:
[ 1]: GTM-12=West Date Line
[ 2]: GTM-11=Samoa
[ 3]: GTM-10=Hawaii
[ 4]: GTM-09=Alaska
[ 5]: GTM-08=Pacific(America and Canada)
[ 6]: GTM-07=Arizona
[ 7]: GTM-06=Central(America and Canada)
[ 8]: GTM-05=East(America and Canada)
[ 9]: GTM-04=Atlantic(America and Canada)
[10]: GTM-03=Brasilia
[11]: GTM-02=Middle Atlantic
[12]: GTM-01=Azores
[13]: GTM=Greenwich Mean Time
[14]: GTM+01=Sarajevo
[15]: GTM+02=Cairo
[16]: GTM+03=Moscow
[17]: GTM+04=AbuDhabi
[18]: GTM+05=Islamabad
[19]: GTM+06=Dakar
[20]: GTM+07=BangKok,Hanoi
[21]: GTM+08=China
[22]: GTM+09=Seoul
[23]: GTM+10=Guam
[24]: GTM+11=Solomon
[25]: GTM+12=Fiji
[26]: GTM+13=Nukualofa
[27]: GTM+14=Kiribati
Please Select the TimeZone [21]:21

Installation Type:
1 Typical
2 Server
3 Client
4 Custom
Please Input the number of the Installation Type [1 Typical]:4
1 Server component
2 Client component
  2.1 Manager
  2.2 Monitor
  2.3 DTS
  2.4 Console
  2.5 Analyzer
  2.6 DISQL
3 DM Drivers
4 Manual component
5 DBMS Service
  5.1 Realtime Audit Service
  5.2 Job Service
  5.3 Instance Monitor Service
  5.4 Assistant Plug-In Service
Please Input the number of the Installation Type [1 2 3 4 5]:1 2 3 4 5
Require Space: 1242M

Please Input the install path [/home/dmdba/dmdbms]:/dm8
Available Space:39G
Please Confirm the install path(/dm8)? (Y/y:Yes N/n:No) [Y/y]:y

Pre-Installation Summary
Installation Location: /dm8
Require Space: 1242M
Available Space: 39G
Version Information:
Expire Date:
Installation Type: Custom
Confirm to Install? (Y/y:Yes N/n:No):y
2021-12-07 10:57:53
[INFO] Installing DM DBMS...
2021-12-07 10:57:54
[INFO] Installing BASE Module...
2021-12-07 10:57:56
[INFO] Installing SERVER Module...
2021-12-07 10:57:56
[INFO] Installing CLIENT Module...
2021-12-07 10:57:57
[INFO] Installing DRIVERS Module...
2021-12-07 10:57:57
[INFO] Installing MANUAL Module...
2021-12-07 10:57:57
[INFO] Installing SERVICE Module...
2021-12-07 10:58:03
[INFO] Move log file to log directory.
2021-12-07 10:58:05
[INFO] Installed DM DBMS completely.

Please execute the commands by root:
/dm8/script/root/root_installer.sh

End

以root用户来执行上面的脚本

[root@dm8rac2 ~]# /dm8/script/root/root_installer.sh
Move /dm8/bin/dm_svc.conf to /etc
Modify the files' mode of DM Server

四、绑定UDEV
编辑/etc/udev/rules.d/60-raw.rules文件

ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd", RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sde", RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", KERNEL=="sdf", RUN+="/bin/raw /dev/raw/raw5 %N"
ACTION=="add", KERNEL=="sdg", RUN+="/bin/raw /dev/raw/raw6 %N"

ACTION=="add", KERNEL=="raw[1-6]", OWNER="dmdba", GROUP="dinstall", MODE="660"

[root@dm8rac1 rules.d]# /sbin/udevadm trigger --type=devices --action=change

[root@dm8rac2 rules.d]# /sbin/udevadm trigger --type=devices --action=change

如果不能正常显示就重启操作系统

[root@dm8rac1 ~]# ls -lrt /dev/raw
total 0
crw-rw---- 1 root  disk     162, 0 Dec  7 14:59 rawctl
crw-rw---- 1 dmdba dinstall 162, 5 Dec  7 14:59 raw5
crw-rw---- 1 dmdba dinstall 162, 6 Dec  7 14:59 raw6
crw-rw---- 1 dmdba dinstall 162, 4 Dec  7 14:59 raw4
crw-rw---- 1 dmdba dinstall 162, 3 Dec  7 14:59 raw3
crw-rw---- 1 dmdba dinstall 162, 2 Dec  7 14:59 raw2
crw-rw---- 1 dmdba dinstall 162, 1 Dec  7 14:59 raw1

[root@dm8rac2 ~]# ls -lrt /dev/raw
total 0
crw-rw---- 1 root  disk     162, 0 Dec  7 14:59 rawctl
crw-rw---- 1 dmdba dinstall 162, 5 Dec  7 14:59 raw5
crw-rw---- 1 dmdba dinstall 162, 6 Dec  7 14:59 raw6
crw-rw---- 1 dmdba dinstall 162, 4 Dec  7 14:59 raw4
crw-rw---- 1 dmdba dinstall 162, 3 Dec  7 14:59 raw3
crw-rw---- 1 dmdba dinstall 162, 2 Dec  7 14:59 raw2
crw-rw---- 1 dmdba dinstall 162, 1 Dec  7 14:59 raw1

可以通过blockdev –getsize64 /dev/raw/raw1命令查看裸设备大小

[root@dm8rac1 ~]# blockdev --getsize64 /dev/raw/raw1
2147483648
[root@dm8rac1 ~]# blockdev --getsize64 /dev/raw/raw2
2147483648
[root@dm8rac1 ~]# blockdev --getsize64 /dev/raw/raw3
10737418240
[root@dm8rac1 ~]# blockdev --getsize64 /dev/raw/raw4
10737418240
[root@dm8rac1 ~]# blockdev --getsize64 /dev/raw/raw5
10737418240
[root@dm8rac1 ~]# blockdev --getsize64 /dev/raw/raw6
10737418240


[root@dm8rac2 ~]# blockdev --getsize64 /dev/raw/raw1
2147483648
[root@dm8rac2 ~]# blockdev --getsize64 /dev/raw/raw2
2147483648
[root@dm8rac3 ~]# blockdev --getsize64 /dev/raw/raw3
10737418240
[root@dm8rac4 ~]# blockdev --getsize64 /dev/raw/raw4
10737418240
[root@dm8rac5 ~]# blockdev --getsize64 /dev/raw/raw5
10737418240
[root@dm8rac6 ~]# blockdev --getsize64 /dev/raw/raw6
10737418240

五.配置dmdcr_cfg.ini文件
在2个节点的/dm8/data目录下创建配置文件dmdcr_cfg.ini,在文件中添加如下内容:

[dmdba@dm8rac1 ~]$ mkdir /dm8/data

[dmdba@dm8rac2 ~]$ mkdir /dm8/data

[dmdba@dm8rac1 data]$ vi dmdcr_cfg.ini
DCR_N_GRP = 3
DCR_VTD_PATH = /dev/raw/raw2
DCR_OGUID = 63635

[GRP]
DCR_GRP_TYPE = CSS
DCR_GRP_NAME = GRP_CSS
DCR_GRP_N_EP = 2
DCR_GRP_DSKCHK_CNT = 60
[GRP_CSS]
DCR_EP_NAME = CSS1
DCR_EP_HOST = 10.10.13.201
DCR_EP_PORT = 5240
[GRP_CSS]
DCR_EP_NAME = CSS2
DCR_EP_HOST = 10.10.13.202
DCR_EP_PORT = 5240

[GRP]
DCR_GRP_TYPE = ASM
DCR_GRP_NAME = GRP_ASM
DCR_GRP_N_EP = 2
DCR_GRP_DSKCHK_CNT = 60
[GRP_ASM]
DCR_EP_NAME = ASM1
DCR_EP_SHM_KEY = 93360
DCR_EP_SHM_SIZE = 10
DCR_EP_HOST = 10.10.13.201
DCR_EP_PORT = 5241
DCR_EP_ASM_LOAD_PATH = /dev/raw
[GRP_ASM]
DCR_EP_NAME = ASM2
DCR_EP_SHM_KEY = 93361
DCR_EP_SHM_SIZE = 10
DCR_EP_HOST = 10.10.13.202
DCR_EP_PORT = 5241
DCR_EP_ASM_LOAD_PATH = /dev/raw

[GRP]
DCR_GRP_TYPE = DB
DCR_GRP_NAME = GRP_RAC
DCR_GRP_N_EP = 2
DCR_GRP_DSKCHK_CNT = 60
[GRP_RAC]
DCR_EP_NAME = RAC1
DCR_EP_SEQNO = 0
DCR_EP_PORT = 5236
DCR_CHECK_PORT = 5243
[GRP_RAC]
DCR_EP_NAME = RAC2
DCR_EP_SEQNO = 1
DCR_EP_PORT = 5236
DCR_CHECK_PORT = 5243

[dmdba@dm8rac2 data]$ vi dmdcr_cfg.ini
DCR_N_GRP = 3
DCR_VTD_PATH = /dev/raw/raw2
DCR_OGUID = 63635

[GRP]
DCR_GRP_TYPE = CSS
DCR_GRP_NAME = GRP_CSS
DCR_GRP_N_EP = 2
DCR_GRP_DSKCHK_CNT = 60
[GRP_CSS]
DCR_EP_NAME = CSS1
DCR_EP_HOST = 10.10.13.201
DCR_EP_PORT = 5240
[GRP_CSS]
DCR_EP_NAME = CSS2
DCR_EP_HOST = 10.10.13.202
DCR_EP_PORT = 5240

[GRP]
DCR_GRP_TYPE = ASM
DCR_GRP_NAME = GRP_ASM
DCR_GRP_N_EP = 2
DCR_GRP_DSKCHK_CNT = 60
[GRP_ASM]
DCR_EP_NAME = ASM1
DCR_EP_SHM_KEY = 93360
DCR_EP_SHM_SIZE = 10
DCR_EP_HOST = 10.10.13.201
DCR_EP_PORT = 5241
DCR_EP_ASM_LOAD_PATH = /dev/raw
[GRP_ASM]
DCR_EP_NAME = ASM2
DCR_EP_SHM_KEY = 93361
DCR_EP_SHM_SIZE = 10
DCR_EP_HOST = 10.10.13.202
DCR_EP_PORT = 5241
DCR_EP_ASM_LOAD_PATH = /dev/raw

[GRP]
DCR_GRP_TYPE = DB
DCR_GRP_NAME = GRP_RAC
DCR_GRP_N_EP = 2
DCR_GRP_DSKCHK_CNT = 60
[GRP_RAC]
DCR_EP_NAME = RAC1
DCR_EP_SEQNO = 0
DCR_EP_PORT = 5236
DCR_CHECK_PORT = 5243
[GRP_RAC]
DCR_EP_NAME = RAC2
DCR_EP_SEQNO = 1
DCR_EP_PORT = 5236
DCR_CHECK_PORT = 5243

六.使用 DMASMCMD 工具初始化(任意一节点执行)

[dmdba@dm8rac1 ~]$ dmasmcmd
DMASMCMD V8
ASM>create dcrdisk '/dev/raw/raw1' 'dcr'
[Trace]The ASM initialize dcrdisk /dev/raw/raw1 to name DMASMdcr
Used time: 334.533(ms).
ASM>create votedisk '/dev/raw/raw2' 'vote'
[Trace]The ASM initialize votedisk /dev/raw/raw2 to name DMASMvote
Used time: 192.761(ms).
ASM>create asmdisk '/dev/raw/raw3' 'LOG0'
[Trace]The ASM initialize asmdisk /dev/raw/raw3 to name DMASMLOG0
Used time: 189.725(ms).
ASM>create asmdisk '/dev/raw/raw4' 'DATA0'
[Trace]The ASM initialize asmdisk /dev/raw/raw4 to name DMASMDATA0
Used time: 167.320(ms).
ASM>create asmdisk '/dev/raw/raw5' 'LOG1'
[Trace]The ASM initialize asmdisk /dev/raw/raw5 to name DMASMLOG1
Used time: 132.694(ms).
ASM>create asmdisk '/dev/raw/raw6' 'DATA1'
[Trace]The ASM initialize asmdisk /dev/raw/raw6 to name DMASMDATA1
Used time: 259.934(ms).
ASM>init dcrdisk '/dev/raw/raw1' from '/dm8/data/dmdcr_cfg.ini' identified by 'dameng123'
[Trace]DG 126 alloc one extent for inodes, addr(disk_id, disk_auno, extent_no):(0,0,1).
[Trace]DG 126 allocate 4 extents for file 0xfe000002.
[Trace]DG 126 alloc 4 extents for 0xfe000002, addr(disk_id, disk_auno, extent_no):(0, 0, 2)->(0, 0, 5), need_init = 1.
Used time: 00:00:02.531.
ASM>init votedisk '/dev/raw/raw2' from '/dm8/data/dmdcr_cfg.ini'
[Trace]DG 125 alloc one extent for inodes, addr(disk_id, disk_auno, extent_no):(0,0,1).
[Trace]DG 125 allocate 4 extents for file 0xfd000002.
[Trace]DG 125 alloc 4 extents for 0xfd000002, addr(disk_id, disk_auno, extent_no):(0, 0, 2)->(0, 0, 5), need_init = 1.
Used time: 00:00:01.089.
ASM>

七.准备DMASM 的 MAL 配置文件
在2个节点的/dm8/data目录下创建 DMASM 的 MAL 配置文件(命名为 dmasvrmal.ini),使用 DMASM 的所有节点都要配置,内容完全一样。

[dmdba@dm8rac1 data]$ vi dmasvrmal.ini
[MAL_INST1]
MAL_INST_NAME = ASM1
MAL_HOST = 10.10.13.201
MAL_PORT = 5242

[MAL_INST2]
MAL_INST_NAME = ASM2
MAL_HOST = 10.10.13.202
MAL_PORT = 5242


[dmdba@dm8rac2 data]$ vi dmasvrmal.ini
[MAL_INST1]
MAL_INST_NAME = ASM1
MAL_HOST = 10.10.13.201
MAL_PORT = 5242

[MAL_INST2]
MAL_INST_NAME = ASM2
MAL_HOST = 10.10.13.202
MAL_PORT = 5242

八.准备dmdcr.ini 配置文件
dmdcr.ini 是 dmcss、dmasmsvr、dmasmtool 工具的输入参数。记录了当前节点序列号以及 DCR 磁盘路径。在2个节点的/dm/dmdbms/data目录下创建dmdcr.ini 配置文件,dmdcr_path 相同,dmasvrmal.ini 文件内容也相同,dmdcr_seqo 分别为 0 和 1。
节点 1:

[dmdba@dm8rac1 data]$ vi dmdcr.ini
DMDCR_PATH = /dev/raw/raw1
DMDCR_MAL_PATH =/dm8/data/dmasvrmal.ini
DMDCR_SEQNO = 0

#ASM
DMDCR_ASM_RESTART_INTERVAL = 10
DMDCR_ASM_STARTUP_CMD = /dm8/bin/dmasmsvr dcr_ini=/dm8/data/dmdcr.ini

#DB
DMDCR_DB_RESTART_INTERVAL = 30
DMDCR_DB_STARTUP_CMD = /dm8/bin/dmserver path=/dm8/data/config/rac1/dm.ini dcr_ini=/dm8/data/dmdcr.ini


节点2:

[dmdba@dm8rac2 data]$ vi dmdcr.ini
DMDCR_PATH = /dev/raw/raw1
DMDCR_MAL_PATH =/dm8/data/dmasvrmal.ini
DMDCR_SEQNO = 1

#ASM
DMDCR_ASM_RESTART_INTERVAL = 10
DMDCR_ASM_STARTUP_CMD = /dm8/bin/dmasmsvr dcr_ini=/dm8/data/dmdcr.ini

#DB
DMDCR_DB_RESTART_INTERVAL = 30
DMDCR_DB_STARTUP_CMD = /dm8/bin/dmserver path=/dm8/data/config/rac2/dm.ini dcr_ini=/dm8/data/dmdcr.ini

九.启动DMCSS、DMASM 服务程序
1、注册 DMCSS和DMASM服务
节点一:

[root@dm8rac1 ~]# /dm8/script/root/dm_service_installer.sh -t dmcss -dcr_ini /dm8/data/dmdcr.ini -p rac1
Created symlink from /etc/systemd/system/multi-user.target.wants/DmCSSServicerac1.service to /usr/lib/systemd/system/DmCSSServicerac1.service.
Finished to create the service (DmCSSServicerac1)
[root@dm8rac1 ~]# /dm8/script/root/dm_service_installer.sh -t dmasmsvr -dcr_ini /dm8/data/dmdcr.ini -p rac1 -y DmCSSServicerac1
Created symlink from /etc/systemd/system/multi-user.target.wants/DmASMSvrServicerac1.service to /usr/lib/systemd/system/DmASMSvrServicerac1.service.
Finished to create the service (DmASMSvrServicerac1)

节点二:

[root@dm8rac2 ~]# /dm8/script/root/dm_service_installer.sh -t dmcss -dcr_ini /dm8/data/dmdcr.ini -p rac2
Created symlink from /etc/systemd/system/multi-user.target.wants/DmCSSServicerac2.service to /usr/lib/systemd/system/DmCSSServicerac2.service.
Finished to create the service (DmCSSServicerac2)
[root@dm8rac2 ~]# /dm8/script/root/dm_service_installer.sh -t dmasmsvr -dcr_ini /dm8/data/dmdcr.ini -p rac2 -y DmCSSServicerac2
Created symlink from /etc/systemd/system/multi-user.target.wants/DmASMSvrServicerac2.service to /usr/lib/systemd/system/DmASMSvrServicerac2.service.
Finished to create the service (DmASMSvrServicerac2)

2、启动DMCSS和DMASM服务
节点一

[root@dm8rac1 ~]# service DmCSSServicerac1 start
Redirecting to /bin/systemctl start DmCSSServicerac1.service
[root@dm8rac1 ~]# ps -ef | grep dmdba
root      2952  2618  0 16:28 pts/0    00:00:00 su - dmdba
dmdba     2953  2952  0 16:28 pts/0    00:00:00 -bash
dmdba     3468     1  0 16:48 ?        00:00:00 /dm8/bin/dmcss dcr_ini=/dm8/data/dmdcr.ini
dmdba     3492     1  0 16:49 ?        00:00:00 /dm8/bin/dmasmsvr dcr_ini=/dm8/data/dmdcr.ini
root      3504  3205  0 16:49 pts/1    00:00:00 grep --color=auto dmdba

节点二

[root@dm8rac2 ~]# service DmCSSServicerac2 start
Redirecting to /bin/systemctl start DmCSSServicerac2.service
[root@dm8rac2 ~]# ps -ef | grep dmdba
root      2952  2619  0 16:28 pts/0    00:00:00 su - dmdba
dmdba     2953  2952  0 16:28 pts/0    00:00:00 -bash
dmdba     3456     1  0 16:49 ?        00:00:00 /dm8/bin/dmcss dcr_ini=/dm8/data/dmdcr.ini
dmdba     3480     1  1 16:49 ?        00:00:00 /dm8/bin/dmasmsvr dcr_ini=/dm8/data/dmdcr.ini
root      3496  3193  0 16:49 pts/1    00:00:00 grep --color=auto dmdba

css 服务启动后会自动拉起asm服务,因为在dmdcr.ini文件中配置自动拉起ASM和DB的操作。

十、创建DMASM磁盘组
在任意节点使用 dmasmtool 工具创建 DMASM 磁盘组。

[dmdba@dm8rac1 data]$ dmasmtool DCR_INI=/dm8/data/dmdcr.ini
DMASMTOOL V8
ASM>create diskgroup 'DMLOG' asmdisk '/dev/raw/raw3'
Used time: 428.934(ms).
ASM>create diskgroup 'DMDATA' asmdisk '/dev/raw/raw4'
Used time: 284.431(ms).
ASM>

十一、准备dminit.ini 配置文件
在2个节点的/dm8/data目录下创建 dminit.ini 配置文件,添加如下内容。 在2个节点都创建。

[dmdba@dm8rac1 data]$ vi dminit.ini
db_name = rac
system_path = +DMDATA/data
system = +DMDATA/data/rac/system.dbf
system_size = 128
roll = +DMDATA/data/rac/roll.dbf
roll_size = 128
main = +DMDATA/data/rac/main.dbf
main_size = 128
ctl_path = +DMDATA/data/rac/dm.ctl
ctl_size = 8
log_size = 256
dcr_path = /dev/raw/raw1 #dcr 磁盘路径,目前不支持 asm,只能是裸设备
dcr_seqno = 0
auto_overwrite = 1

[RAC1] #inst_name 跟 dmdcr_cfg.ini 中 DB 类型 group 中 DCR_EP_NAME 对应
config_path = /dm8/data/config/rac1
port_num = 5236
mal_host = 10.10.13.201
mal_port = 5238
log_path = +DMLOG/log/rac0_log01.log
log_path = +DMLOG/log/rac0_log02.log

[RAC2] #inst_name 跟 dmdcr_cfg.ini 中 DB 类型 group 中 DCR_EP_NAME 对应
config_path = /dm8/data/config/rac2
port_num = 5236
mal_host = 10.10.13.202
mal_port = 5238
log_path = +DMLOG/log/rac1_log01.log
log_path = +DMLOG/log/rac1_log02.log


[dmdba@dm8rac2 data]$ vi dminit.ini
db_name = rac
system_path = +DMDATA/data
system = +DMDATA/data/rac/system.dbf
system_size = 128
roll = +DMDATA/data/rac/roll.dbf
roll_size = 128
main = +DMDATA/data/rac/main.dbf
main_size = 128
ctl_path = +DMDATA/data/rac/dm.ctl
ctl_size = 8
log_size = 256
dcr_path = /dev/raw/raw1 #dcr 磁盘路径,目前不支持 asm,只能是裸设备
dcr_seqno = 0
auto_overwrite = 1

[RAC1] #inst_name 跟 dmdcr_cfg.ini 中 DB 类型 group 中 DCR_EP_NAME 对应
config_path = /dm8/data/config/rac1
port_num = 5236
mal_host = 10.10.13.201
mal_port = 5238
log_path = +DMLOG/log/rac0_log01.log
log_path = +DMLOG/log/rac0_log02.log

[RAC2] #inst_name 跟 dmdcr_cfg.ini 中 DB 类型 group 中 DCR_EP_NAME 对应
config_path = /dm8/data/config/rac2
port_num = 5236
mal_host = 10.10.13.202
mal_port = 5238
log_path = +DMLOG/log/rac1_log01.log
log_path = +DMLOG/log/rac1_log02.log

十二、使用dminit初始化数据库
在任意节点启动 dminit 工具初始化数据库。dminit 执行完成后,会在 config_path 目录(/dm8/data/config/rac1 和/dm8/data/config/rac2)下生成配置文件 dm.ini 和 dmmal.ini。

[dmdba@dm8rac1 data]$ dminit control=/dm8/data/dminit.ini
initdb V8
db version: 0x7000c
file dm.key not found, use default license!
License will expire on 2022-10-21
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL

 log file path: +DMLOG/log/rac0_log01.log


 log file path: +DMLOG/log/rac0_log02.log


 log file path: +DMLOG/log/rac1_log01.log


 log file path: +DMLOG/log/rac1_log02.log

write to dir [+DMDATA/data/rac].
create dm database success. 2022-02-25 16:59:26

将节点一上的/dm8/data/config中的rac2配置目录复制到节点二:

[dmdba@dm8rac1 config]$ scp -r rac2 110.10.13.202:/dm8/data/config/
^C[dmdba@dm8rac1 config]$ scp -r rac2 10.10.13.202:/dm8/data/config/
The authenticity of host '10.10.13.202 (10.10.13.202)' can't be established.
ECDSA key fingerprint is SHA256:6O8c9WEeEYPbL4ncdRR1RsrjxxmfzPq9Tkq4/6uLSP4.
ECDSA key fingerprint is MD5:e1:73:3e:8d:79:be:5c:82:0f:c7:58:79:45:ad:df:86.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.10.13.202' (ECDSA) to the list of known hosts.
dmdba@10.10.13.202's password:
dmmal.ini                                                                                                                                                                                                100%  208     8.7KB/s   00:00
dm.ini                                                                                                                                                                                                   100%   53KB   3.0MB/s   00:00
sqllog.ini                                                                                                                                                                                               100%  481    15.3KB/s   00:00
[dmdba@dm8rac1 config]$

十三、启动数据库服务器
1、在2个节点分别注册DM 数据库服务:
节点一:

[root@dm8rac1 ~]# /dm8/script/root/dm_service_installer.sh -t dmserver -dm_ini /dm8/data/config/rac1/dm.ini -dcr_ini /dm8/data/dmdcr.ini -p rac1 -y DmASMSvrServicerac1
Created symlink from /etc/systemd/system/multi-user.target.wants/DmServicerac1.service to /usr/lib/systemd/system/DmServicerac1.service.
Finished to create the service (DmServicerac1)

节点二:

[root@dm8rac2 ~]# /dm8/script/root/dm_service_installer.sh -t dmserver -dm_ini /dm8/data/config/rac2/dm.ini -dcr_ini /dm8/data/dmdcr.ini -p rac2 -y DmASMSvrServicerac2
Created symlink from /etc/systemd/system/multi-user.target.wants/DmServicerac2.service to /usr/lib/systemd/system/DmServicerac2.service.
Finished to create the service (DmServicerac2)

这里可以手动启动数据库服务来启动数据库,也可以重启CSS服务来启动数据库,因为配置CSS会自动拉起数据库

[root@dm8rac1 ~]# service DmCSSServicerac1 start
Redirecting to /bin/systemctl start DmCSSServicerac1.service

[root@dm8rac1 ~]# ps -ef | grep dmdba
root      2952  2618  0 16:28 pts/0    00:00:00 su - dmdba
dmdba     2953  2952  0 16:28 pts/0    00:00:00 -bash
root      3680  3629  0 16:59 pts/2    00:00:00 su - dmdba
dmdba     3681  3680  0 16:59 pts/2    00:00:00 -bash
dmdba     4150     1  0 17:13 ?        00:00:00 /dm8/bin/dmcss dcr_ini=/dm8/data/dmdcr.ini
dmdba     4176     1  0 17:13 ?        00:00:00 /dm8/bin/dmasmsvr dcr_ini=/dm8/data/dmdcr.ini
dmdba     4274     1  1 17:14 ?        00:00:00 /dm8/bin/dmserver path=/dm8/data/config/rac1/dm.ini dcr_ini=/dm8/data/dmdcr.ini
root      4319  3205  0 17:14 pts/1    00:00:00 grep --color=auto dmdba

[root@dm8rac2 ~]# service DmCSSServicerac2 restart
Redirecting to /bin/systemctl restart DmCSSServicerac2.service
[root@dm8rac2 ~]# ps -ef | grep dmdba
root      2952  2619  0 16:28 pts/0    00:00:00 su - dmdba
dmdba     2953  2952  0 16:28 pts/0    00:00:00 -bash
root      3681  3630  0 17:00 pts/2    00:00:00 su - dmdba
dmdba     3682  3681  0 17:00 pts/2    00:00:00 -bash
dmdba     4124     1  0 17:13 ?        00:00:00 /dm8/bin/dmcss dcr_ini=/dm8/data/dmdcr.ini
dmdba     4148     1  0 17:13 ?        00:00:00 /dm8/bin/dmasmsvr dcr_ini=/dm8/data/dmdcr.ini
dmdba     4177     1  3 17:14 ?        00:00:00 /dm8/bin/dmserver path=/dm8/data/config/rac2/dm.ini dcr_ini=/dm8/data/dmdcr.ini
root      4203  3193  0 17:14 pts/1    00:00:00 grep --color=auto dmdba

DSC+单机的DW部署
为DSC集群配置实时备机(单机),组成数据守护集群(DW)

配置DSC集群监视器
任意节点新建监视器配置文件,执行以下命令:

[dmdba@dm8rac1 data]$ vi dmcssm.ini
#和 dmdcr_cfg.ini 中的 DCR_OGUID 保持一致
CSSM_OGUID = 63635
#配置所有 CSS 的连接信息,
#和 dmdcr_cfg.ini 中 CSS 配置项的 DCR_EP_HOST 和 DCR_EP_PORT 保持一致
CSSM_CSS_IP = 10.10.13.201:5240
CSSM_CSS_IP = 10.10.13.202:5240
CSSM_LOG_PATH =/dm8/dmcssm/log #监视器日志文件存放路径
CSSM_LOG_FILE_SIZE = 32 #每个日志文件最大 32 MB
CSSM_LOG_SPACE_LIMIT = 0 #不限定日志文件总占用空间

启动监视器,dmdba 用户执行,

"dmcssm.ini" [New] 9L, 439C written
[dmdba@dm8rac1 data]$ dmcssm ini_path=/dm8/data/dmcssm.ini
[monitor]         2022-02-25 20:49:03: CSS MONITOR V8
[monitor]         2022-02-25 20:49:03: CSS MONITOR SYSTEM IS READY.

[monitor]         2022-02-25 20:49:03: Wait CSS Control Node choosed...
[monitor]         2022-02-25 20:49:04: Wait CSS Control Node choosed succeed.

show

monitor current time:2022-02-25 20:49:08, n_group:3
=================== group[name = GRP_CSS, seq = 0, type = CSS, Control Node = 0] ========================================

[CSS1] auto check = TRUE, global info:
[ASM1] auto restart = TRUE
[RAC1] auto restart = TRUE

[CSS2] auto check = TRUE, global info:
[ASM2] auto restart = TRUE
[RAC2] auto restart = TRUE


ep:     css_time               inst_name     seqno     port    mode         inst_status        vtd_status   is_ok        active       guid              ts
        2022-02-25 20:49:08    CSS1          0         5240    Control Node OPEN               WORKING      OK           TRUE         245896425         245896870
        2022-02-25 20:49:08    CSS2          1         5240    Normal Node  OPEN               WORKING      OK           TRUE         245897746         245898186

=================== group[name = GRP_ASM, seq = 1, type = ASM, Control Node = 1] ========================================

n_ok_ep = 2
ok_ep_arr(index, seqno):
(0, 0)
(1, 1)

sta = OPEN, sub_sta = STARTUP
break ep = NULL
recover ep = NULL

crash process over flag is TRUE
ep:     css_time               inst_name     seqno     port    mode         inst_status        vtd_status   is_ok        active       guid              ts
        2022-02-25 20:49:08    ASM1          0         5241    Normal Node  OPEN               WORKING      OK           TRUE         245903152         245901946
        2022-02-25 20:49:08    ASM2          1         5241    Control Node OPEN               WORKING      OK           TRUE         245902734         245903157

=================== group[name = GRP_RAC, seq = 2, type = DB, Control Node = 0] ========================================

n_ok_ep = 2
ok_ep_arr(index, seqno):
(0, 0)
(1, 1)

sta = OPEN, sub_sta = STARTUP
break ep = NULL
recover ep = NULL

crash process over flag is TRUE
ep:     css_time               inst_name     seqno     port    mode         inst_status        vtd_status   is_ok        active       guid              ts
        2022-02-25 20:49:08    RAC1          0         5236    Control Node OPEN               WORKING      OK           TRUE         80515155          80515546
        2022-02-25 20:49:08    RAC2          1         5236    Normal Node  OPEN               WORKING      OK           TRUE         80513792          80514195

==================================================================================================================

脱机备份DSC数据库
在监视器中关闭数据库实例,执行以下命令

ep stop GRP_RAC
[monitor]         2022-02-25 20:52:24: Notify CSS(seqno:0) set ep(RAC1)auto restart off
[monitor]         2022-02-25 20:52:25: Notify CSS(seqno:0) set ep(RAC1)auto restart off success
[monitor]         2022-02-25 20:52:25: Notify CSS(seqno:1) set ep(RAC2)auto restart off
[monitor]         2022-02-25 20:52:25: Notify CSS(seqno:1) set ep(RAC2)auto restart off success
[monitor]         2022-02-25 20:52:25: Set CSS auto restart off success
[monitor]         2022-02-25 20:52:25: Notify CSS(seqno:0) execute EP STOP(GRP_RAC)
[monitor]         2022-02-25 20:52:31: Notify current active CSS to do clear
[monitor]         2022-02-25 20:52:32: Clean request of CSS(0) success
[monitor]         2022-02-25 20:52:32: Clean request of CSS(1) success
[monitor]         2022-02-25 20:52:32: Command EP STOP GRP_RAC execute success

show

monitor current time:2022-02-25 20:52:39, n_group:3
=================== group[name = GRP_CSS, seq = 0, type = CSS, Control Node = 0] ========================================

[CSS1] auto check = TRUE, global info:
[ASM1] auto restart = TRUE
[RAC1] auto restart = FALSE

[CSS2] auto check = TRUE, global info:
[ASM2] auto restart = TRUE
[RAC2] auto restart = FALSE


ep:     css_time               inst_name     seqno     port    mode         inst_status        vtd_status   is_ok        active       guid              ts
        2022-02-25 20:52:38    CSS1          0         5240    Control Node OPEN               WORKING      OK           TRUE         245896425         245897077
        2022-02-25 20:52:38    CSS2          1         5240    Normal Node  OPEN               WORKING      OK           TRUE         245897746         245898393

=================== group[name = GRP_ASM, seq = 1, type = ASM, Control Node = 1] ========================================

n_ok_ep = 2
ok_ep_arr(index, seqno):
(0, 0)
(1, 1)

sta = OPEN, sub_sta = STARTUP
break ep = NULL
recover ep = NULL

crash process over flag is TRUE
ep:     css_time               inst_name     seqno     port    mode         inst_status        vtd_status   is_ok        active       guid              ts
        2022-02-25 20:52:38    ASM1          0         5241    Normal Node  OPEN               WORKING      OK           TRUE         245903152         245902153
        2022-02-25 20:52:38    ASM2          1         5241    Control Node OPEN               WORKING      OK           TRUE         245902734         245903364

=================== group[name = GRP_RAC, seq = 2, type = DB, Control Node = 255] ========================================

n_ok_ep = 2
ok_ep_arr(index, seqno):
(0, 0)
(1, 1)

sta = OPEN, sub_sta = STARTUP
break ep = NULL
recover ep = NULL

crash process over flag is FALSE
ep:     css_time               inst_name     seqno     port    mode         inst_status        vtd_status   is_ok        active       guid              ts
        2022-02-25 20:52:38    RAC1          0         5236    Normal Node  SHUTDOWN           SHUTDOWN     OK           FALSE        80515155          80515746
        2022-02-25 20:52:38    RAC2          1         5236    Normal Node  SHUTDOWN           SHUTDOWN     OK           FALSE        80513792          80514394

==================================================================================================================

使用dmrman工具备份数据库,dmdba用户执行
注册DmAP服务(可以不使用dmap,在使用dmrman时使用参数use_ap=2时)

[root@dm8rac1 ~]# /dm8/script/root/dm_service_installer.sh -t dmap
Created symlink from /etc/systemd/system/multi-user.target.wants/DmAPService.service to /usr/lib/systemd/system/DmAPService.service.
Finished to create the service (DmAPService)

启动DmAP服务

[root@dm8rac1 ~]# service DmAPService start
Redirecting to /bin/systemctl start DmAPService.service

[dmdba@dm8rac1 data]$ dmrman use_ap=2 dcr_ini=/dm8/data/dmdcr.ini
dmrman V8
RMAN> backup database '/dm8/data/config/rac1/dm.ini' full backupset '/dm8/data/racfullbak';
backup database '/dm8/data/config/rac1/dm.ini' full backupset '/dm8/data/racfullbak';
file dm.key not found, use default license!
Database mode = 0, oguid = 0
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
EP[0]'s cur_lsn[29267], file_lsn[29267]
EP[1]'s cur_lsn[29267]
EP[0] adjust cur_lsn from [29267] to [29267]
Processing backupset /dm8/data/racfullbak
[Percent:100.00%][Speed:0.00M/s][Cost:00:00:01][Remaining:00:00:00]
backup successfully!
time used: 00:00:08.410

备份完成将备份文件拷贝到DSC备库(10.10.13.227上合适的目录)

[dmdba@dm8rac1 data]$ scp -r racfullbak 10.10.13.227:/dm8/data/
The authenticity of host '10.10.13.227 (10.10.13.227)' can't be established.
ECDSA key fingerprint is SHA256:6O8c9WEeEYPbL4ncdRR1RsrjxxmfzPq9Tkq4/6uLSP4.
ECDSA key fingerprint is MD5:e1:73:3e:8d:79:be:5c:82:0f:c7:58:79:45:ad:df:86.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '10.10.13.227' (ECDSA) to the list of known hosts.
dmdba@10.10.13.227's password:
racfullbak.bak                                                                                                                                                                                           100% 6262KB  29.3MB/s   00:00
racfullbak.meta                                                                                                                                                                                          100%   77KB   3.4MB/s   00:00
[dmdba@dm8rac1 data]$

备库创建实例
备库上使用 dmdba 用户执行实例初始化

[dmdba@dm8racst ~]$ dminit path=/dm8/data/  db_name=rac_st
initdb V8
db version: 0x7000c
file dm.key not found, use default license!
License will expire on 2022-10-21
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL

 log file path: /dm8/data/rac_st/rac_st01.log


 log file path: /dm8/data/rac_st/rac_st02.log

write to dir [/dm8/data/rac_st].
create dm database success. 2022-02-25 21:25:01

使用DMDSC库的备份集还原恢复到单节点备库

[dmdba@dm8racst ~]$ dmrman use_ap=2
dmrman V8
RMAN> restore database '/dm8/data/rac_st/dm.ini' from backupset '/dm8/data/racfullbak';
restore database '/dm8/data/rac_st/dm.ini' from backupset '/dm8/data/racfullbak';
file dm.key not found, use default license!
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
[Percent:100.00%][Speed:0.00M/s][Cost:00:00:05][Remaining:00:00:00]
restore successfully.
time used: 00:00:05.801
RMAN> recover database '/dm8/data/rac_st/dm.ini' from backupset '/dm8/data/racfullbak';
recover database '/dm8/data/rac_st/dm.ini' from backupset '/dm8/data/racfullbak';
Database mode = 0, oguid = 0
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
EP[0]'s cur_lsn[29267], file_lsn[29267]
no log generates while the backupset [/dm8/data/racfullbak] created
recover successfully!
time used: 296.715(ms)
RMAN> recover database '/dm8/data/rac_st/dm.ini' update db_magic;
recover database '/dm8/data/rac_st/dm.ini' update db_magic;
Database mode = 0, oguid = 0
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
EP[0]'s cur_lsn[29267], file_lsn[29267]
recover successfully!
time used: 00:00:01.048

修改DSC实例配置文件
RAC集群的2个节点都需要修改
rac1上 dmdba用户执行
vi /dm8/data/config/rac1/dm.ini
修改以下参数值

ALTER_MODE_STATUS = 0 #不允许手工方式修改实例模式/状态

ENABLE_OFFLINE_TS = 2 #不允许备库 OFFLINE 表空间

ARCH_INI = 1 #开启归档模式

rac2上 dmdba用户执行
vi /dm8/data/config/rac2/dm.ini
修改以下参数值

ALTER_MODE_STATUS = 0 #不允许手工方式修改实例模式/状态

ENABLE_OFFLINE_TS = 2 #不允许备库 OFFLINE 表空间

ARCH_INI = 1 #开启归档模式

修改DSC MAL系统配置文件
rac1上 dmdba用户执行

[dmdba@dm8rac1 data]$ vi /dm8/data/config/rac1/dmmal.ini
[mal_inst0]
mal_inst_name = RAC1
mal_host = 10.10.13.201
mal_port = 5238
mal_inst_host = 10.10.13.201
mal_inst_port = 5236
mal_dw_port = 5239
mal_inst_dw_port = 5237

[mal_inst1]
mal_inst_name = RAC2
mal_host = 10.10.13.202
mal_port = 5238
mal_inst_host = 10.10.13.202
mal_inst_port = 5236
mal_dw_port = 5239
mal_inst_dw_port = 5237

[mal_inst2]
mal_inst_name = RAC_ST
mal_host = 10.10.13.227
mal_port = 5238
mal_inst_host = 10.10.13.227
mal_inst_port = 5236
mal_dw_port = 5239
mal_inst_dw_port = 5237

rac2上 dmdba用户执行

[dmdba@dm8rac2 ~]$ vi /dm8/data/config/rac2/dmmal.ini
[mal_inst0]
mal_inst_name = RAC1
mal_host = 10.10.13.201
mal_port = 5238
mal_inst_host = 10.10.13.201
mal_inst_port = 5236
mal_dw_port = 5239
mal_inst_dw_port = 5237

[mal_inst1]
mal_inst_name = RAC2
mal_host = 10.10.13.202
mal_port = 5238
mal_inst_host = 10.10.13.202
mal_inst_port = 5236
mal_dw_port = 5239
mal_inst_dw_port = 5237

[mal_inst2]
mal_inst_name = RAC_ST
mal_host = 10.10.13.227
mal_port = 5238
mal_inst_host = 10.10.13.227
mal_inst_port = 5236
mal_dw_port = 5239
mal_inst_dw_port = 5237

配置DSC归档配置文件
RAC集群的2个节点都需要修改

rac1上 dmdba用户执行

[dmdba@dm8rac1 data]$ vi /dm8/data/config/rac1/dmarch.ini
[ARCHIVE_LOCAL1]
ARCH_TYPE = LOCAL
ARCH_DEST = /dm8/data/arch_local
ARCH_FILE_SIZE = 64
ARCH_SPACE_LIMIT = 51200

[ARCHIVE_REMOTE1]
ARCH_TYPE = REMOTE
ARCH_DEST = RAC2
ARCH_INCOMING_PATH = /dm8/data/arch_remote
ARCH_FILE_SIZE = 64
ARCH_SPACE_LIMIT = 51200

[ARCHIVE_REALTIME]
ARCH_TYPE = REALTIME
ARCH_DEST = RAC_ST

rac2上 dmdba用户执行

[dmdba@dm8rac2 ~]$ vi /dm8/data/config/rac2/dmarch.ini
[ARCHIVE_LOCAL1]
ARCH_TYPE = LOCAL
ARCH_DEST = /dm8/data/arch_local
ARCH_FILE_SIZE = 64
ARCH_SPACE_LIMIT = 51200

[ARCHIVE_REMOTE1]
ARCH_TYPE = REMOTE
ARCH_DEST = RAC1
ARCH_INCOMING_PATH = /dm8/data/arch_remote
ARCH_FILE_SIZE = 64
ARCH_SPACE_LIMIT = 51200

[ARCHIVE_REALTIME]
ARCH_TYPE = REALTIME
ARCH_DEST = RAC_ST

配置DSC数据守护配置文件
RAC集群的2个节点都需要修改

rac1上 dmdba用户执行

[dmdba@dm8rac1 data]$ vi /dm8/data/config/rac1/dmwatcher.ini
[GRP_RAC_DW]
DW_TYPE = GLOBAL #全局守护类型
DW_MODE = MANUAL #手动切换模式
DW_ERROR_TIME = 60 #远程守护进程故障认定时间
INST_RECOVER_TIME = 60 #主库守护进程启动恢复的间隔时间
INST_ERROR_TIME = 35 #本地实例故障认定时间
INST_OGUID = 100001 #守护系统唯一 OGUID 值
INST_INI = /dm8/data/config/rac1/dm.ini #dm.ini 配置文件路径
DCR_INI =/dm8/data/dmdcr.ini #dmdcr.ini 配置文件路径
INST_AUTO_RESTART = 0 #关闭实例的自动启动功能

rac2上 dmdba用户执行

[dmdba@dm8rac2 ~]$ vi /dm8/data/config/rac2/dmwatcher.ini
[GRP_RAC_DW]
DW_TYPE = GLOBAL #全局守护类型
DW_MODE = MANUAL #手动切换模式
DW_ERROR_TIME = 60 #远程守护进程故障认定时间
INST_RECOVER_TIME = 60 #主库守护进程启动恢复的间隔时间
INST_ERROR_TIME = 35 #本地实例故障认定时间
INST_OGUID = 100001 #守护系统唯一 OGUID 值
INST_INI = /dm8/data/config/rac2/dm.ini #dm.ini 配置文件路径
DCR_INI =/dm8/data/dmdcr.ini #dmdcr.ini 配置文件路径
INST_AUTO_RESTART = 0 #关闭实例的自动启动功能

修改备库实例配置文件
vi /dm8/data/rac_st/dm.ini
修改以下参数值

INSTANCE_NAME=RAC_ST #实例名

ALTER_MODE_STATUS = 0 #不允许手工方式修改实例模式/状态

ENABLE_OFFLINE_TS = 2 #不允许备库 OFFLINE 表空间

ARCH_INI = 1 #开启归档模式

MAL_INI = 1 #开启MAL系统

配置备库归档配置文件

[dmdba@dm8racst rac_st]$ vi /dm8/data/rac_st/dmarch.ini
[ARCHIVE_LOCAL1]
arch_type =local
arch_dest = /dm8/data/arch
arch_file_size = 64
arch_space_limit = 51200

[ARCHIVE_REALTIME]
arch_type = realtime
arch_dest = RAC1/RAC2

[dmdba@dm8racst rac_st]$ vi /dm8/data/rac_st/dmmal.ini
[mal_inst0]
mal_inst_name = RAC1
mal_host = 10.10.13.201
mal_port = 5238
mal_inst_host = 10.10.13.201
mal_inst_port = 5236
mal_dw_port = 5239
mal_inst_dw_port = 5237

[mal_inst1]
mal_inst_name = RAC2
mal_host = 10.10.13.202
mal_port = 5238
mal_inst_host = 10.10.13.202
mal_inst_port = 5236
mal_dw_port = 5239
mal_inst_dw_port = 5237

[mal_inst2]
mal_inst_name = RAC_ST
mal_host = 10.10.13.227
mal_port = 5238
mal_inst_host = 10.10.13.227
mal_inst_port = 5236
mal_dw_port = 5239
mal_inst_dw_port = 5237

配置备库数据守护配置文件

[dmdba@dm8racst ~]$ vi /dm8/data/rac_st/dmwatcher.ini
[GRP_RAC_DW]
DW_TYPE = GLOBAL #全局守护类型
DW_MODE = MANUAL #手动切换模式
DW_ERROR_TIME = 60 #远程守护进程故障认定时间
INST_RECOVER_TIME = 60 #主库守护进程启动恢复的间隔时间
INST_ERROR_TIME = 35 #本地实例故障认定时间
INST_OGUID = 100001 #守护系统唯一 OGUID 值
INST_INI = /dm8/data/rac_st/dm.ini #dm.ini 配置文件路径
INST_AUTO_RESTART = 1 #关闭实例的自动启动功能
INST_STARTUP_CMD = /dm8/bin/dmserver #命令行方式启动

启动所有实例到mount状态
在rac1上启动实例,使用dmdba用户执行

[dmdba@dm8rac1 ~]$ dmserver path=/dm8/data/config/rac1/dm.ini dcr_ini=/dm8/data/dmdcr.ini mount
file dm.key not found, use default license!
version info: develop
DM Database Server x64 V8 1-2-84-21.10.21-149328-10032-ENT  startup...
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
Database mode = 0, oguid = 0
License will expire on 2022-10-21
hlck_sys_init, init g_drm_dest:[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
lbs_sys_init, the length of g_master_map is 1451, fill it use ok_ep_arr:[0, 1], n_ok_ep:2!
check CSS cmd: START NOTIFY, cmd_seq: 29
Control Node change from 255 to 254
check CSS cmd: DCR_LOAD, cmd_seq: 30
check CSS cmd: EP START, cmd_seq: 33
Control Node change from 254 to 0
file lsn: 29267
check CSS cmd: EP START2, cmd_seq: 38
ndct db load finished
ndct second level fill fast pool finished
ndct third level fill fast pool finished
ndct fill fast pool finished
nsvr_startup end.
aud sys init success.
aud rt sys init success.
systables desc init success.
ndct_db_load_info success.
SYSTEM IS READY.
check CSS cmd: EP OPEN, cmd_seq: 43
iid page's trxid[8020]
NEXT TRX ID = 9024.
[!!!DSC INFO!!!] DSC crash process over!
check CSS cmd: EP REAL OPEN, cmd_seq: 46

在rac2上启动实例,使用dmdba用户执行

[dmdba@dm8rac2 ~]$ dmserver path=/dm8/data/config/rac2/dm.ini dcr_ini=/dm8/data/dmdcr.ini mount
file dm.key not found, use default license!
version info: develop
DM Database Server x64 V8 1-2-84-21.10.21-149328-10032-ENT  startup...
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
Database mode = 0, oguid = 0
License will expire on 2022-10-21
hpc_ini_info_pre_check end, code:0
hlck_sys_init, init g_drm_dest:[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
lbs_sys_init, the length of g_master_map is 1451, fill it use ok_ep_arr:[0, 1], n_ok_ep:2!
check CSS cmd: DCR_LOAD, cmd_seq: 31
check CSS cmd: EP START, cmd_seq: 35
Control Node change from 255 to 0
mal_tsk_process_g_crash_lsn_bro, ep_seqno(0), crash_lsn(0)
mal_tsk_process_g_crash_lsn_bro, ep_seqno(1), crash_lsn(0)
check CSS cmd: EP START2, cmd_seq: 40
Control node start status: MOUNT
file lsn: 29267
begin redo pwr log collect, last ckpt lsn: 29267 ...
redo pwr log collect finished
ndct db load finished
ndct second level fill fast pool finished
ndct third level fill fast pool finished
ndct fill fast pool finished
nsvr_startup end.
aud sys init success.
aud rt sys init success.
systables desc init success.
ndct_db_load_info success.
SYSTEM IS READY.
check CSS cmd: EP OPEN, cmd_seq: 44
iid page's trxid[8021]
NEXT TRX ID = 9025.
check CSS cmd: EP REAL OPEN, cmd_seq: 47

在备库上启动实例,使用dmdba用户执行

[dmdba@dm8racst ~]$ dmserver path=/dm8/data/rac_st/dm.ini mount
file dm.key not found, use default license!
version info: develop
DM Database Server x64 V8 1-2-84-21.10.21-149328-10032-ENT  startup...
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
Database mode = 0, oguid = 0
License will expire on 2022-10-21
file lsn: 29267
ndct db load finished
ndct second level fill fast pool finished
ndct third level fill fast pool finished
ndct fill fast pool finished
nsvr_startup end.
aud sys init success.
aud rt sys init success.
systables desc init success.
ndct_db_load_info success.
SYSTEM IS READY.

修改主备库模式
使用disql工具连接各实例,rac任意节点使用dmdba执行

这里需要注意的是rac是多实例单库,设置oguid是针对实例而言,rac两个实例都需要改,但是这种数据库为主库,则只需要选择一个节点执行即可。

[dmdba@dm8rac1 data]$ disql SYSDBA/SYSDBA@localhost:5236

Server[localhost:5236]:mode is normal, state is mount
login used time : 7.071(ms)
disql V8
SQL> sp_set_oguid(100001);
DMSQL executed successfully
used time: 312.734(ms). Execute id is 0.


[dmdba@dm8rac2 ~]$ disql SYSDBA/SYSDBA@localhost:5236

Server[localhost:5236]:mode is normal, state is mount
login used time : 4.016(ms)
disql V8
SQL> sp_set_oguid(100001);
DMSQL executed successfully
used time: 263.902(ms). Execute id is 0.
SQL> alter database primary;
executed successfully
used time: 270.052(ms). Execute id is 0.


[dmdba@dm8racst dm8]$ disql SYSDBA/SYSDBA@localhost:5236

Server[localhost:5236]:mode is normal, state is mount
login used time : 2.887(ms)
disql V8
SQL> sp_set_oguid(100001);
DMSQL executed successfully
used time: 65.576(ms). Execute id is 0.
SQL> alter database standby;
executed successfully
used time: 41.479(ms). Execute id is 0.

启动所有节点守护进程
注册为系统服务,方便启动和关闭集群,以及实现开机自动启动。

所有节点都需要注册,使用 root 用户执行

rac1 执行以下命令:
[root@dm8rac1 ~]# /dm8/script/root/dm_service_installer.sh -watcher_ini /dm8/data/config/rac1/dmwatcher.ini -p rac1 -t dmwatcher
Created symlink from /etc/systemd/system/multi-user.target.wants/DmWatcherServicerac1.service to /usr/lib/systemd/system/DmWatcherServicerac1.service.
Finished to create the service (DmWatcherServicerac1)

rac2 执行以下命令:

[root@dm8rac2 ~]# /dm8/script/root/dm_service_installer.sh -watcher_ini /dm8/data/config/rac2/dmwatcher.ini -p rac2 -t dmwatcher
Created symlink from /etc/systemd/system/multi-user.target.wants/DmWatcherServicerac2.service to /usr/lib/systemd/system/DmWatcherServicerac2.service.
Finished to create the service (DmWatcherServicerac2)

rac_st 执行以下命令:

[root@dm8racst ~]# /dm8/script/root/dm_service_installer.sh -watcher_ini /dm8/data/rac_st/dmwatcher.ini -p rac_st -t dmwatcher
Created symlink from /etc/systemd/system/multi-user.target.wants/DmWatcherServicerac_st.service to /usr/lib/systemd/system/DmWatcherServicerac_st.service.
Finished to create the service (DmWatcherServicerac_st)

以服务方式启动守护进程
rac1 执行以下命令:

[root@dm8rac1 ~]# service DmWatcherServicerac1 start
Redirecting to /bin/systemctl start DmWatcherServicerac1.service

rac2 执行以下命令

[root@dm8rac2 ~]# service DmWatcherServicerac2 start
Redirecting to /bin/systemctl start DmWatcherServicerac2.service

rac_st 执行以下命令:

[root@dm8racst ~]# service DmWatcherServicerac_st start
Redirecting to /bin/systemctl start DmWatcherServicerac_st.service

配置dmmonitor.ini

[dmdba@dm8racst1 data]$ vi dmmonitor.ini
MON_LOG_PATH = /dm8/data/log
MON_LOG_INTERVAL = 60
MON_LOG_FILE_SIZE = 64
MON_LOG_SPACE_LIMIT = 0
MON_DW_CONFIRM = 0

[GRP_RAC_DW]
MON_INST_OGUID = 100001

MON_DW_IP = 10.10.13.201:5239/10.10.13.202:5239
MON_DW_IP = 10.10.13.227:5239

启动数据守护监视器:

[dmdba@dm8racst1 data]$ dmmonitor path=/dm8/data/dmmonitor.ini
[monitor]         2022-02-25 22:30:45: DMMONITOR[4.0] V8
[monitor]         2022-02-25 22:30:46: DMMONITOR[4.0] IS READY.

[monitor]         2022-02-25 22:30:46: Received message from(RAC2)
                  WTIME                WSTATUS        INST_OK   INAME            ISTATUS     IMODE     RSTAT    N_OPEN   FLSN            CLSN
                  2022-02-25 22:30:46  STARTUP        OK        RAC1             OPEN        PRIMARY   VALID    3        31768           31768

[monitor]         2022-02-25 22:30:46: Received message from(RAC1)
                  WTIME                WSTATUS        INST_OK   INAME            ISTATUS     IMODE     RSTAT    N_OPEN   FLSN            CLSN
                  2022-02-25 22:30:46  OPEN           OK        RAC1             OPEN        PRIMARY   VALID    3        31768           31768

[monitor]         2022-02-25 22:30:46: Received message from(RAC_ST)
                  WTIME                WSTATUS        INST_OK   INAME            ISTATUS     IMODE     RSTAT    N_OPEN   FLSN            CLSN
                  2022-02-25 22:30:46  OPEN           OK        RAC_ST           OPEN        STANDBY   VALID    3        31768           31768

show
2022-02-25 22:31:20
#================================================================================#
GROUP            OGUID       MON_CONFIRM     MODE            MPP_FLAG
GRP_RAC_DW       100001      FALSE           MANUAL          FALSE


< >
DW_IP               MAL_DW_PORT  WTIME                WTYPE     WCTLSTAT  WSTATUS        INAME            INST_OK   N_EP  N_OK  ISTATUS     IMODE     DSC_STATUS     RTYPE     RSTAT
10.10.13.201      5239         2022-02-25 22:31:20  GLOBAL    VALID     OPEN           RAC1             OK        2     2     OPEN        PRIMARY   DSC_OPEN       REALTIME  VALID

EP INFO:
INST_IP             INST_PORT  INST_OK   INAME            ISTATUS     IMODE     DSC_SEQNO  DSC_CTL_NODE RTYPE     RSTAT    FSEQ            FLSN            CSEQ            CLSN            DW_STAT_FLAG
10.10.13.201      5236       OK        RAC1             OPEN        PRIMARY   0          0            REALTIME  VALID    4195            31768           4195            31768           NONE
10.10.13.202      5236       OK        RAC2             OPEN        PRIMARY   1          0            REALTIME  VALID    2476            31768           2476            31768           NONE

< >
DW_IP               MAL_DW_PORT  WTIME                WTYPE     WCTLSTAT  WSTATUS        INAME            INST_OK   N_EP  N_OK  ISTATUS     IMODE     DSC_STATUS     RTYPE     RSTAT
10.10.13.227      5239         2022-02-25 22:31:20  GLOBAL    VALID     OPEN           RAC_ST           OK        1     1     OPEN        STANDBY   DSC_OPEN       REALTIME  VALID

EP INFO:
INST_IP             INST_PORT  INST_OK   INAME            ISTATUS     IMODE     DSC_SEQNO  DSC_CTL_NODE RTYPE     RSTAT    FSEQ            FLSN            CSEQ            CLSN            DW_STAT_FLAG
10.10.13.227      5236       OK        RAC_ST           OPEN        STANDBY   0          0            REALTIME  VALID    4188            31768           4188            31768           NONE

DATABASE(RAC_ST) APPLY INFO FROM (RAC1), REDOS_PARALLEL_NUM (1):
DSC_SEQNO[0], (RSEQ, SSEQ, KSEQ)[4195, 4195, 4195], (RLSN, SLSN, KLSN)[31768, 31768, 31768], N_TSK[0], TSK_MEM_USE[0]
REDO_LSN_ARR: (31768)

DSC_SEQNO[1], (RSEQ, SSEQ, KSEQ)[2476, 2476, 2476], (RLSN, SLSN, KLSN)[31768, 31768, 31768], N_TSK[0], TSK_MEM_USE[0]
REDO_LSN_ARR: (31768)


#================================================================================#

测试DSC+DW集群
使用disql工具连接任意rac节点,创建测试表test,并插入数据测试

[dmdba@dm8rac1 data]$ disql SYSDBA/SYSDBA@localhost:5236

Server[localhost:5236]:mode is primary, state is open
login used time : 3.518(ms)
disql V8
SQL> create table test(id int);
executed successfully
used time: 140.246(ms). Execute id is 300.
SQL> insert into test values (1);
affect rows 1

used time: 1.927(ms). Execute id is 301.
SQL> commit;
executed successfully
used time: 12.186(ms). Execute id is 302.
SQL> select * from test;

LINEID     ID
---------- -----------
1          1

used time: 1.543(ms). Execute id is 303.

备库查询

[dmdba@dm8racst dm8]$ disql SYSDBA/SYSDBA@localhost:5236

Server[localhost:5236]:mode is standby, state is open
login used time : 3.050(ms)
disql V8
SQL> select * from test;

LINEID     ID
---------- -----------
1          1

used time: 5.496(ms). Execute id is 200.