移除服务器(集群版适用)
更新时间 2025-10-22 09:33:19
最近更新时间: 2025-10-22 09:33:19
本节主要介绍移除服务器命令。
./stor server rm { -n | --server } SERVER_ID [ -d | --del-data ] [ -f | --force ]
此命令用来从HBlock集群中移除服务器。
注意
- 如果移除服务器上有Target,该Target对应卷的高可用类型是ActiveStandby,移除服务器时,业务不会中断,此卷对应的Target会切换到其他服务器上,客户端需要重新连接Target对应的新服务器IP。
- 如果移除服务器上有Target,该Target对应卷的高可用类型是Disabled,移除服务器时,业务会中断,此卷对应的Target会切换到其他服务器上,客户端需要重新连接Target对应的新服务器IP。但服务器移除时,会有数据丢失风险。
- 如果执行日志采集后,产生的日志保存在服务器安装目录下,在服务器移除之后,该日志将被删除。如果产生的日志保存在HBlock的数据目录内,并且移除服务器时删除服务器HBlock数据目录中的数据,该日志也将被删除。
- 有服务器正在移除时,不能再移除其他服务器。如果必须移除,请使用强制移除,但有丢数据风险。
- 该节点的所有数据目录不属于任何存储池,允许移除该服务器。否则不能移除,如果必须移除,请使用强制移除,但有丢数据风险。
- 如果要移除服务器的某个数据目录属于基础存储池,且是基础存储池中仅剩的一个可用故障域中的节点,不允许移除。
如果服务器上有基础服务,不允许移除。
参数
| 参数 | 描述 |
|---|---|
| -n SERVER_ID 或 --server SERVER_ID | 要移除服务器的ID。 |
| -d 或 --del-data | 移除服务器时,删除服务器上HBlock数据目录中的数据。 |
| -f 或 --force | 强制移除服务器。 注意 强制移除服务器,可能造成数据丢失。 |
示例
移除服务器ID为hblock_4的服务器。
[root@hblockserver CTYUN_HBlock_Plus_3.10.0_x64]# ./stor server rm -n hblock_4
The software will be deleted on the specified server. Are you sure to remove this server? [Yes/No]
y
Processing...
Start removing server hblock_4. You can list server to check whether it is completed.
You can reconnect the following iSCSI LUN(s):
1.iSCSI LUN name:lun04a
iSCSI target: iqn.2012-08.cn.ctyunapi.oos:target04.7(192.168.0.209:3260,ColdStandby)
iSCSI target: iqn.2012-08.cn.ctyunapi.oos:target04.8(192.168.0.72:3260,Active)说明
卷关联的iSCSI target处于ColdStandby状态,表示iSCSI target正在从被删除的服务器上迁移到集群其他服务器上,迁移过程,该iSCSI target处于ColdStandby状态。迁移完成后,iSCSI target将变为Active或者Standby状态。