Search

Chapter 3. Upgrading SAP HANA System

download PDF

An SAP HANA system running on RHEL 7.7 or earlier must be updated to RHEL 7.9 first. For special instructions on how to upgrade from RHEL 7.7 or earlier to RHEL 7.9 on cloud providers, refer to How to Perform Update of RHEL for SAP with HA from 7.* to 7.9 on Cloud Providers.

If the installed SAP HANA version is not on the minimum revision, which is supported on both the source and target RHEL minor versions, your SAP HANA software must be upgraded to this level first. SAP HANA must have been installed using /hana/shared as the installation path.

Never perform more than one update or upgrade (e.g., HANA to 2.0 SPS05 rev 59.04 and RHEL from 7.7 to 7.9) without sufficient testing and verification after each step. Otherwise, solving any problem might get very complex and take a long time.

Prepare for the verification of your SAP HANA system so that you can quickly check and confirm if your SAP HANA system is fully operational again after the upgrade to RHEL 8.6 or RHEL 8.8. This should include functional as well as performance testing of your most important business transactions.

As always on production systems, run all the steps below, including the preparation and pre-upgrade steps, on a test system first until you have verified that the upgrade can be performed successfully in your environment.

3.1. Step 1: Preparing for the upgrade

Important

The instructions in this chapter correspond to the topic Preparing for the upgrade.

At any time before you perform the actual in-place upgrade, create a full system backup or virtual machine snapshot and perform a restore test to ensure that you can get back to a working system quickly.

To prepare the system, complete the following steps.

Prerequisites

  • Ensure that your system has access to the required repositories and completes a system-specific setup.

Procedure

  1. Complete system-specific setup.

    1. Preparing non-cloud or BYOS cloud systems

      1. Register and subscribe the system to a Red Hat repository source. If you are using Red Hat Satellite, make sure that both RHEL 7 and RHEL 8 e4s repositories are available and synchronized with the latest updates. Enable the following repos for the activation key:

        rhel-7-server-rpms
        rhel-sap-for-rhel-7-server-rpms
        rhel-sap-hana-for-rhel-7-server-rpms
        rhel-7-server-extras-rpms
        rhel-8-for-x86_64-baseos-e4s-rpms
        rhel-8-for-x86_64-appstream-e4s-rpms
        rhel-8-for-x86_64-sap-netweaver-e4s-rpms
        rhel-8-for-x86_64-sap-solutions-e4s-rpms
      2. Check and confirm that your RHEL 7.9 system has the normal repositories enabled. Also enable the rhel-7-server-extras-rpms repository, which contains required upgrade tools:

        # subscription-manager repos --disable='*' \
        --enable="rhel-7-server-rpms" \
        --enable="rhel-sap-hana-for-rhel-7-server-rpms" \
        --enable="rhel-7-server-extras-rpms"

        If you are also using the SAP NetWeaver repository (rhel-sap-for-rhel-7-server-rpms), enable that one as well:

        # subscription-manager repos --disable='*' \
        --enable="rhel-7-server-rpms" \
        --enable="rhel-sap-for-rhel-7-server-rpms" \
        --enable="rhel-sap-hana-for-rhel-7-server-rpms" \
        --enable="rhel-7-server-extras-rpms"
        Note

        There are no e4s or eus repositories available for RHEL 7.9. Those are only required and available for RHEL minor versions prior to the final RHEL minor version. For more information, refer to this section in the Red Hat Enterprise Linux Life Cycle web page.

      3. Remove all files cached by yum/dnf:

        # rm -rf /var/cache/yum
      4. Make sure no RHEL release lock is set:

        # subscription-manager release --unset

        Release preference has been unset.

        Note

        A release lock instructs yum to access packages from e4s or eus repositories, which fails on RHEL 7.9 because there are no such repositories on RHEL 7.9.

    2. Preparing PAYG cloud instances on AWS

      1. Install the leapp-rhui-aws-sap-e4s package:

        # yum install leapp-rhui-aws-sap-e4s
      2. Enable the rhel-7-server-rhui-extras-rpms repository:

        # yum-config-manager --enable rhel-7-server-rhui-extras-rpms
    3. Preparing PAYG cloud instances on Google Cloud

      1. Download and install the leapp-rhui-google-v1-rhel7-sap package, as instructed in Leapp RHUI packages for Google Cloud Platform (GCP).
      2. Enable the rhui-rhel-7-server-rhui-extras-rpms repository:

        # yum-config-manager --enable rhui-rhel-7-server-rhui-extras-rpms
    4. Preparing PAYG cloud instances on Microsoft Azure

      1. Install the leapp-rhui-azure-sap package:

        # yum install leapp-rhui-azure-sap
      2. Enable the rhui-rhel-7-server-rhui-extras-rpms repository:

        # yum-config-manager --enable rhui-rhel-7-server-rhui-extras-rpms
  2. Completing the non-system-specific setup

    After completing the above steps, perform the remaining steps on all systems, no matter if your system is a non-cloud, BYOS cloud, or PAYG cloud system on AWS, Google Cloud or Microsoft Azure.

    1. Stop the SAP HANA system(s) and stop all SAP processes.

      Important

      Do not unmount the SAP HANA file systems, as these are required for detecting if SAP HANA is installed and the version of the installed system.

    2. If your system is configured to start SAP processes automatically at boot time, disable the automatic start of SAP processes.
    3. Configure RHEL settings for SAP HANA:

      1. The SAP HANA installer in SAP HANA 2.0 SPS05 configures kernel settings in file /etc/sysctl.conf. Leave these settings in place.
      2. Additional settings recommended for SAP HANA as per SAP notes 2382421 and 2292690 are configured using files sap.conf and sap_hana.conf in directory /etc/sysctl.d. Settings in sap_hana.conf are valid for both RHEL 7 and RHEL 8, whereas the value for kernel.sem in sap.conf on RHEL 7 is lower than the default value on RHEL 8. Because of this, remove the line that sets kernel.sem to 1250 256000 100 1024 from /etc/sysctl.d/sap.conf. The value for vm.max_map_count is again valid for both RHEL 7 and RHEL 8, so leave this setting in place.
    4. Update your RHEL 7.9 system to the latest RHEL 7 package levels:

      # yum update
    5. Reboot the system:

      # reboot
    6. After the system is up and running, check and confirm that no SAP HANA systems and no SAP processes are running on the system.
    7. Make sure the SAP HANA file systems are available.
    8. Install the leapp utility:

      # yum install leapp-upgrade
    9. Ensure there is no configuration management system (such as Salt, Chef, Puppet, Ansible) enabled or configured to attempt to restore the original RHEL 7 system.
    10. Ensure your system does not use any Network Interface Card (NIC) with a name based on the prefix 'eth'.
    11. Make sure that you have a full backup or a virtual machine snapshot of your system.
    12. If not done already, perform a restore test of the backup to another system, to make sure that the backup can be used for a successful restore. A restore test is also useful for getting used to the required restore activities so that you can get a working system back as quickly as possible, if necessary.

3.2. Step 2: Reviewing the pre-upgrade report

Note

The instructions in this chapter correspond to the topic chapter 4 - Reviewing the pre-upgrade report (Upgrading from RHEL 7 to RHEL 8 guide).

The pre-upgrade process (the leapp preupgrade command) assesses your system for any potential problems you might encounter with the RHEL 7 to RHEL 8 upgrade before any changes to your system are made. This will help you determine your chances of successfully upgrading to RHEL 8.8 or RHEL 8.10 before the actual upgrade process begins.

Note

You can (and should) run the leapp preupgrade command multiple times if necessary to address anything that could cause problems before running the actual upgrade. The leapp preupgrade command will not perform any changes to your installed system. However, once you perform an in-place upgrade on your system, the only way to get the previous system back is from a backup or snapshot that was performed before the upgrade.

Procedure

  1. Perform the pre-upgrade assessment:

    • On a non-cloud or BYOS cloud system, run:

      # leapp preupgrade --channel e4s [--target <target_os_version>]

      Replace <target_os_version> with the target OS version, for example, 8.8. If no target OS version is defined, Leapp uses the default target OS version specified in the table 1.1 in Supported upgrade paths. For example, for an in-place upgrade from RHEL 7.9 to RHEL 8.8, replace <target_os_version> by 8.8 as in:

      # leapp preupgrade --channel e4s --target 8.8
    • On a PAYG cloud instance on AWS, Google Cloud or Microsoft Azure, run:

      # leapp preupgrade --no-rhsm --channel e4s [--target <target_os_version>]

      Replace <target_os_version> with the target OS version, for example, 8.8. If no target OS version is defined, Leapp uses the default target OS version specified in the table 1.1 in Supported upgrade paths.

Note

Do not use --channel option if you upgrade to RHEL 8.10, as it is the final minor release of RHEL 8, it is not E4S release, and its support cycle differs. For more information, see Red Hat Enterprise Linux Life Cycle.

  1. In many cases, the following inhibitors will be reported:

    • Inhibitor: Detected loaded kernel drivers that have been removed in RHEL 8. Upgrade cannot proceed.
    • Inhibitor: Possible problems with remote login using a root account.
    • Inhibitor: Missing required answers in the answer file.

      The report in file /var/log/leapp/leapp-report.txt contains all necessary information, including remediation steps, to resolve these inhibitors.

  2. In the case of non-cloud or BYOS cloud systems, if the message Unable to use yum successfully is reported in step target_userspace_creator and the preupgrade is aborted, this typically indicates that not all required RHEL 7 and RHEL 8 repositories are available with your activation key. To solve this problem, configure your activation key to enable all required repos as per step 1.1.a.i or re-register your system to use an activation key that has all required repos enabled.
  3. Manually resolve all the reported problems before proceeding with the in-place upgrade. As mentioned before, you can repeat this step as often as necessary until no more inhibitors are reported.

3.3. Step 3: Performing the upgrade

Start the upgrade process by running leapp upgrade.

Note

The instructions in this chapter correspond to the topic chapter 5 - Performing the upgrade from RHEL 7 to RHEL 8.

With the Preupgrade Assistant assessment completed and all issues addressed, the next step is to perform the actual system upgrade.
Perform the following steps:

Procedure

  1. Before performing the upgrade, back up all of your data to avoid potential data loss if you have not already done so.
  2. Perform a restore test to verify that the last backup was successful.
  3. Check and confirm again that no SAP HANA system and no SAP processes are running on the system.
  4. Check and confirm that your SAP HANA system will not be started automatically at boot time. For more information, please refer to SAP note 2315907 - Starting HANA automatically after Host has been started.
  5. Check and confirm that the SAP HANA file systems are mounted, as a certain file located below this path is used by Leapp to detect whether the upgraded system is running SAP HANA or not, to assert related inhibitors.
  6. Run the upgrade process:

    • On a non-cloud or BYOS cloud system, run:

      # leapp upgrade --channel e4s [--target <target_os_version>]

      Replace <target_os_version> with the target OS version, for example, 8.8. If no target OS version is defined, Leapp uses the default target OS version specified in the table 1.1 in Supported upgrade paths.

      For example, for an in-place upgrade from RHEL 7.9 to RHEL 8.8, replace <target_os_version> by 8.8 as in:

      # leapp upgrade --channel e4s --target 8.8
    • On a PAYG cloud instance on AWS, Google Cloud or Microsoft Azure, run:

      # leapp upgrade --no-rhsm --channel e4s [--target <target_os_version>]

      Replace <target_os_version> with the target OS version, for example, 8.8. If no target OS version is defined, Leapp uses the default target OS version specified in the table 1.1 in Supported upgrade paths.

Note

Do not use --channel option if you upgrade to RHEL 8.10, as it is the final minor release of RHEL 8, it is not E4S release, and its support cycle differs. For more information, see Red Hat Enterprise Linux Life Cycle.

  1. After this command has completed, a message is shown that asks you to reboot the system. Reboot the system now so that it can finish the upgrade:

    # reboot
  2. The system boots into a RHEL 8-based initial RAM disk image (initramfs), upgrades all packages, and reboots again. This might take some time. Once all packages have been upgraded, the system automatically reboots into the RHEL 8 system.

3.4. Step 4: Verifying the post-upgrade state

Verify that the upgrade was successful.

Note

The instructions in this chapter correspond to the topic chapter 6 - Verifying the post-upgrade state of the RHEL 8 system.

Perform the following steps:

Procedure

  1. Verify that the current OS version is Red Hat Enterprise Linux 8:

    # cat /etc/redhat-release
    Red Hat Enterprise Linux release <target_os_version> (Ootpa)
  2. Check the OS kernel version. Note that `.el8 is important. For example, for RHEL 8.8, it will be 4.18.0-477.10.1.el8 or later:

    # uname -r
    4.18.0-477.10.1.el8

    See also Red Hat Enterprise Linux Release Dates.

  3. Verify that the RHEL release lock is set to the desired target OS version chosen in step 3:

    • On a non-cloud or BYOS cloud system, run:

      # subscription-manager release
      Release: <target_os_version>
    • On a PAYG cloud instance on AWS, Google Cloud or Azure, run:

      # cat /etc/yum/vars/releasever
      <target_os_version>
  4. Verify that the system has all necessary repos enabled:

    # yum repolist
    • On a non-cloud or BYOS cloud system, the output should contain:

      rhel-8-for-x86_64-appstream-e4s-rpms
      rhel-8-for-x86_64-baseos-e4s-rpms
      rhel-8-for-x86_64-sap-netweaver-e4s-rpms
      rhel-8-for-x86_64-sap-solutions-e4s-rpms
    • On a PAYG cloud instance on AWS, the output should contain:

      rhel-8-for-x86_64-appstream-e4s-rhui-rpms
      rhel-8-for-x86_64-baseos-e4s-rhui-rpms
      rhel-8-for-x86_64-highavailability-e4s-rhui-rpms
      rhel-8-for-x86_64-sap-netweaver-e4s-rhui-rpms
      rhel-8-for-x86_64-sap-solutions-e4s-rhui-rpms
    • On a PAYG cloud instance on Google Cloud, the output should contain:

      rhui-rhel-8-for-x86_64-appstream-e4s-rhui-rpms
      rhui-rhel-8-for-x86_64-baseos-e4s-rhui-rpms
      rhui-rhel-8-for-x86_64-highavailability-e4s-rhui-rpms
      rhui-rhel-8-for-x86_64-sap-netweaver-e4s-rhui-rpms
      rhui-rhel-8-for-x86_64-sap-solutions-e4s-rhui-rpms
      Note

      Google Cloud RHEL7 images have the EPEL repo included. RHEL8 images don’t. Therefore, after the upgrade, there can be an error message as follows:

      $ yum repolist
      Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist

      In this case, remove the EPEL repo(s):

      $ rm -f /etc/yum.repos.d/epel*.repo
    • On a PAYG cloud instance on Microsoft Azure, the output should contain:

      rhel-8-for-x86_64-appstream-e4s-rhui-rpms
      rhel-8-for-x86_64-baseos-e4s-rhui-rpms
      rhel-8-for-x86_64-highavailability-e4s-rhui-rpms
      rhel-8-for-x86_64-sap-netweaver-e4s-rhui-rpms
      rhel-8-for-x86_64-sap-solutions-e4s-rhui-rpms
      Note

      On Cloud Providers, the repolist may contain other non-Red Hat repositories, for example, custom repositories for RHUI configuration.

  5. Verify that network services are operational. For example, try to connect to the system using ssh.

3.5. Step 5: Performing post-upgrade tasks

Perform additional steps after you have verified the upgrade. Follow the instructions in Chapter 7. Performing post-upgrade tasks.

3.6. Step 6: Configuring the system for SAP HANA

Configure your upgraded system according to applicable SAP notes for SAP HANA on RHEL 8.

After you have verified that the upgrade was successful, you must configure the system for SAP HANA according to the applicable SAP notes for RHEL 8.

Procedure

  1. If you have configured your RHEL 7.9 system for SAP HANA using the RHEL System Roles for SAP (package rhel-system-roles-sap, roles sap_general_preconfigure and sap_hana_preconfigure) and if you have not made any additional modifications to your system configuration afterwards, you can configure your system with the RHEL System Roles for SAP again.

    Note

    To verify that your system is configured according to the applicable SAP notes, you can run RHEL system roles sap_general_preconfigure and sap_hana_preconfigure in assert mode.

  2. If you want or need to configure your system manually, the following steps will be required:

    1. SAP note 2772999: Install package group server:

      # dnf group install server
    2. SAP note 2772999: Install package libibverbs:

      # dnf install libibverbs
    3. SAP note 2777782: Disable service abrt-ccpp:

      # systemctl disable abrt-ccpp --now
      Note

      SAP note 2772999 version 17 and SAP note 2777782 version 23 recommend setting kernel.pid_max in file /etc/sysctl.d/sap.conf to 4194304. As the default for this kernel parameter in RHEL 8.2 and later is already 4194304, there is no need to set this kernel parameter again.

      After modifying your system configuration as described, reboot your system.

3.7. Step 7: Applying security policies

If your RHEL 7.9 system had certain security policies configured, you should apply these or similar security policies again after the upgrade. A RHEL 7.9 system with SELinux set to disabled will remain on this status after the upgrade to RHEL 8.8 or RHEL 8.10. A RHEL 7.9 system with SELinux set to enforcing will be set to permissive during the upgrade, and you have to manually change it to enforcing after the upgrade.

For these topics, refer to the topic chapter 8 - Applying security policies.

3.8. Step 8: Verifying your SAP HANA system

Verify that your SAP HANA system is operational again.

After you have configured your RHEL 8.8 or RHEL 8.10 system for SAP HANA, you can start your SAP HANA software and run any necessary verification steps to ensure that your SAP HANA system is fully operational again. As mentioned before, this should include functional as well as performance testing of your most important business transactions.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.