Trafodion 使用sqshell关闭或启动一个节点

本文介绍如何关闭或启动一个Trafodion节点,使用sqshell工具。测试环境为一个两个节点的Trafodion集群,如下,

[trafodion@openstack-1 ~]$ echo $MY_NODES
-w openstack-1 -w openstack-2
[trafodion@openstack-1 ~]$ sqcheck

*** Checking Trafodion Environment ***

Checking if processes are up.
Checking attempt: 1; user specified max: 2. Execution time in seconds: 0.

The Trafodion environment is up!


Process         Configured      Actual      Down
-------         ----------      ------      ----
DTM             2               2
RMS             4               4
DcsMaster       1               1
DcsServer       2               2
mxosrvr         8               8
RestServer      1               1

下面分别测试关闭一个节点再启动一个节点,

一、关闭节点

1 查看node id(node info)

[trafodion@openstack-1 ~]$ sqshell -a
Processing cluster.conf on local host openstack-1
[$Z000CR4] Shell/shell Version 1.0.1 EsgynDB_Advanced Release 2.3.0 (Build release [EsgynDB-CP4-2.2.3E-1422-g0056d95_Bld633], date 20170516_0930)
[$Z000CR4] %node info
[$Z000CR4] Logical Nodes    = 2
[$Z000CR4] Physical Nodes   = 2
[$Z000CR4] Spare Nodes      = 0
[$Z000CR4] Available Spares = 0
[$Z000CR4] NID Type        State    Processors   #Procs
[$Z000CR4]     PNID        State        #Cores  MemFree SwapFree CacheFree Name
[$Z000CR4] --- ----------- -------- ---------- -------- -------- --------- --------
[$Z000CR4] 000 Any         Up                4       13
[$Z000CR4]     000         Up                4   597220   679436   1842620 openstack-1
[$Z000CR4] 001 Any         Up                4       11
[$Z000CR4]     001         Up                4  1395008  1048572   3557924 openstack-2

2 关闭节点(down nid)

[$Z000CR4] %down 001
[$Z000CR4] %[$Z000CR4] Node 1 (openstack-2) is DOWN
[$Z000CR4] %[$Z000CR4] Node 1 (openstack-2) is DOWN
[$Z000CR4] %[$Z000CR4] Configuration Change Notice for Group: CLUSTER Key: DTM_RECOVERING_TX_COUNT
[$Z000CR4] %[$Z000CR4] Configuration Change Notice for Group: CLUSTER Key: DTM_RECOVERING_TX_COUNT

3 检查进程

[trafodion@openstack-1 ~]$ sqcheck

*** Checking Trafodion Environment ***

Checking if processes are up.
Checking attempt: 1; user specified max: 2. Execution time in seconds: 0.

The Trafodion environment is up! Node(s) are down and environment is in a degraded state.


Processing cluster.conf on local host openstack-1
[$Z000F1K] Shell/shell Version 1.0.1 EsgynDB_Advanced Release 2.3.0 (Build release [EsgynDB-CP4-2.2.3E-1422-g0056d95_Bld633], date 20170516_0930)
[$Z000F1K] %node  info
[$Z000F1K] Logical Nodes    = 2
[$Z000F1K] Physical Nodes   = 2
[$Z000F1K] Spare Nodes      = 0
[$Z000F1K] Available Spares = 0
[$Z000F1K] NID Type        State    Processors   #Procs
[$Z000F1K]     PNID        State        #Cores  MemFree SwapFree CacheFree Name
[$Z000F1K] --- ----------- -------- ---------- -------- -------- --------- --------
[$Z000F1K] 000 Any         Up                4       13
[$Z000F1K]     000         Up                4   595492   679436   1841144 openstack-1
[$Z000F1K] 001 Any         Down
[$Z000F1K]     001         Down                                            openstack-2


The Trafodion environment is partially up and operational.

Process         Configured      Actual      Down
-------         ----------      ------      ----
DTM             2               1           1
RMS             4               2           2
DcsMaster       1               1
DcsServer       2               2
mxosrvr         8               4           4
RestServer      1               1

二、启动节点

1 查看down节点(node info)

[trafodion@openstack-1 ~]$ sqshell -a
Processing cluster.conf on local host openstack-1
[$Z000FXB] Shell/shell Version 1.0.1 EsgynDB_Advanced Release 2.3.0 (Build release [EsgynDB-CP4-2.2.3E-1422-g0056d95_Bld633], date 20170516_0930)
[$Z000FXB] %node info
[$Z000FXB] Logical Nodes    = 2
[$Z000FXB] Physical Nodes   = 2
[$Z000FXB] Spare Nodes      = 0
[$Z000FXB] Available Spares = 0
[$Z000FXB] NID Type        State    Processors   #Procs
[$Z000FXB]     PNID        State        #Cores  MemFree SwapFree CacheFree Name
[$Z000FXB] --- ----------- -------- ---------- -------- -------- --------- --------
[$Z000FXB] 000 Any         Up                4       13
[$Z000FXB]     000         Up                4   576892   679436   1822952 openstack-1
[$Z000FXB] 001 Any         Down
[$Z000FXB]     001         Down                                            openstack-2

2 启动down节点(up hostname)

[$Z000FXB] %up openstack-2
[$Z000FXB] - Warning using shell.env
[$Z000FXB] 06/30/2017-11:03:53 - Node openstack-2 is merging to existing cluster.
[$Z000FXB] 06/30/2017-11:03:55 - Node openstack-2 join phase starting.
[$Z000FXB] %[$Z000FXB] 06/30/2017-11:04:01 - Node 1 (openstack-2) is UP

3 检查进程

[trafodion@openstack-1 ~]$ sqcheck

*** Checking Trafodion Environment ***

Checking if processes are up.
Checking attempt: 1; user specified max: 2. Execution time in seconds: 0.

The Trafodion environment is up!


Process         Configured      Actual      Down
-------         ----------      ------      ----
DTM             2               2
RMS             4               4
DcsMaster       1               1
DcsServer       2               2
mxosrvr         8               8
RestServer      1               1

至此,已完成Trafodion单节点的关闭和启动!如果希望了解sqshell命令的详细,请执行sqshell -a > help查看更多内容,

[trafodion@openstack-1 ~]$ sqshell -a
Processing cluster.conf on local host openstack-1
[$Z000JEE] Shell/shell Version 1.0.1 EsgynDB_Advanced Release 2.3.0 (Build release [EsgynDB-CP4-2.2.3E-1422-g0056d95_Bld633], date 20170516_0930)
[$Z000JEE] %help
[$Z000JEE] usage: shell {[-a|-i] [<scriptfile>]} | {-c <command>}
[$Z000JEE] - commands:
[$Z000JEE] -- Command line environment variable replacement: ${<var_name>}
[$Z000JEE] -- ! comment statement
[$Z000JEE] -- cd <path>
[$Z000JEE] -- delay <seconds>
[$Z000JEE] -- down <nid> [, <reason-string>]
[$Z000JEE] -- dump [{path <pathname>}] <process name> | <nid,pid>
[$Z000JEE] -- echo [<string>]
[$Z000JEE] -- event [{ASE|TSE|DTM|AMP|BO|VR|CS}] <event_id> [<nid,pid> [ event-data] ]
[$Z000JEE] -- exec [{[debug][nowait][pri <value>][name <process name>]
[$Z000JEE]           [nid <zone or node number>][type {AMP|ASE|BO|CS|DTM|PSD|SMS|SPX|SSMP|TSE|VR}]
[$Z000JEE] --        [in <file>|#default][out <file>|#default]}] path [[<args>]...]
[$Z000JEE] -- exit [!]
[$Z000JEE] -- help
[$Z000JEE] -- kill [{abort}] <process name> | <nid,pid>
[$Z000JEE] -- ldpath [<directory>[,<directory>]...]
[$Z000JEE] -- ls [{[detail]}] [<path>]
[$Z000JEE] -- measure | measure_cpu
[$Z000JEE] -- monstats
[$Z000JEE] -- node [[info [<nid>]] | [name <old name> <new name>]]
[$Z000JEE] -- path [<directory>[,<directory>]...]
[$Z000JEE] -- ps [{ASE|TSE|DTM|AMP|BO|VR|CS}] [<process_name>|<nid,pid>]
[$Z000JEE] -- pwd
[$Z000JEE] -- quit
[$Z000JEE] -- scanbufs
[$Z000JEE] -- set [{[nid <number>]|[process <name>]}] key=<value string>
[$Z000JEE] -- show [{[nid <number>]|[process <name>]}] [key]
[$Z000JEE] -- shutdown [[immediate]|[abrupt]|[!]]
[$Z000JEE] -- startup [trace] [<trace level>]
[$Z000JEE] -- suspend [<event_id>]
[$Z000JEE] -- time <shell command>
[$Z000JEE] -- trace <number>
[$Z000JEE] -- up <name>
[$Z000JEE] -- wait [<process name> | <nid,pid>]
[$Z000JEE] -- warmstart [trace] [<trace level>]
[$Z000JEE] -- zone [nid <nid>|zid <zid>]
[$Z000JEE] %
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

数据源的港湾

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值