SAP HANA on AWS
SAP HANA Guides

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

Migrating SAP HANA on AWS to an EC2 High Memory Instance

EC2 High Memory instances provide up to 12 TiB of memory to support very large SAP HANA databases. EC2 High Memory instances support SUSE Linux Enterprise Server for SAP Applications (SLES for SAP) 12 SP3 or above, and Red Hat Enterprise Linux for SAP Solutions (RHEL for SAP) 7.4 or above. See the SAP HANA hardware directory to see the list of supported operating systems for your instance type. EC2 High Memory instances can be launched only as Amazon EC2 Dedicated Hosts with host tenancy.

Before you start your migration, make sure that an EC2 High Memory instance is allocated to your target account, Availability Zone, and AWS Region.

You have several options for migrating your existing SAP HANA workload on AWS to an EC2 High Memory instance, as discussed in the following sections.

Option 1: Resizing an Existing EC2 Instance with Host or Dedicated Tenancy

If your existing EC2 instance is running with host or dedicated tenancy, you can follow the steps in this section to migrate it to an EC2 High Memory instance. With this option, all your instance properties, including IP addresses, hostnames, and EBS volumes, remain the same after migration.

Figure 10 provides a high-level illustration of this method.


          Migrating to an EC2 High Memory instance with resize option

Figure 10: Migrating to an EC2 High Memory instance with resize option

  1. Make sure that your source system is running on a supported operating system version. If not, you might have to upgrade your operating system before resizing to an EC2 High Memory instance.

  2. If you are using SUSE Linux, make sure that your source system is configured to load the required non-volatile memory express (NVMe) drivers during boot. This step is not required if you are using a SUSE image that has a date stamp later than 20180810. For details, see Changing instance Types in AWS For SLES 12 SP2 and SLES 12 SP3 Based HVM instances on the SUSE blog.

  3. EC2 High Memory instances are based on the Nitro system. On Nitro-based instances, EBS volumes are presented as NVMe block devices. If your source system has any mount point entries in /etc/fstab with reference to block devices such as /dev/xvd<x>, you need to create a label for these devices and mount them by label before migrating to EC2 High Memory instances. Otherwise, you will face issues when you start SAP HANA on an EC2 High Memory instance.

  4. Make sure that you don’t have more than 13 EBS volumes attached to your instance (excluding root volume). An EC2 High Memory instance currently supports only up to 13 EBS volumes. If needed, consolidate some of the EBS volumes to reduce the total number of attached EBS volumes. For details, see Instance Type Limits in the AWS documentation.

  5. When you are ready to migrate, make sure that you have a good backup of your source system.

  6. Stop the source instance in the Amazon EC2 console or by using the AWS CLI.

  7. If your source EC2 instance is running with dedicated tenancy, modify the instance placement to host tenancy. For instructions, see Modifying instance Tenancy and Affinity in the AWS documentation. Skip this step if your instance is running with host tenancy.

  8. Modify the instance placement of your existing instance to your target EC2 High Memory Dedicated Host through the Amazon EC2 console or the AWS CLI. For details, see modify-instance-placement in the AWS documentation.

  9. Change your instance type to the desired EC2 High Memory instance type (for example, u-12tb1.metal) through the AWS CLI.

    Note

    You can change the instance type to an EC2 High Memory instance only through the AWS CLI or Amazon EC2 API.

  10. Start your instance in the Amazon EC2 console or by using the AWS CLI.

  11. When you increase the memory of your SAP HANA system, you might need to adjust the storage size of SAP HANA data, log, shared, and backup volumes as well to accommodate data growth and to get improved performance. For details, see SAP HANA on AWS Operations Guide.

  12. Start your SAP HANA database and perform your validation.

  13. Complete any SAP HANA-specific post-migration activities.

  14. Complete any AWS-specific post-migration activities, such as setting up Amazon CloudWatch, AWS Config, and AWS CloudTrail.

  15. Configure your SAP HANA system for high availability on the EC2 High Memory instance with SAP HANA HSR and clustering software, and test it.

Option 2: Migrating from an Existing EC2 Instance with Default Tenancy

If your existing EC2 instance is running with default tenancy, you have two options to migrate it to an EC2 High Memory instance: You can use an Amazon Machine Image (AMI) to launch your EC2 High Memory instance with host tenancy, or you can set up a new SAP HANA on EC2 High Memory instance and then copy the data over from your source system.

Option 2(a): Migrating Using an AMI

In this option, you launch a new EC2 High Memory instance based on the AMI that you created from your source system for the migration.

Figure 11 provides a high-level illustration of this method.


           Migrating to an EC2 High Memory instance using an AMI

Figure 11: Migrating to an EC2 High Memory instance using an AMI

  1. Make sure that your source system is running on a supported operating system version. If not, you might have to upgrade your operating system before resizing to an EC2 High Memory instance.

  2. If you are using SUSE Linux, make sure that your source system is configured to load the required NVMe drivers during boot. This step is not required if you are using a SUSE image that has a date stamp later than 20180810. For details, see Changing instance Types in AWS For SLES 12 SP2 and SLES 12 SP3 Based HVM instances on the SUSE blog.

  3. EC2 High Memory instances are based on the Nitro system. On Nitro-based instances, EBS volumes are presented as NVMe block devices. If your source system has any mount point entries in /etc/fstab with reference to block devices such as /dev/xvd<x>, you need to create a label for these devices and mount them by label before migrating to EC2 High Memory instances. Otherwise, you will face issues when you start SAP HANA on an EC2 High Memory instance.

  4. When you are ready to migrate, make sure that you have a good backup of your source system.

  5. Stop the source instance in the Amazon EC2 console or by using the AWS CLI.

  6. Create an AMI of your source instance. For details, see Creating an Amazon EBS-Backed Linux AMI in the AWS documentation.

    Tip

    Creating an AMI for the first time with the attached EBS volumes could take a long time, depending on your data size. To expedite this process, we recommend that you take snapshots of EBS volumes attached to the instance ahead of time.

  7. Launch a new EC2 High Memory instance.

  8. The new instance will have a new IP address. Update all references to the IP address of the source system, including the /etc/hosts file for the operating system and DNS entries, to reflect the new IP address. The hostname and storage layout will remain the same as on the source system.

  9. When you increase the memory of your SAP HANA system, you might need to adjust the storage size of SAP HANA data, log, shared, and backup volumes as well to accommodate data growth and to get improved performance. For details, see SAP HANA on AWS Operations Guide.

  10. Start your SAP HANA database and perform your validation.

    Note

    You might notice that SAP HANA is slow when loading data into memory for the first time after you create your instance with an AMI. This is expected behavior when EBS volumes associated with SAP HANA data are created from a snapshot. You will not experience the slowness after the initial hydration.

  11. Complete any SAP HANA-specific post-migration activities.

  12. Check connectivity between your SAP application servers and the new SAP HANA instance.

  13. Complete any AWS-specific post-migration activities, such as setting up Amazon CloudWatch, AWS Config, and AWS CloudTrail.

  14. Configure your SAP HANA system for high availability on the EC2 High Memory instance with SAP HANA HSR and clustering software, and test it.

Option 2(b): Migrating Using SAP HANA HSR or SAP HANA backup and restore

In this option, you launch a new EC2 High Memory instance, install and configure SAP HANA on the instance, and then copy the data over from your source system to complete the migration.

  1. Launch a new SAP HANA EC2 High Memory instance. You can use the SAP HANA Quick Start to set up your instance automatically, or follow the SAP HANA Environment Setup on AWS guide to set up your instance manually. Make sure that you are using an operating system that supports EC2 High Memory instances.

  2. Complete any AWS-specific post-migration activities, such as setting up Amazon CloudWatch, AWS Config, and AWS CloudTrail, ahead of time.

  3. Migrate the data from your existing SAP HANA instance by using SAP HANA HSR or SAP HANA backup and restore tools.

    • If you plan to use SAP HANA HSR for data migration, configure HSR to move data from your source system to your target system. This is illustrated in Figure 12. For details, see the SAP HANA Administration Guide from SAP.

      
                 Migrating to an EC2 High Memory instance with HSR

      Figure 12: Migrating to an EC2 High Memory instance with HSR

        

    • If you plan to use the SAP HANA backup and restore feature to migrate your data, back up your source SAP HANA system. When backup is complete, move the backup data to your target system and perform a restore in your target system. If you back up your source SAP HANA system directly to Amazon S3 with BACKINT, you can directly restore it in the target system from Amazon S3. For details, see the BACKINT guide from your backup software vendor. This is illustrated in Figure 13.

      
                 Migrating to an EC2 High Memory instance with SAP backup and restore

      Figure 13: Migrating to an EC2 High Memory instance with SAP backup and restore

  4. Stop your source system, complete any additional post-migration steps, like updating DNS and checking the connectivity between your SAP application servers and the new SAP HANA instance.

  5. Configure your SAP HANA system for high availability on the EC2 High Memory instance with SAP HANA HSR and clustering software, and test it.