#节点管理命令
# node config show
本命令用于展示指定节点的配置信息。
选项 | 含义 |
---|---|
-c, --cluster | YashanDB的集群名 |
-n, --node-id | 节点ID(例如1-1,可以通过cluster status命令查看,不需要冒号及后面的数字) |
-q, --query | 查询组配置中某一个参数 |
-p, --parameter | 配置的详情 |
-a, -all | 查询所有参数,包括未设置的参数 |
示例
$ yasboot node config show -c yashandb --node-id 1-1 -a
$ yasboot node config show -c yashandb --node-id 1-1 -q SCOL_DATA_BUFFER_SIZE -a
# node config set
本命令用于手动更改/设置指定节点的配置。
选项 | 含义 |
---|---|
-c, --cluster | YashanDB的集群名 |
-n,--node-id | 节点ID(例如1-1,可以通过cluster status命令查看,不需要冒号及后面的数字) |
-k, --key | 设置参数的名称 |
-v, -value | 设置参数key对应的值 |
-w, --nowait | 运行后不等待执行命令结果 |
-d, --child | 展示任务以及子任务信息 |
--disable | 屏蔽任务进度条展示 |
示例
$ yasboot node config set -c yashandb --node-id 1-1 -k UNDO_RETENTION -v 350
# node config unset
本命令用于将指定节点的配置信息重设为初始默认值。
选项 | 含义 |
---|---|
-c, --cluster | YashanDB的集群名 |
-n, --node-id | 节点ID(例如1-1,可以通过cluster status命令查看,不需要冒号及后面的数字) |
-k, --key | 重设参数的名称 |
-w, --nowait | 运行后不等待执行命令结果 |
-d, --child | 展示任务以及子任务信息 |
--disable | 屏蔽任务进度条展示 |
示例
$ yasboot node config set -c yashandb --node-id 1-1 -k UNDO_RETENTION
# node status
本命令用于查看指定节点的状态。
选项 | 含义 |
---|---|
-c, --cluster | YashanDB的集群名 |
-n, --node-id | 节点ID(例如1-1,可以通过cluster status命令查看,不需要冒号及后面的数字) |
-d, --detail | 是否展示运行状态的细节,默认为false |
示例
$ yasboot node status -c yashandb -n 1-1
host_id | node_type | nodeid | pid
---------------------------------------
host0001 | mn | 1-1:1 | 22211
----------+-----------+--------+-------
# node stop
本命令用于停止运行中的节点。
选项 | 含义 |
---|---|
-c, --cluster | YashanDB的集群名 |
-n, --node-id | 节点ID(例如1-1,可以通过cluster status命令查看,不需要冒号及后面的数字) |
-f, --force | 是否强制停止节点,默认不强制 |
-w, --nowait | 运行后不等待执行命令结果 |
-d, --child | 展示任务以及子任务信息 |
--disable | 屏蔽运行的进度信息 |
示例
$ yasboot node stop -c yashandb -n 4-1
# node start
本命令用于启动节点。
选项 | 含义 |
---|---|
-c, --cluster | YashanDB的集群名 |
-n, --node-id | 节点ID(例如1-1,可以通过cluster status命令查看,不需要冒号及后面的数字) |
-m, --start-mode | 启动方式,可选[mount|nomount|open],默认为open |
-w, --nowait | 运行后不等待执行命令结果 |
-d, --child | 展示任务以及子任务信息 |
--disable | 屏蔽运行的进度信息 |
示例
$ yasboot node start -c yashandb -n 4-1
$ yasboot node start -c yashandb -n 4-1 -m nomount
# node restart
本命令用于重启节点。
选项 | 含义 |
---|---|
-c, --cluster | YashanDB的集群名 |
-n, --node-id | 节点ID(例如1-1,可以通过cluster status命令查看,不需要冒号及后面的数字) |
-m, --start-mode | 启动方式,可选[mount|nomount|open],默认为open |
-f, --force | 是否强制停止节点,默认不强制 |
-w, --nowait | 运行后不等待执行命令结果 |
-d, --child | 展示任务以及子任务信息 |
--disable | 屏蔽运行的进度信息 |
示例
$ yasboot node restart -c yashandb -n 4-1
# node switchover
本命令用于手动进行switchover主备切换。
选项 | 含义 |
---|---|
-c, --cluster | YashanDB的集群名 |
-n, --node-id | 要升主的节点ID(例如1-1,可以通过cluster status命令查看,不需要冒号及后面的数字) |
-f, --force | 是否确认,默认不 |
-w, --nowait | 运行后不等待执行命令结果 |
-d, --child | 展示任务以及子任务信息 |
--disable | 屏蔽运行的进度信息 |
示例
$ yasboot node switchover -c yashandb -n 4-1
# node failover
本命令用于手动进行failover主备切换。
选项 | 含义 |
---|---|
-c, --cluster | YashanDB的集群名 |
-n, --node-id | 要升主的节点ID(例如1-1,可以通过cluster status命令查看,不需要冒号及后面的数字) |
-w, --nowait | 运行后不等待执行命令结果 |
-d, --child | 展示任务以及子任务信息 |
--disable | 屏蔽运行的进度信息 |
示例
$ yasboot node failover -c yashandb -n 4-1
# node remove
本命令用于对CN节点进行缩容处理。
选项 | 含义 |
---|---|
-c, --cluster | YashanDB的集群名 |
-n, --node-id | 节点ID(例如1-1,可以通过cluster status命令查看,不需要冒号及后面的数字) |
-f, --force | 跳过确认直接执行命令 |
-p, --purge | 删除缩容节点的data数据 |
-w, --nowait | 运行后不等待执行命令结果 |
-d, --child | 展示任务以及子任务信息 |
--disable | 屏蔽运行的进度信息 |
示例
$ yasboot node remove -c yashandb -n 4-1 -p