- 准备工作
假设有一个三台服务器的glusterfs集群,volume类型为副本数为3的分布式复制卷
三台server的ip为:server1:192.168.100.2,server2:192.168.100.3, server3:192.168.100.4
glusterfs的版本为3.7.12
需要升级到的版本为3.8.0
note:glusterfs-3.8.0暂时没有提供官方repo包,需要自己安装rpm包 - 策略
互为副本的集群,需要依次升级,实现glusterfs的服务不中断
这里,先升级server1
- 升级前
1)关闭glusterfs的self-heal功能
[root@~]# gluster v set testvol cluster.entry-self-heal off
[root@~]# gluster v set testvol cluster.data-self-heal off
[root@~]# gluster v set testvol cluster.metadata-self-heal off
2)关闭glusterfs的服务
Stop all glusterd, glusterfsd and glusterfs processes on server1.
3)卸载glusterfs-3.7.12的rpm包
[root@~]# yum remove glusterfs-libs-3.7.12-1.el7.x86_64
4)安装glusterfs-3.8.0
[root@~]# yum install http://buildlogs.centos.org/centos/7/storage/x86_64/gluster-3.8/glusterfs-libs-3.8.0-1.el7.x86_64.rpm
[root@~]# yum install http://buildlogs.centos.org/centos/7/storage/x86_64/gluster-3.8/glusterfs-client-xlators-3.8.0-1.el7.x86_64.rpm
[root@~]# yum install http://buildlogs.centos.org/centos/7/storage/x86_64/gluster-3.8/glusterfs-3.8.0-1.el7.x86_64.rpm
[root@~]# yum install http://buildlogs.centos.org/centos/7/storage/x86_64/gluster-3.8/glusterfs-api-3.8.0-1.el7.x86_64.rpm
[root@~]# yum install http://buildlogs.centos.org/centos/7/storage/x86_64/gluster-3.8/glusterfs-cli-3.8.0-1.el7.x86_64.rpm
[root@~]# yum install http://buildlogs.centos.org/centos/7/storage/x86_64/gluster-3.8/glusterfs-fuse-3.8.0-1.el7.x86_64.rpm
[root@~]# yum install http://buildlogs.centos.org/centos/7/storage/x86_64/gluster-3.8/userspace-rcu-0.7.16-1.el7.x86_64.rpm
[root@~]# yum install http://buildlogs.centos.org/centos/7/storage/x86_64/gluster-3.8/glusterfs-server-3.8.0-1.el7.x86_64.rpm
5)查看glusterfs版本,看看是否升级成功
[root@~]# gluster --version
6)重启glusterfsd服务
[root@~]# service glusterd start
然后,依次升级server2,server3 即可完成glusterfs的升级
网友评论