- 準備工作
假設有一個三臺服務器的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的升級