Chapter 3. Upgrading an SAP HANA System
An in-place upgrade enables you to upgrade a RHEL system to the subsequent major release of RHEL. You can do this by replacing the existing operating system without removing applications.
You can perform an in-place of RHEL 8 with SAP HANA from RHEL 8.10 to RHEL 9.4 and from RHEL 8.10 to RHEL 9.6, on AMD64, Intel 64-bit, and IBM Power Systems, when taking into account all the other restrictions mentioned in Planning an upgrade. You must update an SAP HANA system running on earlier OS versions to the source OS version first, for example, RHEL 8.2 to RHEL 8.10, as described in Preparing for the upgrade.
To update PAYG systems on cloud providers from RHEL 8.* to RHEL 8.10, see How to update RHEL from 8.* to 8.10 on Cloud images with the "RHEL for SAP with High Availability and Update Services" subscription.
If the installed SAP HANA version is not on the minimum revision that is supported on both the source and target RHEL minor versions, your SAP HANA software must be upgraded to this level before the OS upgrade. SAP HANA must have been installed using /hana/shared as the installation path.
You must not perform more than one update or upgrade (for example, HANA to 2.0 SPS05 rev 59.06 and RHEL from 8.10 to 9.6), without testing and verifying after each step. This simplifies troubleshooting in case of any errors.
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 9. This should include both functional and performance testing of your most important business transactions.
On production systems, perform all the following steps, including the preparation and pre-upgrade steps, on a test system first to verify that you can finish the upgrade successfully in your environment.
3.1. Preparing for the upgrade Copy linkLink copied to clipboard!
You must prepare the system before performing an in-place upgrade to RHEL 9.
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.
The instructions in this chapter correspond to the Preparing for the upgrade section in the Upgrading from RHEL 8 to RHEL 9 document.
Prerequisites
- Ensure that your system has access to the required repositories and complete system-specific setup.
Procedure
Complete system-specific setup.
Prepare non-cloud or BYOS cloud systems by executing the following steps:
If you previously performed an in-place upgrade from RHEL 7 to RHEL 8, remove the
/root/tmp_leapp_py3directory if it is present on your system:rm -rf /root/tmp_leapp_py3
# rm -rf /root/tmp_leapp_py3Copy to Clipboard Copied! Toggle word wrap Toggle overflow Register and subscribe the system to a Red Hat repository source. If you use Red Hat Satellite, ensure that both RHEL 8 and 9 e4s repositories are available and synchronized with the latest updates. Enable the following repositories for the activation key:
RHEL 8.10 - normal repositories for RHEL 8 and E4S repositories for RHEL 9:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Check and confirm that your RHEL 8 system has the normal repositories enabled:
subscription-manager repos --disable='*' \ --enable="rhel-8-for-x86_64-baseos-rpms" \ --enable="rhel-8-for-x86_64-appstream-rpms" \ --enable="rhel-8-for-x86_64-sap-solutions-rpms" \ --enable="rhel-8-for-x86_64-sap-netweaver-rpms"
# subscription-manager repos --disable='*' \ --enable="rhel-8-for-x86_64-baseos-rpms" \ --enable="rhel-8-for-x86_64-appstream-rpms" \ --enable="rhel-8-for-x86_64-sap-solutions-rpms" \ --enable="rhel-8-for-x86_64-sap-netweaver-rpms"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Remove all files cached by yum/dnf:
rm -rf /var/cache/yum
# rm -rf /var/cache/yumCopy to Clipboard Copied! Toggle word wrap Toggle overflow On RHEL 8.10 BYOS system, ensure that no RHEL release lock is set.
subscription-manager release --unset
# subscription-manager release --unsetCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Prepare PAYG cloud systems on AWS, Google Cloud, or Microsoft Azure:
If you upgrade from RHEL 8.10, remove the version lock by removing a file
/etc/yum/vars/releasever:rm /etc/yum/vars/releasever
# rm /etc/yum/vars/releaseverCopy to Clipboard Copied! Toggle word wrap Toggle overflow
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.
Stop the SAP HANA systems and stop all SAP processes.
ImportantDo 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.
-
If your system is configured to start SAP processes automatically at boot time, turn off the automatic start of SAP processes.
Verify that the RHEL settings for SAP HANA are in place by checking the following:
As per SAP note 2772999, the following parameter is required for SAP applications, including SAP HANA and is typically set in file
/etc/sysctl.d/sap.conf:vm.max_map_count = 2147483647
vm.max_map_count = 2147483647Copy to Clipboard Copied! Toggle word wrap Toggle overflow The same setting is required for SAP applications, including SAP HANA on RHEL 9.
The file/etc/sysctl.d/sap.confmight also contain:kernel.pid_max = 4194304
kernel.pid_max = 4194304Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
All other settings for SAP HANA (in file
/etc/sysctl.confand/etc/sysctl.d/sap_hana.conf) are identical for RHEL 8 and RHEL 9 and must be left in place. For details, refer to SAP Notes 2382421.
Update your RHEL 8.* system to the required source OS version package levels:
dnf update
# dnf updateCopy to Clipboard Copied! Toggle word wrap Toggle overflow Reboot the system:
reboot
# rebootCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
After the system is up and running, check and confirm that no SAP HANA systems and no SAP processes are running on the system.
-
Make sure the SAP HANA file systems are available.
Install the leapp utility:
dnf install leapp-upgrade
# dnf install leapp-upgradeCopy to Clipboard Copied! Toggle word wrap Toggle overflow Prepare PAYG cloud instances on AWS by installing the leapp-rhui-aws-sap-e4s package:
dnf install leapp-rhui-aws-sap-e4s
# dnf install leapp-rhui-aws-sap-e4sCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
Prepare PAYG cloud instances on Google Cloud by downloading and installing the
leapp-rhui-google-v4-rhel8-sappackage as instructed in the Leapp RHUI packages for Google Cloud Platform (GCP) document. Prepare PAYG cloud instances on Microsoft Azure by installing the
leapp-rhui-azure-sappackage:dnf install leapp-rhui-azure-sap
# dnf install leapp-rhui-azure-sapCopy to Clipboard Copied! Toggle word wrap Toggle overflow
-
Temporarily turn off any antivirus software.
-
Ensure there is no configuration management system (such as Salt, Chef, Puppet, Ansible) enabled or configured to attempt to restore the original RHEL 8 system.
-
Ensure your system does not use any Network Interface Card (NIC) with a name based on the prefix 'eth'. Refer to this KB article for more information.
-
If your NSS (Network Security Services) database was created in RHEL 7 or earlier, verify that the database has been converted from the DBM database format to SQLite. For more information, see Updating NSS databases from DBM to SQLite.
-
RHEL 9 does not support the legacy network-scripts package that was deprecated in RHEL 8. Before you upgrade, move your custom network scripts and write a NetworkManager dispatcher script that executes your existing custom scripts. For more information, see Migrating custom network scripts to NetworkManager dispatcher scripts.
-
Make sure that you have a full backup or a virtual machine snapshot of your system.
- 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. Reviewing the pre-upgrade report Copy linkLink copied to clipboard!
Start the pre-upgrade process by running leapp preupgrade to collect data, assess the system upgradability, and generate a pre-upgrade report for determining if the system can be upgraded. No changes are made to the system, and you can repeat this step as often as necessary until no more inhibitors are reported.
The instructions in this chapter correspond to the Reviewing the pre-upgrade report section in the Upgrading from RHEL 8 to RHEL 9 document.
The pre-upgrade process (the leapp preupgrade command) assesses your system for any potential problems you might encounter with the RHEL 8 to RHEL 9 upgrade before any changes to your system are made. This will help you determine your chances of successfully upgrading to RHEL 9 before the actual upgrade process begins.
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 does 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 has been performed before the upgrade.
Procedure
Perform the pre-upgrade assessment:
On a non-cloud or BYOS cloud system, run:
leapp preupgrade --channel e4s --target <target_os_version>
# leapp preupgrade --channel e4s --target <target_os_version>Copy to Clipboard Copied! Toggle word wrap Toggle overflow On a PAYG cloud instance on AWS, Google Cloud or Microsoft Azure, run:
leapp preupgrade --no-rhsm --channel e4s --target <target_os_version>
# leapp preupgrade --no-rhsm --channel e4s --target <target_os_version>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace <target_os_version> with the target OS version, for example, 9.4 or 9.6.
-
If any inhibitors are reported, the output file
/var/log/leapp/leapp-report.txtcontains all necessary information, including remediation steps, to avoid these inhibitors. - Manually resolve all the reported problems before proceeding with the in-place upgrade. You can repeat this step until no more inhibitors are reported.
3.3. Performing the upgrade Copy linkLink copied to clipboard!
Start the upgrade process by entering the leapp upgrade command.
The instructions in this chapter correspond to the Performing the upgrade section in the Upgrading from RHEL 8 to RHEL 9 document.
With the Preupgrade Assistant assessment completed and all issues addressed, the next step is to perform the actual system upgrade.
Procedure
-
Before performing the upgrade, back up all of your data to avoid potential data loss if you have not done so already.
-
Perform a restore test to verify that the last backup was successful.
-
Verify that no SAP HANA system and no SAP processes are running on the system.
-
Confirm that the SAP HANA file systems are mounted, as a certain file located below this path is used by Leapp to detect the SAP HANA version when upgrading to RHEL 9.
-
Verify that your SAP HANA system does not start automatically at boot time. For more information, see the SAP note 2315907 - Starting HANA automatically after the host has been started.
Start the upgrade process:
On a non-cloud or BYOS cloud system, enter:
leapp upgrade --channel e4s --target <target_os_version>
# leapp upgrade --channel e4s --target <target_os_version>Copy to Clipboard Copied! Toggle word wrap Toggle overflow On a PAYG cloud instance on AWS, Google Cloud or Microsoft Azure, enter:
leapp upgrade --no-rhsm --channel e4s --target _<target_os_version>_
# leapp upgrade --no-rhsm --channel e4s --target _<target_os_version>_Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace <target_os_version> with the target OS version, for example, 9.4 or 9.6.
After the completion of this command, restart the system to finish the upgrade:
reboot
# rebootCopy to Clipboard Copied! Toggle word wrap Toggle overflow - The system boots into a RHEL 9-based initial RAM disk image (initramfs), upgrades all packages, and restarts again. After all packages are upgraded, the system automatically starts into the RHEL 9 system.
3.4. Verifying the post-upgrade state Copy linkLink copied to clipboard!
Verify that the upgrade was successful.
The instructions in this chapter correspond to the Verifying the post-upgrade state section in the Upgrading from RHEL 8 to RHEL 9 document.
Procedure
Verify that the current OS version is Red Hat Enterprise Linux 9. For example, for the upgrade from RHEL 8.10 to RHEL 9.6:
cat /etc/redhat-release Red Hat Enterprise Linux release 9.6 (Plow)
# cat /etc/redhat-release Red Hat Enterprise Linux release 9.6 (Plow)Copy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the RHEL release lock is set to the required target OS version. For example, when you upgrade from RHEL 8.10 to RHEL 9.6:
On a non-cloud or BYOS cloud system:
Make sure that the RHEL release lock is set to 9.6 and that all lines in
/etc/yum.repos.d/redhat.repostarting withbaseurlcontain the stringrhel9/9.6(and not, for example,rhel9/8.10), in the URL field. Enter:subscription-manager release --set=9.6 Release set to: 9.6
# subscription-manager release --set=9.6 Release set to: 9.6Copy to Clipboard Copied! Toggle word wrap Toggle overflow On a PAYG cloud instance on AWS, Google Cloud or Azure, enter:
cat /etc/dnf/vars/releasever 9.6
# cat /etc/dnf/vars/releasever 9.6Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verify that the system has all necessary repositories enabled:
dnf repolist
# dnf repolistCopy to Clipboard Copied! Toggle word wrap Toggle overflow On a non-cloud or BYOS cloud system, the output should contain:
rhel-9-for-x86_64-appstream-e4s-rpms rhel-9-for-x86_64-baseos-e4s-rpms rhel-9-for-x86_64-sap-netweaver-e4s-rpms rhel-9-for-x86_64-sap-solutions-e4s-rpms
rhel-9-for-x86_64-appstream-e4s-rpms rhel-9-for-x86_64-baseos-e4s-rpms rhel-9-for-x86_64-sap-netweaver-e4s-rpms rhel-9-for-x86_64-sap-solutions-e4s-rpmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Turn off all normal (=non-e4s) repositories:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On a PAYG cloud instance on AWS, the output should contain:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On a PAYG cloud instance on Google Cloud, the output should contain:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow On a PAYG cloud instance on Microsoft Azure, the output should contain:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
- Verify that network services are operational. For example, try to connect to the system using SSH.
3.5. Performing post-upgrade tasks Copy linkLink copied to clipboard!
Perform additional steps after you have verified the upgrade. Follow the instructions in Chapter 7. Performing post-upgrade tasks on the RHEL 9 system (Upgrading from RHEL 8 to RHEL 9 guide).
3.6. Configuring the system for SAP HANA Copy linkLink copied to clipboard!
Configure your upgraded system according to applicable SAP notes for SAP HANA on RHEL 9.
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 9.
Procedure
-
If you had configured your RHEL 8.* system for SAP HANA using the RHEL System Roles for SAP (package
rhel-system-roles-sap, rolessap_general_preconfigureandsap_hana_preconfigure) and if you have not done any additional modifications to your system configuration, you can configure your system with the RHEL System Roles for SAP whenever required. In case you want or need to configure your system manually, the following steps will be required:
Confirm that the
Serverenvironment group is installed:dnf group list installed server+*+ [...] Installed Environment Groups: Server
# dnf group list installed server+*+ [...] Installed Environment Groups: ServerCopy to Clipboard Copied! Toggle word wrap Toggle overflow Verify that the packages
chkconfigandcompat-openssl11are installed:dnf list installed chkconfig compat-openssl11 [...] Installed Packages chkconfig.x86_64 1.20-2.el9 @System compat-openssl11.x86_64 1:1.1.1k-4.el9_0 @rhel-9-for-x86_64-appstream-e4s-rpms
# dnf list installed chkconfig compat-openssl11 [...] Installed Packages chkconfig.x86_64 1.20-2.el9 @System compat-openssl11.x86_64 1:1.1.1k-4.el9_0 @rhel-9-for-x86_64-appstream-e4s-rpmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Install any of the previously mentioned packages if necessary.
NoteThe
compat-openssl11package is only required for SAP HANA scale-out installations.Verify that the service
abrt-ccppis nonexistent or disabled:systemctl status abrt-ccpp Unit abrt-ccpp.service could not be found.
# systemctl status abrt-ccpp Unit abrt-ccpp.service could not be found.Copy to Clipboard Copied! Toggle word wrap Toggle overflow If it exists and is not disabled, disable it:
systemctl disable abrt-ccpp --now
# systemctl disable abrt-ccpp --nowCopy to Clipboard Copied! Toggle word wrap Toggle overflow After modifying your system configuration as described, restart your system.
NoteFor verifying that your system is configured according to the applicable SAP notes, you can run RHEL system roles
sap_general_preconfigureandsap_hana_preconfigurein assert mode.
Verify that your system is running with the RHEL kernel version certified for the desired OS target version, as required in SAP note 3108302.
uname -r 5.14.0-570.12.1.el9_6.x86_64
# uname -r 5.14.0-570.12.1.el9_6.x86_64Copy to Clipboard Copied! Toggle word wrap Toggle overflow
3.7. Applying security policies Copy linkLink copied to clipboard!
Apply any necessary security policies.
If your RHEL 8 system had certain security policies configured, you should apply these or similar security policies again after the upgrade. A RHEL 8 system with SELinux set to disabled will remain on this status after the upgrade to RHEL 9. A RHEL 8 system with SELinux set to enforcing will be set to permissive during the upgrade. You have to manually change it to enforcing after the upgrade.
For these topics, refer to the topic chapter 8 - Applying security policies (Upgrading from RHEL 8 to RHEL 9 guide).
3.8. Verifying your SAP HANA system Copy linkLink copied to clipboard!
Verify that your SAP HANA system is operational again.
After you have configured your RHEL 9.2 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.