2021-05-12 14:32:11
Red Hat Enterprise Linux 6 升級 Red Hat Enterprise Linux 7 經驗分享
前言
因為交易系統部的同事提出了一個新的需求要將現有的RHEL6.7升級至RHEL7.1(最好保留資料升級),之前對於小版本的升級無論是CentOS還是RedHat都可以直接通過yum update的方式實現軟體包和核心的疊代更新,但是這次的需求經過Redhat知識庫的研究發現這幾乎是一個不可能輕鬆實現的任務,原因就是Redhat壓根不支援大版本之間的升級,考慮到跨版本相容性問題和原廠不做技術支援這兩點,通過和Redhat二線電話溝通也確認了最終的實現方案,就是先備份相關重要設定和資料格式化/分割區保留其它檔案系統,重灌後在把資料遷移回來。整個過程雖然提不上什麼驚心動魄,但至少翻閱了大量材料,官方雖然給出了跨版本升級的步驟,但實現的代價和要求真的太高,這裡一併分享出來方便大家學習和思考。
How do I upgrade from RHEL 6 to RHEL 7? Reinstall
擴充套件閱讀
紅帽支援 RHEL 主版本之間的升級嗎?- https://access.redhat.com/zh_...
How do I upgrade from RHEL 6 to RHEL 7? - https://access.redhat.com/sol...
紅帽支援 RHEL 主版本之間的升級嗎?
Environment
- Red Hat Enterprise Linux 4
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
Issue
- 如何從紅帽企業版 Linux 的一個版本升級到另一個版本?
- 可以從 RHEL 的不同主版本之間移植嗎?
- 紅帽支援 RHEL 主版本之間的升級嗎(比如從5升級到6)?
- 可以在 RHEL 5 上安裝 RHEL 6 嗎?
- 安裝媒介沒有包含升級選項;
- 如何從
RHEL 5
升級到RHEL 6
?
Resolution
Red Hat Enterprise Linux 4, 5, 6
紅帽 不支援 RHEL 主版本之間的跨大版本升級。(主版本以整數表示。比如,RHEL 5 和 RHEL 6 都是不同的主版本。)
不同主版本之間的跨大版本升級,不會保留所有系統設定、服務設定和自定義設定。因此, 紅帽強烈建議重新安裝系統,以進行主版本之間的升級 。建議在執行著的伺服器旁,使用新的伺服器安裝一個全新的RHEL,然後把原有的設 置、軟體和資料遷移到新伺服器上,以確保系統和軟體能在新伺服器上正確執行。 這還有助於確保資料安全地從備份轉移到新的系統。
還有方法可以不進行全新安裝,來進行升級。要實現這個功能,插入新版本的安裝光碟,然後在 boot 命令列中輸入:
# linux upgradeany
這將引導您進行與 普通的安裝過程很相近的升級步驟。再次說明,這個過程紅帽是不予支援的。進行完這個升級操作後,如果您聯絡紅帽技術支援,紅帽只會當作全新的安裝來提供支援。升級過程中產生的問題是不予支援的。任何時候出現的問題如果疑似與升級過程有關,紅帽將要求您重新安裝系統。
Comment
- 紅帽建議,系統升級之前要先全面備份資料。
- 如果之前安裝有第三方軟體,建議在新系統上重新安裝。
- 更換新版本系統後,個別軟體包的組態檔可能會失效,因為新版本組態檔的格式和排列可能會有所變化。
- 如果之前安裝有紅帽的 layered products (比如 Cluster Suite), 需要在新系統完全安裝之後,手動升級它們。
- 用升級選項進行升級,系統可能會出現不穩定的情況。
- 如果出現意外情況,紅帽全球支援只能建議您按照建議的方式,重新安裝系統並進行遷移。
可參考文件, Red Hat Enterprise Linux 6 Installation Guide, Chapter 37. Upgrading Your Current System
升級或重新安裝系統後,請重新註冊系統,請參考 Red Hat Enterprise Linux 6 Installation Guide, Chapter 37. Upgrading Your Current System
Red Hat Enterprise Linux 7
對於特定的使用情況,紅帽支援從 Red Hat Enterprise Linux 6
升級到 Red Hat Enterprise Linux 7
。更多資訊,請參考以下文件:
- How do I upgrade from RHEL 6 to RHEL 7?
- What are the supported use cases for upgrading from RHEL 6 to RHEL 7?
- How do I subscribe to the RHEL Extras channel/repo?
- Red Hat Enterprise Linux 7 Installation Guide
如有問題,請聯絡紅帽全球支援服務 file a support case ,或在 Discussions area of the Customer Portal 中進行討論。
How do I upgrade from RHEL 6 to RHEL 7
Environment
Red Hat Enterprise Linux 6.x to Red Hat Enterprise Linux 7
Product Variant | x86 Architecture | x86_64 Architecture | IBM Power | IBM z Systems |
---|---|---|---|---|
Desktop Edition | Not supported | Not supported | N/A | N/A |
Workstation Edition | Not supported | Not supported | N/A | N/A |
Server Edition | Not supported | <font color=blue>Supported</font> | <font color=blue>Supported[1]</font> | <font color=blue>Supported[2]</font> |
HPC Compute Node | Not supported | <font color=blue>Supported</font> | N/A | N/A |
Server running CloudForms software | N/A | Not supported | N/A | N/A |
[1] Red Hat Enterprise Linux for Power, big endian
[2] Red Hat Enterprise Linux for IBM z Systems
Issue
-
How do I do in-place upgrading from the latest Red Hat Enterprise Linux 6 to the latest Red Hat Enterprise Linux 7?
-
How do I use the preupgrade assistant and redhat-upgrade-tool to run a RHEL6 to RHEL7 upgrade?
Resolution
Red Hat Enterprise Linux 7 (RHEL 7) is the first major release of RHEL to allow in-place upgrades from the previous RHEL major release (RHEL 6). An in-place upgrade offers a way of upgrading a system to a new major release of Red Hat Enterprise Linux by replacing the existing operating system.
This RHEL 6 to RHEL 7 upgrade procedure is fully supported if your Red Hat Enterprise Linux system meets the following criteria:
Latest Red Hat Enterprise Linux 6: Before upgrading to the latest RHEL 7, you must start with RHEL 6 and update your system to have the latest RHEL 6 packages installed. (This is covered in the procedure below.)
All Server editions (except x86): All server editions (except x86) of Red Hat Enterprise Linux 6 can be upgraded with this procedure. Upgrades of RHEL Workstation and Desktop systems are not supported. Upgrades for the POWER architecture is supported. SEE TABLE ABOVE. Upgrade from 32-bit architecture is not supported.
Limited package groups: The upgrade process handles only the following package groups and packages: Minimal (@minimal), Base (@base), Web Server (@web-server), DHCP Server, File Server (@nfs-server), and Print Server (@print-server). Although upgrades of other packages and groups are not supported, in some cases, packages can be uninstalled from the RHEL 6 system and reinstalled on the upgraded RHEL 7 system without a problem. SEE TABLE BELOW.
The supported use cases for upgrading RHEL 6 to RHEL 7:
Supported | Unsupported | |
---|---|---|
Source to Upgrade | The latest RHEL-6.X | RHEL 6.4 and earlier |
File Systems | Like-file system upgrades For example ext3 to ext3, ext4 to ext4, xfs to xfs |
Unlike-file system upgrades For example ext4 to xfs |
GNOME, KDE | None | All GNOME, KDE installs |
Packages/Groups | Minimal (@minimal) Base (@base) Web Server (@web-server) DHCP Server File Server (@nfs-server) Print Server |
All others |
Virtualization | KVM, VMWare | Microsoft Hyper-V (coming soon) |
Red Hat Software Collections | Using tested process | All others |
High Availability | None | All |
The upgrade procedure consists of the following basic steps:
- Prepare for Upgrade: Make sure your system is backed up and up to date before beginning the preupgrade.
- Install the Preupgrade Assistant: Enable the required repositories and install the preupgrade packages.
- Run the Preupgrade Assistant: Check your system for upgrade issues before running the actual upgrade. No changes are made to your system and you can repeat this step until all issues are dealt with.
- Run the Upgrade: Perform the actual upgrade.
- Provide Feedback: Create a debug log to send to Red Hat in case there are problems.
實踐步驟
核心目標為格式化/分割區,保留其它檔案系統,做好相應備份重灌RHEL7
生產環境當前系統版本為RHEL6.7,推薦升級至RHEL7.1或者更新的版本
通過RHEL7.1的ISO引導至INSTALLATION SUMMARY
- DATE & TIME設定為Asia/Shanghai timezone
- LANGUAGE SUPPORT新增English(United States),簡體中文(中國)
- SOFTWARE SELECTION設定為Server with GUI
- UBSTAKKATUIB DESTINATION分割區選擇I will configure partioning,點選DONE
- 找到現有系統中的/分割區,選中後在右側勾選Reformat,Mount Point設定為/,SYSTEM其它分割區SWAP,/boot,/usr,/tmp,/var參照同樣操作,DATA資料分割區不動,點選DONE
- Begin Install
- 安裝結束後恢復備份資料
- 恢復原有網絡卡設定項和IP地址
- 恢復主機名/Hosts/Profile
- 恢復fstab分割區檢查資料一致性
相關文章