검색

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

download PDF

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

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

사전 요구 사항

절차

  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
    Created entry with boot_id 1e6d298:
      title RHEL Rollback
      machine-id f9f6209866c743739757658d1a4850b2
      version 3.10.0-1160.118.1.el7.x86_64
      linux /vmlinuz-3.10.0-1160.118.1.el7.x86_64.boom0
      initrd /initramfs-3.10.0-1160.118.1.el7.x86_64.img.boom0
      options root=/dev/rhel/root ro rd.lvm.lv=rhel/root
      grub_users $grub_users
      grub_arg --unrestricted
      grub_class kernel
  3. 시스템을 재부팅하여 운영 체제 상태를 복원합니다.

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

      중요

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

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

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

      # rm -f /boot/loader/entries/*.el8*
      # rm -f /boot/*.el8*
      # grub2-mkconfig -o /boot/grub2/grub.cfg
      Generating grub configuration file ...
      Found linux image: /boot/vmlinuz-3.10.0-1160.118.1.el7.x86_64.boom0
      ....
      done
    2. 원래 Red Hat Enterprise Linux 부팅 항목을 복원합니다.

      # new-kernel-pkg --update $(uname -r)
  5. 시스템을 성공적으로 롤백한 후 boom 스냅샷 및 롤백 부팅 항목을 삭제합니다.

    # boom list -o+title
    BootID  Version                      Name                            RootDevice                             Title
    a49fb09 3.10.0-1160.118.1.el7.x86_64 Red Hat Enterprise Linux Server /dev/mapper/rhel-root                  Red Hat Enterprise Linux (3.10.0-1160.118.1.el7.x86_64) 8.9 (Ootpa)
    1bb11e4 3.10.0-1160.el7.x86_64       Red Hat Enterprise Linux Server /dev/mapper/rhel-root                  Red Hat Enterprise Linux (3.10.0-1160.el7.x86_64) 8.9 (Ootpa)
    e0252ad 3.10.0-1160.118.1.el7.x86_64 Red Hat Enterprise Linux Server /dev/rhel/root_snapshot_before_changes Root LV snapshot before changes
    1e6d298 3.10.0-1160.118.1.el7.x86_64 Red Hat Enterprise Linux Server /dev/rhel/root                         RHEL Rollback
    # boom delete e0252ad
    Deleted 1 entry
    # boom delete 1e6d298
    Deleted 1 entry

추가 리소스

  • Boom(1) 도움말 페이지
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

© 2024 Red Hat, Inc.