前提条件及注意事项
ü Proxmox VE升级到最新稳定版5.4。
ü 测试环境进行升级操作。
ü 如果是线上环境,一定要先备份,万一挂掉,还有机会恢复到升级前的状态(PVE 6稳定版没出来前,生产系统不要妄动)。
ü Corosync需要升级到版本3.X。
升级corosync
如果是Proxmox VE虚拟机或者容器是高可用配置(HA),则在升级corosync前需要关闭与之相关的服务。
需要在每个节点执行如下指令:
systemctl stop pve-ha-lrm && systemctl stop crm
接下来设置corosync 更新源,它是通过创建文件来实现的。具体的指令如下:
root@pve:~# echo "deb http://download.proxmox.com/debian/corosync-3/ stretch main" > /etc/apt/sources.list.d/corosync3.list
接着确认改更新源是否有效,执行下面的指令
root@pve:~# apt-get list --upgradeable Listing... Done corosync/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1] libcmap4/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1] libcorosync-common4/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1] libcpg4/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1] libqb0/stable 1.0.5-1~bpo9+2 amd64 [upgradable from: 1.0.3-1~bpo9] libquorum5/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1] libvotequorum8/stable 3.0.2-pve2~bpo9 amd64 [upgradable from: 2.4.4-pve1]
从输出可知,更新源是有效可用的。那么,别犹豫了,直接更新之。
更新完毕corosync以后,记得在各个节点启动pve-ha-lrm及pve-ha-crm服务。
root@pve:~# systemctl start pve-ha-lrm root@pve:~# systemctl start pve-ha-crm |
root@pve:~# systemctl start pve-ha-lrm root@pve:~# systemctl start pve-ha-crm
如果担心升级影响到业务,可以先迁移其上的虚拟机或者容器到其它还未进行升级的节点,等升级好后,再手动迁移回来,这将花费些时间,具体的情形与你设备的配置关系密切,特别是磁盘。如果你用的是该死的sata机械盘,那就慢慢整吧!
准备proxmox VE 6的更新源
Ø 确认升级是可行型。Proxmox VE 5.4专有的指令 pve5to6 ,执行该指令即可。
Ø 更改debian的apt源
修改文件/etc/apt/sources.list,把“stretch”替换成“buster“。
Ø 添加proxmox VE 6更新源。
root@pve:~# echo "deb http://download.proxmox.com/debian/pve buster pvetest" > /etc/apt/sources.list.d/pve-install-repo.list
Ø 更改ceph源
root@pve:~# echo "deb http://download.proxmox.com/debian/ceph-luminous buster main" > /etc/apt/sources.list.d/ceph.list
执行proxmox VE6更新
命令行执行 apt-get update && apt-get dist-upgrade .
root@pve:~# apt-get update && apt-get dist-upgrade Hit:1 http://security.debian.org buster/updates InRelease Hit:2 http://ftp.debian.org/debian buster InRelease Hit:3 http://ftp.debian.org/debian buster-updates InRelease Hit:4 http://download.proxmox.com/debian buster InRelease Get:5 http://download.proxmox.com/debian/ceph-luminous buster InRelease [2,889 B] Hit:6 http://download.proxmox.com/debian/corosync-3 stretch InRelease Hit:7 http://download.proxmox.com/debian/pve buster InRelease Get:8 http://download.proxmox.com/debian/ceph-luminous buster/main amd64 Packages [10.9 kB] Fetched 13.8 kB in 10s (1,297 B/s) Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages will be REMOVED: libkdb5-8 libtirpc1 pve-libspice-server1 The following NEW packages will be installed: cpp-8 dbus-user-session dconf-gsettings-backend dconf-service dirmngr e2fsprogs-l10n fdisk fonts-glyphicons-halflings gcc-8-base glib-networking glib-networking-common glib-networking-services gnupg-l10n gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm gsettings-desktop-schemas gstreamer1.0-libav gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-x i965-va-driver ibverbs-providers intel-media-va-driver iso-codes javascript-common liba52-0.7.4 libaa1 libaacs0 libaom0 libargon2-1 libass9 libavc1394-0 libavcodec58 libavfilter7 libavformat58 libavutil56 libbdplus0 libbind9-161 libbluray2 libbs2b0 libcairo-gobject2 libcdio18 libcdparanoia0 libcephfs2 libchromaprint1 libcodec2-0.8.1 libcom-err2 libcroco3 libcryptsetup12 libcrystalhd3 libcurl4 libdata-dump-perl libdconf1 libdigest-bubblebabble-perl libdns-export1104 libdns1104 libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libdv4 libdvdnav4 libdvdread4 libevent-2.1-6 libext2fs2 libfftw3-double3 libflite1 libfribidi0 libfstrm0 libgdbm-compat4 libgdbm6 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgfapi0 libgfchangelog0 libgfdb0 libgfortran5 libgfrpc0 libgfxdr0 libgl1 libgl1-mesa-dri libglapi-mesa libglusterfs-dev libglusterfs0 libglvnd0 libglx-mesa0 libglx0 libgme0 libgomp1 libgpg-error-l10n libgsm1 libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libgudev-1.0-0 libicu63 libiec61883-0 libigdgmm5 libipset11 libirs161 libisc-export1100 libisc1100 libisccc161 libisccfg163 libisl19 libjack-jackd2-0 libjansson4 libjbig0 libjemalloc2 libjs-bootstrap libjs-jquery libjs-sphinxdoc libjs-underscore libkdb5-9 libleveldb1d liblilv-0-0 libllvm7 liblmdb0 liblttng-ust-ctl4 liblttng-ust0 liblvm2cmd2.03 liblwres161 libmp3lame0 libmpeg2-4 libmpfr6 libmpg123-0 libmysofa0 libncurses6 libncursesw6 libnet-dns-sec-perl libnet-libidn-perl libnftables0 libnftnl11 libnorm1 libnss-systemd libopencore-amrnb0 libopencore-amrwb0 libopenjp2-7 libopenmpt0 liborc-0.4-0 libpciaccess0 libpcre2-8-0 libperl5.28 libpgm-5.2-0 libpostproc55 libprocps7 libprotobuf17 libproxy1v5 libpython2-stdlib libpython3.7 libpython3.7-minimal libpython3.7-stdlib libraw1394-11 librsvg2-2 librsvg2-common librubberband2 libsamplerate0 libsensors-config libsensors5 libserd-0-0 libshine3 libshout3 libsidplay1v5 libsodium23 libsord-0-0 libsoup2.4-1 libsoxr0 libspeex1 libspice-server1 libsratom-0-0 libssh-gcrypt-4 libswresample3 libswscale5 libtag1v5 libtag1v5-vanilla libtheora0 libtiff5 libtinfo6 libtirpc-common libtirpc3 libtry-tiny-perl libtwolame0 libuchardet0 libunistring2 liburcu6 libv4l-0 libv4lconvert0 libva-drm2 libva-x11-2 libva2 libvdpau-va-gl1 libvdpau1 libvidstab1.1 libvisual-0.4-0 libvorbisfile3 libvpx5 libwavpack1 libwebp6 libwebpmux3 libx264-155 libx265-165 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-sync1 libxcb-xfixes0 libxdamage1 libxfixes3 libxshmfence1 libxv1 libxvidcore4 libxxf86vm1 libzmq5 libzvbi-common libzvbi0 mesa-va-drivers mesa-vdpau-drivers nftables nmap-common perl-modules-5.28 pigz pve-kernel-5.0 pve-kernel-5.0.15-1-pve pve-kernel-helper python-certifi python-configparser python-future python-idna python-prettytable python-rgw python2 python2-minimal python3-asn1crypto python3-certifi python3-cffi-backend python3-cryptography python3-debconf python3-distutils python3-idna python3-jwt python3-lib2to3 python3-prettytable python3.7 python3.7-minimal shared-mime-info usb.ids va-driver-all vdpau-driver-all ..........................省略....................
留意一下输出,了解都更新了哪些包?
更新过程有人机交互的情形,要注意看输出提示。
由于是升级的是非正式版本,因此在更新过程中可能会有报错,无需理会。更新过程比较漫长,需要有一点点耐心。在升级过程中,proxmox VE的web管理后台将不能正常访问,这是正常现象(删除旧的软件包,安装新的,并需要关闭及重启服务,不过这些过程是自动进行的)。
更新后的验证
更新正常结束以后,最好重启系统,这样能自动加载新升级后的linux内核。从浏览器登录proxmox web管理后台,大致了解一下proxmox VE 6的主要变化。
Ø 查看版本号。
Ø 查看集成的ceph版本(旧版本是luminous )。
可以直接从web界面进行安装。