#yasboot ycs
# ycs status
本命令可以查看对应节点的YCS中各节点的状态信息(结果等同于ycsctl status命令,显示的节点数目等于部署的节点数目)。
选项 | 含义 |
---|---|
-c, --cluster | YashanDB的集群名(必传参数) |
-n, --node-id | 节点ID(例如1-1,可以通过cluster status命令查看,不需要冒号及后面的数字)(必传参数) |
示例
$ yasboot ycs status -c yashandb -n 1-1
命令结果
---------------------------------------------------------------------------------------------
Self Host ID|Cluster Master ID|YasFS Master ID|YasDB Master ID|Active Host Count
---------------------------------------------------------------------------------------------
1 1 1 1 3
---------------------------------------------------------------------------------------------
Host ID |Target |State |YasFS |YasDB
---------------------------------------------------------------------------------------------
1 online online online online
2 online online online online
3 online online online online
# ycs show
本命令可以查看对应节点的YCS中配置信息(结果等同于ycsctl show config命令)。
选项 | 含义 |
---|---|
-c, --cluster | YashanDB的集群名(必传参数) |
-n, --node-id | 节点ID(例如1-1,可以通过cluster status命令查看,不需要冒号及后面的数字)(必传参数) |
示例
$ yasboot ycs show -c yashandb -n 1-1
命令结果
Cluster name: yashandb, config version: 6
Voting disk: /dev/sdc
Network timeout: 30s
Disk heartbeat keep alive: 30s
Default resource yasfs: enabled
Shell in cluster:
Start shell: start.sh
Stop shell: stop.sh
Monitor shell: monitor.sh
Nodes in cluster:
Node name: yas1, yascs/yasfs inter connect URL: 192.168.1.2:1788, Node ID: 1
yasdb instance name:yasdb, yasdb instance id:1
Node name: yas2, yascs/yasfs inter connect URL: 192.168.1.2:1789, Node ID: 2
yasdb instance name:yasdb, yasdb instance id:1
Node name: yas3, yascs/yasfs inter connect URL: 192.168.1.2:1790, Node ID: 3
yasdb instance name:yasdb, yasdb instance id:1
# ycs instance start
本命令用于启动集群节点对应的实例 (结果等同于ycsctl start instance
命令,和节点yascs
进程上一次启动的实例状态相同)。
选项 | 含义 |
---|---|
-c, --cluster | YashanDB的集群名(必传参数) |
-n, --node-id | 节点ID(例如1-1,可以通过cluster status命令查看,不需要冒号及后面的数字)(必传参数) |
-w, --nowait | 运行后不等待执行命令结果 |
-d, --child | 展示任务以及子任务信息 |
--disable | 屏蔽任务进度条展示 |
-u, --username | 指定数据库用户(不指定则默认使用sys用户) |
-p, --password | 数据库用户对应的密码 |
--wait-timeout | 命令执行超时时间 |
示例
$ yasboot ycs instance start -c yashandb -n 1-1
# ycs instance stop
本命令用于停止集群节点对应的实例 (结果等同于ycsctl stop instance
命令)。
选项 | 含义 |
---|---|
-c, --cluster | YashanDB的集群名(必传参数) |
-n, --node-id | 节点ID(例如1-1,可以通过cluster status命令查看,不需要冒号及后面的数字)(必传参数) |
-f, --force | 是否强制停止实例,默认不强制 |
-w, --nowait | 运行后不等待执行命令结果 |
-d, --child | 展示任务以及子任务信息 |
--disable | 屏蔽任务进度条展示 |
--wait-timeout | 命令执行超时时间 |
示例
$ yasboot ycs instance stop -c yashandb -n 1-1
# ycs config
本命令可以查看对应节点的YCS配置信息。
选项 | 含义 |
---|---|
-c, --cluster | YashanDB的集群名(必传参数) |
-n, --node-id | 节点ID(例如1-1,可以通过cluster status命令查看,不需要冒号及后面的数字)(必传参数) |
-q, --query | 查询组配置中单个或多个参数(可以模糊匹配) |
-a, -all | 查询所有参数 |
示例
$ ./bin/yasboot ycs config show -c yashandb -n 1-1
命令结果
parameters | current_value
--------------------------------------------------
_HOST_NAME | yas1
------------+-------------------------------------
YCR_DISK | /dev/sdd
------------+-------------------------------------