v2.0
- 关于PTK
 - 快速入门
 - 使用指南
 - 使用参考
 - 配置文件示例
 - 命令介绍
- ptk
 - ptk completion
 - ptk view-static-config
 - ptk init-cluster
 - ptk collect
 - ptk rec-guc
 - ptk cache
 - ptk gen-ptkc
 - ptk manage
 - ptk demo
 - ptk meta
 - ptk version
 - ptk self
 - ptk gen-om-xml
 - ptk env
 - ptk gen-static-config
 - ptk cluster
- ptk cluster createdb
 - ptk cluster uninstall-compat-tools
 - ptk cluster install-compat-tools
 - ptk cluster install-mogila
 - ptk cluster rename
 - ptk cluster throwout
 - ptk cluster takeover
 - ptk cluster uninstall-cm
 - ptk cluster install-cm
 - ptk cluster gen-cert-files
 - ptk cluster load-cm-vip
 - ptk cluster del-kerberos-auth
 - ptk cluster add-kerberos-auth
 - ptk cluster uninstall-kerberos-server
 - ptk cluster install-kerberos-server
 - ptk cluster is-in-upgrade
 - ptk cluster upgrade-rollback
 - ptk cluster upgrade-commit
 - ptk cluster upgrade
 - ptk cluster demote
 - ptk cluster promote
 - ptk cluster refresh
 - ptk cluster shell
 - ptk cluster modify-comment
 - ptk cluster show-config
 - ptk cluster set-guc
 - ptk cluster show-guc
 - ptk cluster set-hba
 - ptk cluster show-hba
 - ptk cluster scale-out
 - ptk cluster scale-in
 - ptk cluster uninstall-mogha
 - ptk cluster install-mogha
 - ptk cluster list-plugins
 - ptk cluster install-plugin
 - ptk cluster inspect
 - ptk cluster failover
 - ptk cluster switchover
 - ptk cluster build
 - ptk cluster status
 - ptk cluster restart
 - ptk cluster stop
 - ptk cluster start
 
 - ptk uninstall
 - ptk ls
 - ptk install
 - ptk exec
 - ptk template
 - ptk encrypt
 - ptk checkos
 - ptk download
 - ptk candidate
 
 - 故障排查
 - FAQ
 - 发布记录
 - 社区
 - 附录:YAML语法
 
抛弃节点
目的
在由 PTK 管理的部分集群中,有时会期望放弃对集群中某一个节点的管理,然而该集群由于数据众多而无法进行重新删除安装。鉴于此种情况,PTK 1.5.0 引入了 throwout 指令,用于抛弃指定集群中的某一节点。
需特别注意的是,若当前集群中存在非主节点,那么则不能直接抛弃主库。
PTK 针对 throwout 设定了一些限制,例如:当前集群为一主一备一级联,此时若要抛弃备库或主库是不被允许的,需先将级联备库抛弃后,方可抛弃备库。然后在抛弃主库。
使用方法
利用 PTK 抛弃指定节点的命令如下:
# 指定ip
ptk cluster -n <CLUSTER_NAME> throwout -H <IP>
# 指定节点ID
ptk cluster -n <CLUSTER_NAME> throwout -i <ID>throwout 指令相对较为简单,但在使用时其限制条件需加以注意:
- 在进行 
throwout操作时,需查看指定节点是否存在下游库。 - 需确认指定的节点是否处于当前集群。
 
在 throwout 的使用过程中会有交互,以让用户确认是否要抛弃该节点。如以下示例:
$ ptk cluster -n <CLUSTER_NAME> throwout -i <ID>
Nodes to be throwout:
- <IP>
✔ Are you sure you want to throwout them (default=n) [y/n]: █当然,PTK 提供了 -y|--yes 参数,可跳过交互环节。