系统升级

获取新版本可执行文件

获取指定版本的可执行文件

冻结集群

./udbto-cli cluster freeze true

注意事项

确认启动配置文件,不要更改配置文件中的数据目录、端口等重要信息 配置文件其他参数修改参考配置说明 如无特殊要求,一般可按照datanode->metanode->master->client的顺序升级各组件

升级DataNode

下面以datanode为例描述 1.停止旧的datanode进程 2.启动新的datanode进程 3.启动后检查节点状态,直到显示为active后,再升级下一台机器

./udbto-cli datanode info 192.168.2.160:15310

[Data node info]
  ID                  : 2
  Address             : 192.168.2.160:15310(localhost.localdomain:15310)
  Allocated ratio     : 0.2894837640690672
  Allocated           : 107.09 GB
  Available           : 262.85 GB
  Total               : 369.94 GB
  Zone                : default
  Rdonly              : false
  Status              : Active
  MediaType           : SSD
  ToBeOffline         : False
  Report time         : 2025-09-11 16:46:42
  Partition count     : 40
  Bad disks           : []
  Decommissioned disks: []
  Persist partitions  : [1 2 3 4 5 6 7 8 9 10 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50]
  Backup partitions   : []
  Can alloc partition : true
  Max partition count : 3000
  CpuUtil             : 3.8%
  IoUtils             :
                        /dev/dm-0:0.0%

升级MetaNode

与DataNode类似

升级master

1.停止旧的master进程 2.启动新的master进程 3.观察监控是否正常 4.查看master对应的raft状态是否正常 如下,查看对应重启master id对应的commit是否与其他副本一致,raft是否有主

curl 192.168.0.121:15010/get/raftStatus | python -m json.tool

响应示例

{
	"code": 0,
	"data": {
		"AppQueue": 0,
		"Applied": 1025,
		"Commit": 1025,
		"ID": 1,
		"Index": 1025,
		"Leader": 1,
		"NodeID": 1,
		"PendQueue": 0,
		"RecvQueue": 0,
		"Replicas": {
			"1": {
				"Active": true,
				"Commit": 1025,
				"Inflight": 0,
				"LastActive": "2023-04-04T17:35:08.184149551+08:00",
				"Match": 1025,
				"Next": 1026,
				"Paused": false,
				"Snapshoting": false,
				"State": "ReplicaStateProbe"
			},
			"2": {
				"Active": true,
				"Commit": 1025,
				"Inflight": 0,
				"LastActive": "2023-04-19T14:09:44.679447062+08:00",
				"Match": 1025,
				"Next": 1026,
				"Paused": false,
				"Snapshoting": false,
				"State": "ReplicaStateReplicate"
			},
			"3": {
				"Active": true,
				"Commit": 1025,
				"Inflight": 0,
				"LastActive": "2023-04-19T14:09:44.679448732+08:00",
				"Match": 1025,
				"Next": 1026,
				"Paused": false,
				"Snapshoting": false,
				"State": "ReplicaStateReplicate"
			},
			"4": {
				"Active": true,
				"Commit": 1025,
				"Inflight": 0,
				"LastActive": "2023-04-19T14:09:44.679407742+08:00",
				"Match": 1025,
				"Next": 1026,
				"Paused": false,
				"Snapshoting": false,
				"State": "ReplicaStateReplicate"
			}
		},
		"RestoringSnapshot": false,
		"State": "StateLeader",
		"Stopped": false,
		"Term": 3,
		"Vote": 1
	},
	"msg": "success"
}

升级client

1.停止业务读写 2.umount 挂载点 若出现如下错误, 则需要执行 umount -l 挂载点

umount: /xxx/mnt: target is busy.
        (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1)

3.查看client进程若存在,则停止 4.启动新的客户端进程即可,df -h 查看是否执行成功