공유할 서비스 선택

TECH


TECH

OS RHEL7 to RHEL8 leapp으로 마이그레이션 하는 방법에 대해~

페이지 정보

작성자 OSworker 아이디로 검색 전체게시물 댓글 0건 조회 181회 좋아요 0회 작성일 24-03-24 15:39

본문

안녕하세요

지난주에 이어 오늘은 RHEL7 to RHEL8  leapp으로 마이그레이션 하는 방법에 대해 알아보겠습니다. 

 

- 인플레이스(In-Place) 업그레이드: 인플레이스 업그레이드 중에 이전 버전을 먼저 제거하지 않고 이전 버전을 새 버전으로 교체합니다. 

설치된 애플리케이션 및 유틸리티는 구성 및 기본 설정과 함께 새 버전에 통합되어 있습니다. 

 

 

1. 사전작업

 

- RHEL 7에서 FIPS 모드를 비활성화합니다.

  # yum remove dracut-fips\*    // 없다면 무시하시면됩니다. 

 

좀더 자세한 내용 참고 : https://access.redhat.com/solutions/2422061

 

- 스토리지 및 파일 시스템 - 업그레이드하기 전에 항상 시스템을 백업합니다. 

  예를 들어 Relax-and-Recover(ReaR) 유틸리티,LVM 스냅샷,RAID 분할 또는 가상 시스템 스냅샷을 사용할 수 있습니다.

 

> subscription 등록

. 저는 온라인 레퍼지토리를 사용하겠습니다. 

 

[root@rhel76-test ~]# subscription-manager register

Registering to: subscription.rhsm.redhat.com:443/subscription

Username: redhat_id

Password:

The system has been registered with ID: *****************

The registered system name is: rhel76-test

 

 

> 적절한 리포지토리가 활성화되어 있는지 확인

# subscription-manager repos --enable rhel-7-server-rpms

# subscription-manager repos --enable rhel-7-server-extras-rpms

 

>최신 RHEL 7 콘텐츠를 사용하도록 Red Hat Subscription Manager를 설정

# subscription-manager release --unset

 

**AWS 와 Azure는 [1]참고사이트 참조

 

 

1) 현재 버전 확인 

[root@rhel76-test ~]# hostname

rhel76-test

 

[root@rhel76-test ~]# cat /etc/redhat-release

Red Hat Enterprise Linux Server release 7.6 (Maipo)

 

[root@rhel76-test ~]# uname -a

Linux rhel76-test 3.10.0-957.el7.x86_64 #1 SMP Thu Oct 4 20:48:51 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

 

 

2) 최신 RHEL7.9로 업데이트 

 

[root@rhel76-test ~]# yum repolist

Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager

This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.

rhel-7-server-extras-rpms                                                                                                                                                                | 3.4 kB  00:00:00

rhel-7-server-rpms                                                                                                                                                                       | 3.5 kB  00:00:00

(1/5): rhel-7-server-extras-rpms/x86_64/updateinfo                                                                                                                                       | 260 kB  00:00:00

(2/5): rhel-7-server-extras-rpms/x86_64/primary_db                                                                                                                                       | 636 kB  00:00:00

(3/5): rhel-7-server-rpms/7Server/x86_64/updateinfo                                                                                                                                      | 4.3 MB  00:00:00

(4/5): rhel-7-server-extras-rpms/x86_64/group                                                                                                                                            |  124 B  00:00:01

(5/5): rhel-7-server-rpms/7Server/x86_64/primary_db                                                                                                                                      |  95 MB  00:00:02

repo id                                                                                      repo name                                                                                                    status

rhel-7-server-extras-rpms/x86_64                                                             Red Hat Enterprise Linux 7 Server - Extras (RPMs)                                                             1,476

rhel-7-server-rpms/7Server/x86_64                                                            Red Hat Enterprise Linux 7 Server (RPMs)                                                                     34,333

repolist: 35,809

 

 

> 모든 패키지를 최신 RHEL 7 버전으로 업데이트합니다.

# yum update

.......

........생략

Transaction Summary

================================================================================================================================================================================================================

Install    5 Packages (+38 Dependent packages)

Upgrade  662 Packages

 

Total download size: 868 M

Is this ok [y/d/N]:   Y 

 

Replaced:

  iwl7265-firmware.noarch 0:22.0.7.0-69.el7                            urw-fonts.noarch 0:2.4-16.el7                            webkitgtk4-plugin-process-gtk2.x86_64 0:2.20.5-1.el7

 

Complete!

[root@rhel76-test ~]# hostname

rhel76-test

[root@rhel76-test ~]# cat /etc/redhat-release

Red Hat Enterprise Linux Server release 7.9 (Maipo)

 

>시스템을 재부팅합니다.

# reboot

 

> 커널 확인 

[root@rhel76-test ~]# uname -a

Linux rhel76-test 3.10.0-1160.114.2.el7.x86_64 #1 SMP Sun Mar 3 08:18:39 EST 2024 x86_64 x86_64 x86_64 GNU/Linux

 

3) Leapp 유틸리티를 설치합니다.

# yum install leapp-upgrade

. 현재 leapp -upgrade-el7toel8 RPM 패키지가 포함된 leapp-repository 패키지 버전 0.16.0 이상 및 0.19.0 이상이 필요합니다.

 

Installed:

  leapp-upgrade-el7toel8.noarch 0:0.19.0-1.el7_9

 

Dependency Installed:

  dnf.noarch 0:4.0.9.2-2.el7_9           dnf-data.noarch 0:4.0.9.2-2.el7_9      leapp.noarch 0:0.16.0-1.el7_9        leapp-deps.noarch 0:0.16.0-1.el7_9     leapp-upgrade-el7toel8-deps.noarch 0:0.19.0-1.el7_9

  libcomps.x86_64 0:0.1.8-14.el7         libdnf.x86_64 0:0.22.5-2.el7_9         libmodulemd.x86_64 0:1.6.3-1.el7     librepo.x86_64 0:1.8.1-8.el7_9         librhsm.x86_64 0:0.0.3-3.el7_9

  libsolv.x86_64 0:0.6.34-4.el7          python-enum34.noarch 0:1.0.4-1.el7     python2-dnf.noarch 0:4.0.9.2-2.el7_9 python2-hawkey.x86_64 0:0.22.5-2.el7_9 python2-leapp.noarch 0:0.16.0-1.el7_9

  python2-libcomps.x86_64 0:0.1.8-14.el7 python2-libdnf.x86_64 0:0.22.5-2.el7_9

 

---------------------------------------------------------------------------------------

시스템이 인터넷에 액세스할 수 없는 경우 Red Hat 고객 포털에서 다음 패키지를 다운로드하십시오.

leapp

leapp-deps

python2-leapp

leapp-upgrade-el7toel8

Leapp-upgrade-el7toel8-deps 

 

RHEL 7.9의 오프라인 시스템에 leapp 패키지를 설치하는 방법을 참조하십시오.

. Link : https://access.redhat.com/solutions/6525931

---------------------------------------------------------------------------------------

 

## 주의사항 ## 

 

- 안티바이러스 소프트웨어를 일시적으로 비활성화하여 업그레이드가 실패하지 않도록 합니다.

 

- 구성 관리 시스템이 인플레이스 업그레이드 프로세스를 방해하지 않도록 합니다.

. Puppet,Salt 또는 Chef와 같은 클라이언트-서버 아키텍처와 함께 구성 관리 시스템을 사용하는 경우 leapp preupgrade 명령을 실행하기 전에 시스템을 비활성화

. Ansible과 같은 에이전트가 없는 아키텍처와 함께 구성 관리 시스템을 사용하는 경우, RHEL 7에서 RHEL 8로의 업그레이드를 수행하는데 설명된 대로 인플레이스 업그레이드 중에 구성 및 배포 파일을 실행하지 마십시오.

 

- 시스템이 커널(eth)에서 사용하는 접두사를 기반으로 이름에 두 개 이상의 NIC(네트워크 인터페이스 카드)를 사용하지 않는지 확인

 . https://access.redhat.com/solutions/4067471

 

- ISO 이미지를 사용하여 업그레이드하는 경우 ISO 이미지에 대상 OS 버전(예: RHEL 8.8)이 포함되어 있는지 확인하고, Leapp 유틸리티가 업그레이드 프로세스 전체에서 이미지에 액세스할 수 있도록 영구 로컬 마운트 지점에 저장

 

 

2. 업그레이드 전 보고서 검토

 

-시스템의 upgradability를 평가하려면 leapp preupgrade 명령을 사용하여 사전 업그레이드 프로세스를 시작합니다.

 이 단계에서 Leapp 유틸리티는 시스템에 대한 데이터를 수집하고 업그레이드 가능성을 평가하고 업그레이드 전 보고서를 생성

 

이 보고서는 또한 업그레이드를 진행할 수 있는지 여부를 결정하는 데 도움이됩니다.

생성된 leapp-report.txt 파일에서 사전 업그레이드 보고서를 검토하고 명령줄 인터페이스를 사용하여 보고된 문제를 수동으로 해결합니다.

 

1035ce23e9b2e30c97cd2e3e9f21a155_1711262177_093.png
 

 

1) RHEL 7 시스템에서 사전 업그레이드 단계를 수행합니다.

 # leapp preupgrade --target <target_os_version>

 

 

-----------------------------------------------------------------------------------------------------------------

##참고사항

 

-업그레이드에 /etc/yum.repos.d/ 디렉터리에서 사용자 지정 리포지토리 를 사용하는 경우 다음과 같이 선택한 리포지토리를 활성화합니다.  

# leapp preupgrade --enablerepo <repository_id1> --enablerepo <repository_id2> ...

 

- RHSM없이 업그레이드 하거나 RHUI를 사용하는 경우 --no-rhsm 옵션을 추가합니다.

 

# leapp preupgrade --no-rhsm

# leapp upgrade --no-rhsm

----------------------------------------------------------------------------------------------------------------

 

>  RHEL8.6 기준으로 사전 점검 보고서 생성 

[root@rhel76-test ~]# leapp preupgrade --target 8.6

 

..................생략

 

============================================================

                      REPORT OVERVIEW

============================================================

 

Upgrade has been inhibited due to the following problems:

    1. Multiple devel kernels installed

    2. Use of NFS detected. Upgrade can't proceed

    3. Missing required answers in the answer file

 

HIGH and MEDIUM severity reports:

    1. Packages available in excluded repositories will not be installed

    2. Difference in Python versions and support in RHEL 8

    3. GRUB2 core will be automatically updated during the upgrade

    4. chrony using default configuration

 

Reports summary:

    Errors:                      0

    Inhibitors:                  3

    HIGH severity reports:       3

    MEDIUM severity reports:     1

    LOW severity reports:        4

    INFO severity reports:       4

 

Before continuing consult the full report:

    A report has been generated at /var/log/leapp/leapp-report.json

    A report has been generated at /var/log/leapp/leapp-report.txt

 

============================================================

                   END OF REPORT OVERVIEW

============================================================

 

Answerfile has been generated at /var/log/leapp/answerfile

- /var/log/leapp/leapp-report.txt 파일을 열어보면 위 내용들이 자세히 설명되어있다. 

 

- Label 필드는 대답이 필요한 질문을 지정합니다. 

이 질문은 PAM 구성에서 pam_pkcs11 모듈을 비활성화합니까?입니다.

 

질문에 답변하려면 confirm 행의 주석을 제거하고 True 또는 False에 대한 답변을 입력합니다. 이 예제에서 선택한 응답은 True 입니다.

 

[root@rhel76-test ~]# cat /var/log/leapp/answerfile

[remove_pam_pkcs11_module_check]

# Title:              None

# Reason:             Confirmation

# =================== remove_pam_pkcs11_module_check.confirm ==================

# Label:              Disable pam_pkcs11 module in PAM configuration? If no, the upgrade process will be interrupted.

# Description:        PAM module pam_pkcs11 is no longer available in RHEL-8 since it was replaced by SSSD.

# Reason:             Leaving this module in PAM configuration may lock out the system.

# Type:               bool

# Default:            None

# Available choices: True/False

# Unanswered question. Uncomment the following line with your answer

# confirm =

confirm = True   // 이렇게 수정 

 

 

> 참고사항

/var/log/leapp/leapp-report.txt 파일에서 보고서를 검사하고 보고된 모든 문제를 수동으로 해결합니다. 

보고된 일부 문제에는 수정 제안 사항이 포함되어 있습니다. 억제 문제로 인해 해결될 때까지 업그레이드할 수 없습니다.

 

보고서에는 다음과 같은 위험 요소 수준이 포함되어 있습니다.

 

.높음

시스템 상태가 저하될 가능성이 매우 높습니다.

.중간

시스템과 애플리케이션 모두에 영향을 미칠 수 있습니다.

.낮음 (LOW)

시스템에 영향을 주지 않지만 애플리케이션에 영향을 줄 수 있어야 합니다.

.정보

시스템 또는 애플리케이션에 대한 예상 영향 없이 정보를 제공합니다.

 

 

 

3. RHEL 7에서 RHEL 8로의 업그레이드 수행

leapp upgrade --target <target_os_version>

 

[root@rhel76-test ~]# leapp upgrade --target 8.6

 

> 리부팅하기 

[root@rhel76-test ~]#reboot

 

------------------------------------------------------------------------------------

## 참고사항

# leapp upgrade --target 8.6 --reboot

 

- 이 단계에서는 시스템은 RHEL 8 기반 초기 RAM 디스크 이미지 initramfs로 부팅됩니다. LeApp은 모든 패키지를 업그레이드하고 RHEL 8 시스템으로 자동으로 재부팅합니다.

- 또는 --reboot 옵션을 사용하여 kubevirtp upgrade 명령을 입력하고 이 수동 단계를 건너뛸 수 있습니다.

 

- 업그레이드에 /etc/yum.repos.d/ 디렉터리에서 사용자 지정 리포지토리 를 사용하는 경우 다음과 같이 선택한 리포지토리를 활성화합니다.

# leapp upgrade --enablerepo <repository_id1> --enablerepo <repository_id2> …

 

- RHSM없이 업그레이드 하거나 RHUI를 사용하는 경우 --no-rhsm 옵션을 추가합니다.

leapp upgrade --no-rhsm

 

- ISO 이미지를 사용하여 업그레이드하는 경우 --no-rhsm 및 --iso < file_path> 옵션을 추가합니다. 

  < file_path >를 저장된 ISO 이미지의 파일 경로(예: /home/rhel8.iso )로 바꿉니다.

------------------------------------------------------------------------------------

 

 

**** 리부팅을 하여도 업그레이드가 안되어 확인해보니 아래의 문제점이 있어서 안되었던것~!! 문제점 해결필요

 

 

[문제해결-1]

----------------------------------------

Risk Factor: high (inhibitor)

Title: Use of NFS detected. Upgrade can't proceed

Summary: NFS is currently not supported by the inplace upgrade.

We have found NFS usage at the following locations:

- NFS shares found in /etc/fstab:

 - 192.168.122.180:/data /nfs

----------------------------------------

> 해결방법:

[root@rhel76-test ~]# systemctl stop nfs

[root@rhel76-test ~]# systemctl disable nfs

[root@rhel76-test ~]# vim /etc/fstab

 

192.168.122.180:/data  /nfs    nfs     soft 0  0

수정 -> #192.168.122.180:/data  /nfs    nfs     soft 0  0

 

 

[문제해결-2]

----------------------------------------

Risk Factor: high (inhibitor)

Title: Multiple devel kernels installed

Summary: DNF cannot produce a valid upgrade transaction when multiple kernel-devel packages are installed.

Remediation: [hint] Remove all but one kernel-devel packages before running Leapp again.

[command] yum -y remove kernel-devel-3.10.0-957.el7

Key: 8ceea81afbbb1a329b7d82ca7212b21509e5b256

----------------------------------------

> 해결방법:

[root@rhel76-test ~]# yum -y remove kernel-devel-3.10.0-957.el7

 

 

 

 

- 문제점 해결후에 다시 시작하니 아래와 같이 패키지를 다운로드 하는 화면이 보여집니다.

 

[root@rhel76-test ~]# leapp upgrade --target 8.6

..........

......

...

==> Processing phase `TargetTransactionFactsCollection`

====> * create_iso_repofile

        Create custom repofile containing information about repositories found in target OS installation ISO, if used.

====> * target_userspace_creator

        Initializes a directory to be populated as a minimal environment to run binaries from the target system.

Red Hat Enterprise Linux 8 for x86_64 - AppStre  29 MB/s |  42 MB     00:01

Red Hat Enterprise Linux 8 for x86_64 - BaseOS   36 MB/s |  50 MB     00:01

Last metadata expiration check: 0:00:07 ago on Fri Mar 22 03:10:36 2024.

Dependencies resolved.

================================================================================

 Package                       ArchVersion                        Repository                       Size

================================================================================

Installing:

 dnf                           noarch4.7.0-8.el8                    rhel-8-for-x86_64-baseos-rpms    541 k

 dnf-plugins-core              noarch4.0.21-11.el8                  rhel-8-for-x86_64-baseos-rpms    71 k

Installing dependencies:

 unbound-libs                  x86_641.7.3-17.el8                   rhel-8-for-x86_64-appstream-rpms 504 k

 xkeyboard-config              noarch2.28-1.el8                     rhel-8-for-x86_64-appstream-rpms 782 k

 acl                           x86_642.2.53-1.el8                   rhel-8-for-x86_64-baseos-rpms    81 k

 bzip2-libs                    x86_641.0.6-26.el8                   rhel-8-for-x86_64-baseos-rpms    48 k

 coreutils                     x86_648.30-12.el8                    rhel-8-for-x86_64-baseos-rpms    1.2 M

 dbus-glib                     x86_640.110-2.el8                    rhel-8-for-x86_64-baseos-rpms    127 k

 gmp                           x86_641:6.1.2-10.el8                 rhel-8-for-x86_64-baseos-rpms    321 k

 libdb                         x86_645.3.28-42.el8_4                rhel-8-for-x86_64-baseos-rpms    751 k

 libevent                      x86_642.1.8-5.el8                    rhel-8-for-x86_64-baseos-rpms    253 k

..........

.....

..     총 1696개를 업데이트 진행중 

.

(402/1696): compat-libgfortran-48-4.8.5-36.1.el 1.0 MB/s | 275 kB     00:00

(403/1696): python3-rhnlib-2.8.6-8.module+el8.1  27 kB/s |  77 kB     00:02

(404/1696): libserf-1.3.9-9.module+el8.3.0+6671 174 kB/s |  60 kB     00:00

(405/1696): python3-gobject-3.28.3-2.el8.x86_64 105 kB/s |  26 kB     00:00

(406/1696): python3-pyxdg-0.25-16.el8.noarch.rp 306 kB/s |  94 kB     00:00

(407/1696): utf8proc-2.1.1-5.module+el8.3.0+667  24 kB/s |  67 kB     00:02

(408/1696): python36-3.6.8-38.module+el8.5.0+12  73 kB/s |  19 kB     00:00

(409/1696): twolame-libs-0.3.13-12.el8.x86_64.r 244 kB/s |  57 kB     00:00

 

 

Transaction Summary

=============================================================================================================================================================

Install     487 Packages

Upgrade    1174 Packages

Remove      217 Packages

Downgrade    38 Packages

 

Total size: 1.7 G

DNF will only download packages, install gpg keys, and check the transaction.

Downloading Packages:

Running transaction check

Transaction check succeeded.

Running transaction test

Transaction test succeeded.

Complete!

====> * add_upgrade_boot_entry

        Add new boot entry for Leapp provided initramfs.

A reboot is required to continue. Please reboot your system.

 

 

Debug output written to /var/log/leapp/leapp-upgrade.log

 

============================================================

                      REPORT OVERVIEW

============================================================

 

HIGH and MEDIUM severity reports:

    1. Packages available in excluded repositories will not be installed

    2. Difference in Python versions and support in RHEL 8

    3. GRUB2 core will be automatically updated during the upgrade

    4. chrony using default configuration

    5. Module pam_pkcs11 will be removed from PAM configuration

 

Reports summary:

    Errors:                      0

    Inhibitors:                  0   <------------------- 문제 해결 후에 0으로 바뀌면서 업데이트가 된것임

    HIGH severity reports:       3

    MEDIUM severity reports:     2

    LOW severity reports:        5

    INFO severity reports:       4

 

Before continuing consult the full report:

    A report has been generated at /var/log/leapp/leapp-report.json

    A report has been generated at /var/log/leapp/leapp-report.txt

 

============================================================

                   END OF REPORT OVERVIEW

============================================================

 

Answerfile has been generated at /var/log/leapp/answerfile

[root@rhel76-test ~]# reboot

 

 

- 리부팅후 아래와 같이 업그레이드를 진행합니다. 

 

1035ce23e9b2e30c97cd2e3e9f21a155_1711262261_6343.png
1035ce23e9b2e30c97cd2e3e9f21a155_1711262265_8287.png
1035ce23e9b2e30c97cd2e3e9f21a155_1711262268_7251.png
 

 

-업데이트 하는데 대략 15분이상 걸렸습니다.

 

 

- 정상 부팅이 된 후 확인

 

[root@rhel76-test ~]# cat /etc/redhat-release

Red Hat Enterprise Linux release 8.6 (Ootpa)

[root@rhel76-test ~]# uname -a

Linux rhel76-test 4.18.0-372.32.1.el8_6.x86_64 #1 SMP Fri Oct 7 12:35:10 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux

 

 

[1]-https://access.redhat.com/documentation/ko-kr/red_hat_enterprise_linux/8/html-single/upgrading_from_rhel_7_to_rhel_8/index#planning-an-upgrade_upgrading-from-rhel-7-to-rhel-8 

 

 

긴글 읽어주셔서 감사합니다~^^

댓글목록

등록된 댓글이 없습니다.

TECH 목록
번호 제목 작성자 작성일 조회수
204 Middleware 미들웨어 아이디로 검색 전체게시물 04-22 22
(오픈소스 활용-28) was에서 T4CConnection (Locked) 발생시 해결방법

카테고리 : Middleware

22 0
작성자 : 미들웨어 24/04/22
203 OS OSworker 아이디로 검색 전체게시물 04-20 33
Diagram, Architect 등 서버의 구성에 대해 그림그리실때 무엇을 사용하시나요?

카테고리 : OS

33 0
작성자 : OSworker 24/04/20
202 OS OSworker 아이디로 검색 전체게시물 04-14 65
[교육] RH174 : Managing CentOS Migrations and RHEL Upgrades

카테고리 : OS

65 0
작성자 : OSworker 24/04/14
201 Middleware 미들웨어 아이디로 검색 전체게시물 04-08 52
(오픈소스 활용-28) Java Flight Recorder 이란? Java 모니터링을 구현가능

카테고리 : Middleware

52 0
작성자 : 미들웨어 24/04/08
200 OS OSworker 아이디로 검색 전체게시물 04-03 787
[보안취약점] XZ유틸즈에서 발견된 백도어 `CVE-2024-3094`

카테고리 : OS

787 0
작성자 : OSworker 24/04/03
199 OS OSworker 아이디로 검색 전체게시물 03-30 107
레드햇 자격증 시험을 집에서~ 원하는 곳에서 볼수있는거 알고계셨나요?

카테고리 : OS

107 0
작성자 : OSworker 24/03/30
열람중 OS OSworker 아이디로 검색 전체게시물 03-24 182
열람중
RHEL7 to RHEL8 leapp으로 마이그레이션 하는 방법에 대해~

카테고리 : OS

182 0
작성자 : OSworker 24/03/24
197 Middleware 미들웨어 아이디로 검색 전체게시물 03-21 113
(오픈소스 활용-27) Redis Cache 란? 활용방법과 다운로드

카테고리 : Middleware

113 0
작성자 : 미들웨어 24/03/21
196 OS OSworker 아이디로 검색 전체게시물 03-17 152
Convert2RHEL를 사용하여 CentOS 7.9 에서 RHEL7.9로 전환해보겠습니다.

카테고리 : OS

152 0
작성자 : OSworker 24/03/17
195 Middleware 미들웨어 아이디로 검색 전체게시물 03-07 157
(weblogic 활용) WebLogic Kubernetes Toolkit-UI (무료) 설치 및 구성가이드

카테고리 : Middleware

157 0
작성자 : 미들웨어 24/03/07
Total 204건
게시물 검색

주식회사 클럭스| 대표 : 이찬호| 사업자등록번호 : 107-87-27655
주소 : 서울특별시 영등포구 국회대로 800, 여의도파라곤
E-mail : sales@chlux.co.kr
Copyright © 클럭스 www.chlux.co.kr All rights reserved.
상단으로Top