原地迁移原理
腾讯云提供 CentOS 替换工具,帮助客户高效方便地完成 CentOS 到 TencentOS 的原地替换工作,最大程度降低操作系统迁移的工作成本。
迁移本质是将 CentOS RPM 包替换为 TencentOS Server RPM 包。
核心命令:
yum distro-sync
。说明:
yum distro-sync or distribution-synchronization
Synchronizes the installed package set with the latest packages available, this is done by either obsoleting, upgrading or downgrading as appropriate. This will "normally" do the same thing as the upgrade command however if you have the package FOO installed at version 4, and the latest available is only version 3, then this command will downgrade FOO to version 3. If you give the optional argument "full", then the command will also reinstall packages where the install checksum and the available checksum do not match. And remove old packages (can be used to sync. rpmdb versions). The optional argument "different" can be used to specify the default operation. This command does not perform operations on groups, local packages, or negative selections.
使用场景
操作系统版本 | 停止维护时间 | 使用者影响 |
CentOS 8 | 2022年01月01日 | 停止维护后将无法获得包括问题修复和功能更新在内的任何软件维护和支持。 |
| CentOS 7 | 2024年06月30日 |
适用版本
源端主机支持操作系统版本:
支持 CentOS 7系列操作系统版本:
CentOS 7.2 64位、CentOS 7.3 64位、CentOS 7.4 64位、CentOS 7.5 64位、CentOS 7.6 64位、CentOS 7.7 64位、CentOS 7.8 64位、CentOS 7.9 64位。
支持 CentOS 8系列操作系统版本:
CentOS 8.0 64位、CentOS 8.2 64位、CentOS 8.3 64位、CentOS 8.4 64位、CentOS 8.5 64位。
目标主机建议操作系统版本:
CentOS 7系列建议迁移至 TencentOS Server 2.4。
CentOS 8系列建议迁移至 TencentOS Server 3。
注意事项
以下情况可能会影响业务在迁移后无法正常运行:
业务程序安装且依赖了第三方的 rpm 包。
迁移后的目标版本是 tkernel4,基于5.4的内核。该版本较 CentOS 7及 CentOS 8的内核版本更新,一些较旧的特性在新版本可能会发生变化。建议强依赖于内核的用户了解所依赖的特性,或可咨询 在线客服。
业务程序依赖某个固定的 gcc 版本。
目前 TencentOS Server 2.4默认安装 gcc 4.8.5,TencentOS Server 3默认安装 gcc 8.5。
迁移结束后,需重启才能进入TencentOS Server 内核。
迁移不影响数据盘,仅 OS 层面的升级,不会对数据盘进行任何操作。
注意:
操作系统迁移会将内核升级为基于 5.4 版本的 tkernel4 内核,因此可能下列情况的系统可能受到影响:
业务程序依赖于某个固定的内核版本,或者自行编译了内核模块,如 GPU 机型迁移后内核需要重新安装 GPU 驱动。
原操作系统的某个模块由 rpm 包提供,在迁移后此 rpm 包可能无法为新的内核提供模块,如:
xpmem-modules-2.6.3-2.54310.kver.3.10.0_1160.108.1.el7.x86_64.x86_64 为 kernel-3.10.0-1160.108.1.el7.x86_64 提供 ko 文件,
但无法为迁移后的 tkernel4 内核提供。这种情况下用户可获取源码重新编译安装该模块。
资源要求
空闲内存大于500MB。
系统盘剩余空间大于10GB。
若
/boot
挂载分区,该分区空间需要大于500MB。