6.5. 업그레이드 실패 후 롤백 부팅 항목 생성


업그레이드에 실패한 후 운영 체제를 이전 상태로 되돌리려면 롤백 부팅 항목을 사용합니다. 이는 업그레이드된 환경에 문제가 있는 경우(예: 사내 소프트웨어와 호환되지 않음)에도 유용할 수 있습니다.

롤백 부팅 항목을 준비하려면 스냅샷 환경을 사용합니다.

사전 요구 사항

절차

  1. 스냅샷을 원래 볼륨과 병합합니다.

    # lvconvert --merge rhel/root_snapshot_before_changes
      Logical volume rhel/root_snapshot_before_changes contains a filesystem in use.
      Delaying merge since snapshot is open.
      Merging of thin snapshot rhel/root_snapshot_before_changes will occur on next activation of rhel/root.
    주의

    스냅샷을 병합한 후 데이터 손실을 방지하려면 이 절차의 나머지 모든 단계를 계속 진행해야 합니다.

  2. 병합된 스냅샷에 대한 롤백 부팅 항목을 생성합니다.

    # boom create --backup --title "RHEL Rollback" --rootlv rhel/root
    WARNING - Boom grub2 integration is disabled in '/boot/../etc/default/boom'
    WARNING - Options for BootEntry(boot_id=1e1a9b4) do not match OsProfile: marking read-only
    WARNING - Options for BootEntry(boot_id=1ccc554) do not match OsProfile: marking read-only
    WARNING - Options for BootEntry(boot_id=4ea37b9) do not match OsProfile: marking read-only
    WARNING - Options for BootEntry(boot_id=e22dd61) do not match OsProfile: marking read-only
    Created entry with boot_id 6c44638:
      title RHEL Rollback
      machine-id b1dcec73886b45218892b1a7bbfa0dee
      version 4.18.0-513.24.1.el8_9.x86_64
      linux /vmlinuz-4.18.0-513.24.1.el8_9.x86_64.boom0
      initrd /initramfs-4.18.0-513.24.1.el8_9.x86_64.img.boom0
      options root=/dev/rhel/root ro rd.lvm.lv=rhel/root rhgb quiet crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M

    모든 WARNING 메시지를 무시합니다. RHEL-35983 을 참조하십시오.

  3. 시스템을 재부팅하여 운영 체제 상태를 복원합니다.

    # reboot
    • 시스템이 재부팅된 후 GRUB 화면에서 RHEL 롤백 부팅 항목을 선택합니다.
    • 루트 논리 볼륨이 활성화되면 시스템은 스냅샷 병합 작업을 자동으로 시작합니다.

      중요

      병합 작업이 시작되면 스냅샷 볼륨을 더 이상 사용할 수 없습니다. RHEL 롤백 부팅 항목을 성공적으로 부팅하면 Root LV 스냅샷 부팅 항목이 더 이상 작동하지 않습니다. 스냅샷 논리 볼륨을 병합하면 Root LV 스냅샷이 제거되고 원래 볼륨의 이전 상태가 복원됩니다.

  4. 병합 작업을 완료한 후 사용되지 않는 항목을 제거하고 원래 부팅 항목을 복원합니다.

    1. /boot 파일 시스템에서 사용되지 않는 Red Hat Enterprise Linux 9 부팅 항목을 제거하고 변경 사항을 적용하려면 grub.cfg 파일을 다시 빌드합니다.

      # rm -f /boot/loader/entries/*.el9*
      # rm -f /boot/*.el9*
      # grub2-mkconfig -o /boot/grub2/grub.cfg
      Generating grub configuration file ...
      done
  5. 시스템을 성공적으로 롤백한 후 boom 스냅샷 및 롤백 부팅 항목을 삭제합니다.

    # boom list -o+title
    WARNING - Options for BootEntry(boot_id=1e1a9b4) do not match OsProfile: marking read-only
    WARNING - Options for BootEntry(boot_id=1ccc554) do not match OsProfile: marking read-only
    WARNING - Options for BootEntry(boot_id=4ea37b9) do not match OsProfile: marking read-only
    BootID  Version                      Name                     RootDevice                             Title
    1e1a9b4 4.18.0-513.5.1.el8_9.x86_64  Red Hat Enterprise Linux /dev/mapper/rhel-root                  Red Hat Enterprise Linux (4.18.0-513.5.1.el8_9.x86_64) 8.9 (Ootpa)
    4ea37b9 4.18.0-513.24.1.el8_9.x86_64 Red Hat Enterprise Linux /dev/mapper/rhel-root                  Red Hat Enterprise Linux (4.18.0-513.24.1.el8_9.x86_64) 8.9 (Ootpa)
    c919f89 4.18.0-513.24.1.el8_9.x86_64 Red Hat Enterprise Linux /dev/rhel/root_snapshot_before_changes Root LV snapshot before changes
    6c44638 4.18.0-513.24.1.el8_9.x86_64 Red Hat Enterprise Linux /dev/rhel/root                         RHEL Rollback
    # boom delete c919f89
    WARNING - Options for BootEntry(boot_id=1e1a9b4) do not match OsProfile: marking read-only
    WARNING - Options for BootEntry(boot_id=1ccc554) do not match OsProfile: marking read-only
    WARNING - Options for BootEntry(boot_id=4ea37b9) do not match OsProfile: marking read-only
    Deleted 1 entry
    # boom delete 6c44638
    WARNING - Options for BootEntry(boot_id=1e1a9b4) do not match OsProfile: marking read-only
    WARNING - Options for BootEntry(boot_id=1ccc554) do not match OsProfile: marking read-only
    WARNING - Options for BootEntry(boot_id=4ea37b9) do not match OsProfile: marking read-only
    Deleted 1 entry

    경고를 무시합니다. 자세한 내용은 RHEL-35983 을 참조하십시오.

추가 리소스

  • 시스템의 Boom(1) 도움말 페이지
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.