

# Configure storage (Amazon EBS)
<a name="storage-configuration-ebs"></a>

This section explains how to deploy and configure SAP HANA scale-up and scale-out workloads with Amazon EBS.

**Topics**
+ [Calculate Requirements](hana-storage-config-ebs.md)
+ [Storage Reference](hana-storage-config-reference-layout.md)
+ [Deploy Workloads](deployment-steps-using-the-aws-management-console.md)
+ [Configure Fileystems](configure-storage-for-sap-hana.md)
+ [

# Architecture
](architecture-ebs.md)

# Calculate EBS Storage Requirements for SAP HANA
<a name="hana-storage-config-ebs"></a>

## Overview
<a name="_overview"></a>

This guide provides storage configuration recommendations for SAP HANA workloads running on Amazon EC2. Learn how to configure Amazon EBS volumes to meet SAP’s storage key performance indicators (KPIs).

SAP HANA stores and processes its data primarily in memory, and provides protection against data loss by saving the data to persistent storage locations. To achieve optimal performance, the storage solution used for SAP HANA data and log volumes should meet SAP’s storage KPI requirements. AWS has worked with SAP to certify both Amazon EBS General Purpose SSD (gp2 and gp3) and Provisioned IOPS SSD (io1, io2 Block Express) storage solutions for SAP HANA workloads.

## New Amazon EBS Storage Guidelines for SAP HANA
<a name="_new_amazon_ebs_storage_guidelines_for_sap_hana"></a>

This document introduces a memory-based formula approach for storage sizing, replacing previous instance-specific recommendations. This change enables customers to better understand storage configuration logic and maintain greater control over performance optimization decisions.

The new guidance focuses on gp3 and io2 Block Express volumes as the current standard recommendation for all new deployments. While gp2 and io1 volumes remain supported for existing deployments, we recommend gp3 for new implementations due to its predictable performance and cost-effectiveness, with io2 Block Express as the upgrade path for systems requiring additional performance.

**Note**  
If your SAP HANA system was deployed using previous guidance, including the use of Launch Wizard, it is not necessary to change the configuration. Existing configurations based on previous recommendations continue to meet the necessary requirements.

## Testing with SAP HANA Hardware and Cloud Measurement Tools
<a name="_testing_with_sap_hana_hardware_and_cloud_measurement_tools"></a>

 AWS has ensured that the storage configuration guidelines meet the Key Performance Indicators (KPIs) for running SAP HANA. However, for workloads with high performance requirements or those that deviate from the standard recommendation, we strongly recommended validating the performance of your storage configuration with SAP HANA Hardware and Cloud Measurement Tools.

See:
+ SAP Note: [2493172 - SAP HANA Hardware and Cloud Measurement Tools](https://me.sap.com/notes/2493172) 
+ SAP Documentation: [SAP HANA Hardware and Cloud Measurement Tools](https://help.sap.com/viewer/product/HANA_HW_CLOUD_TOOLS/latest/en-US) 

## EBS Storage Volume Configurations
<a name="_ebs_storage_volume_configurations"></a>

This section provides the formulas and methodology for calculating SAP HANA storage requirements. The calculations factor in memory size and workload characteristics to determine appropriate volume sizing and performance configuration. Adjust these baseline recommendations based on your specific workload requirements and growth projections.

Refer to [SAP HANA EBS Storage Reference](hana-storage-config-reference-layout.md) for calculated requirements based on available memory.

**Topics**
+ [

### Root and SAP Binary Volumes
](#root_and_sap)
+ [

### HANA Data Volume
](#hana_data)
+ [

### HANA Log Volume
](#hana_log)
+ [

### HANA Shared Volume
](#hana_shared)
+ [

### HANA Backup Volume (Optional)
](#hana_backup)
+ [

### When to Stripe Volumes
](#_when_to_stripe_volumes)

**Important**  
Some EC2 Instances Types may include [instance storage](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html), this storage is ephemeral and must not be used for SAP HANA files. Configure Amazon EBS volumes for all SAP HANA storage requirements.

### Root and SAP Binary Volumes
<a name="root_and_sap"></a>

The root volume contains operating system files, configuration, and logs. The sizing recommendation is suitable for most SAP HANA deployments and sizes, but may vary based on your AMI strategy and non-SAP software requirements. Consider using a separate volume for the `/tmp` filesystem in high-usage environments.

The SAP binaries volume (`default /usr/sap/<SID>/`) contains common SAP executables and binaries.

**Storage Type**  
Use gp3 volumes for root storage. The baseline performance characteristics meet operating system requirements.

 **Size Calculation** 

```
root_and_sap_volume_size = 50 GiB
```

 **IOPS Formula** 

```
root_and_sap_iops_target = 3000 (fixed)
```

 **Throughput Formula** 

```
root_and_sap_throughput_target = 125 MB/s (fixed)
```

**Example**  
 *ANY Memory System Root Volume:* 

**Example**  
+ Size = 50 GiB
+ IOPS = 3000
+ Throughput = 125 MB/s

### HANA Data Volume
<a name="hana_data"></a>

The Storage\$1DATA filesystem (default `/hana/data`) stores the persistent copy of the SAP HANA in-memory database. While SAP HANA operates with data in-memory, this volume ensures data durability through regular savepoints. The storage must handle mixed workload patterns including random reads and writes during normal operation, and sequential patterns during savepoints, with consistently low latency to maintain database performance.

**Size Calculation**  
The data volume size requirements are derived from system memory size. While actual storage requirements depend on your specific workload, compression ratios, and growth projections, use the following calculation as a baseline. Consult SAP sizing tools for precise calculations.
+ SAP Documentation: [SAP Benchmark Sizing](https://www.sap.com/about/benchmark/sizing.html) 

```
data_volume_size = MROUND(memory_size * 1.2, 100)

Where:
- Size factor = 1.2
- Rounding factor = 100
```

**Note**  
While SAP has updated their size factor recommendation from 1.2 to 1.5 to accomodate operational requirement, AWS maintains the 1.2 factor as the baseline for initial deployments. This is a cost-effective approach that leverages the dynamic scaling capabilities of EBS volumes, allowing you to expand storage capacity online as your needs grow. You can easily increase volume size without service interruption when additional space is required.

**Storage Type Selection**
+ Use gp3 with custom IOPS/throughput up to volume limits
+ Consider io2 Block Express when requiring consistent sub-millisecond latency
+ For Xen based instances, use gp2 (striped) or io2 Block Express since gp3 may not meet the SAP HANA storage latency KPI for log writes.

 **IOPS Formula** 

```
data_iops_target = MROUND(7200 + (0.45 * memory_size), 100)

Where:
- Base IOPS = 7200
- IOPS factor = 0.45 per GiB of memory
- Rounding factor = 100
```
+ Large instances may require multiple volumes to achieve the specified data\$1iops\$1target. Refer to the striping guidelines below.
+ The minimum IOPS required to meet SAP HANA KPIs for Data is 7000.

 **Throughput Formula** 

```
data_throughput_target = MIN(MROUND(450 + (0.2 * memory_size), 125), 2000)

Where:
- Base throughput = 450 MB/s
- Throughput factor = 0.2 MB/s per GiB of memory
- Maximum throughput = 2000 MB/s (see exception)
- Rounding factor = 125
```
+ For large instances using gp3 volumes, a single volume might not achieve the required `data_throughput_target`. For more information about using multiple volumes, see [When to Stripe Volumes](#_when_to_stripe_volumes).
+ SAP’s minimum throughput requirement for HANA data volumes is 400 MB/s. The base throughput value of 450 MB/s in our formula ensures this SAP KPI is met with additional headroom for optimal performance.
+ Every instance type has its own Amazon EBS throughput maximum. For details, see [Amazon EBS-Optimized Instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-optimized.html) in the AWS documentation.
+ Exception: For instances of 32 TB and larger (currently instance type u7inh-32tb.480xlarge), we recommend provisioning 4000 MB/s of throughput or higher. For all other instance sizes, if you need more than 2000 MB/s of throughput, you can adjust the maximum throughput value in the formula accordingly.

**Volume Striping**  
Implement volume striping when you need to meet specific technical limits, performance requirements, or operational demands. Refer to the [When to Stripe Volumes](#_when_to_stripe_volumes) for detailed guidance on when striping is appropriate.

For gp3 volumes, throughput is typically the first limit you’ll encounter. For io2 Block Express volumes, throughput is calculated as IOPS × I/O size. SAP HANA workloads typically use 256 KiB I/O operations - at this size, a single io2 Block Express volume can achieve 4,000 MB/s throughput with 16,000 IOPS. Given these capabilities, volume striping is not required for most HANA deployments on io2 Block Express. If higher throughput is needed, you can adjust the provisioned IOPS accordingly.

If implementing striping for data volumes, use a 256 KB stripe size to optimize for data operations.

**Examples**  
 *512 GiB Memory System HANA Data Volume:* 

**Example**  
+ Storage Type Selection = GP3
+ Size = MROUND((512 GiB \$1 1.2),100) = 600 GiB
+ IOPS = MROUND(7,200 \$1 (0.45 \$1 512), 100) = 7,460 IOPS
+ Throughput = MIN(MROUND(450 \$1 (0.2 \$1 512), 125), 2,000) = 500 MB/s
+ Striping = Not required.

 *4 TiB Memory System HANA Data Volume:* 

**Example**  
+ Storage Type Selection = GP3
+ Size = MROUND((4,096 GiB \$1 1.2),100) = 4,900 GiB
+ IOPS = MROUND(7,200 \$1 (0.45 \$1 4096), 100) = 9,000 IOPS
+ Throughput = MIN(MROUND(450 \$1 (0.2 \$1 4,096), 125), 2000) = 1250 MB/s
+ Striping = Required for throughput. Consider 2 x 2,450 GiB Filesystems, 4500 IOPS, 625 MB/s Throughput

### HANA Log Volume
<a name="hana_log"></a>

The Storage\$1LOG filesystem (default `/hana/log`) stores the redo log files that ensure data durability and consistency. This filesystem handles write-intensive workloads with high-frequency, small, sequential writes. Because log writes directly impact database response time and transaction performance, storage volumes require consistent sub-millisecond latency.

**Size Calculation**  
The log volume size requirements are derived from system memory size. Modifications can be made based on transaction volume and log backup frequency.

```
log_volume_size = MROUND((memory_size * 0.5),100)

Where:
- Minimum Size = 50 GiB
- Maximum Size = 500 GiB
- Rounding factor = 100
```

**Storage Type Selection**
+ Use gp3 with custom IOPS/throughput up to volume limits
+ Consider io2 Block Express when requiring consistent sub-millisecond latency
+ For Xen based instances, use gp2 (striped) or io2 Block Express since gp3 may not meet the SAP HANA storage latency KPI for log writes.

 **IOPS Formula** 

```
log_iops_target = 3000

Where:
- Base IOPS = 3000
```
+ The minimum IOPS required to meet SAP HANA KPIs for Data is 3000.

 **Throughput Formula** 

```
log_throughput_target = MIN(MROUND(300 + (0.015 * memory_size), 300), 500)

Where:
- Base throughput = 300 MB/s
- Throughput factor = 0.015 MB/s per GiB of memory
- Maximum throughput = 500 MB/s
- Rounding factor = 300
```
+ SAP’s minimum throughput requirement for HANA log volumes is 250 MB/s. The base throughput value of 300 MB/s and the rounding factor in our formula ensures this value remains static with changing sizes and that the SAP KPI is met with additional headroom for optimal performance.

**Volume Striping**  
For log volumes, striping is generally not required to achieve the `log_throughput_target` when using gp3 or io2 Block Express volumes. Single volumes typically provide sufficient performance for log operations.

If implementing striping for log volumes, use a 64 KB stripe size to optimize for sequential write patterns typical of log operations. Refer to the [When to Stripe Volumes](#_when_to_stripe_volumes) section to understand where striping is required in order to achieve the throughput, IOPS or performance targets.

**Examples**  
 *512 GiB Memory System HANA Log Volume:* 

**Example**  
+ Storage Type Selection = GP3
+ Size = MROUND512 GiB \$1 0.5),100 = 300 GiB (within 500 GiB maximum)
+ IOPS = 3000
+ Throughput = MIN(MROUND(300 \$1 (0.015 \$1 512), 300), 500) = 300 MB/s
+ Striping = Not required.

### HANA Shared Volume
<a name="hana_shared"></a>

The HANA Shared filesystem (default `/hana/shared`) contains SAP HANA installation files, trace files, and shared configuration files.

**Note**  
This file system must be accessible to all nodes in scale-out deployments.

**Size Calculation**  
For single-node deployments:

```
shared_volume_size = MIN(memory_size, 1024)

Where:
- memory_size is system memory in GiB
- 1024 represents 1 TiB maximum
```

For scale-out deployments:

For scale-out SAP HANA systems, the /hana/shared filesystem requires disk space equal to one worker node’s memory for every four worker nodes in the deployment.

```
shared_volume_size = worker_node_memory * CEILING(number_of_worker_nodes/4)

Where:
- worker_node_memory is the memory size of a single worker node in GiB
- number_of_worker_nodes is the total number of worker nodes
- CEILING rounds up to the nearest whole number
```

 **Examples for scale-out deployments** 


|  |  |  |  | 
| --- |--- |--- |--- |
|  Worker Node Memory  |  Number of Nodes  |  Calculation  |  Required Size  | 
|  2 TiB  |  1-4 nodes  |  2048 \$1 1  |  2 TiB  | 
|  2 TiB  |  5-8 nodes  |  2048 \$1 2  |  4 TiB  | 
|  2 TiB  |  9-11 nodes  |  2048 \$1 3  |  6 TiB  | 
|  2 TiB  |  12-15 nodes  |  2048 \$1 4  |  8 TiB  | 

**Storage Type Selection**
+ GP3 provides the required performance characteristics for scale-up deployments
+ Amazon EFS is a viable option for both scale-up and scale-out deployments, providing shared access across all nodes with the required performance characteristics. For scale-out configurations, see [Configure Storage (EFS)](configure-nfs-for-scale-out-workloads.md) 

 **IOPS Formula** 

```
shared_iops_target = 3000

Where:
- Base IOPS = 3000 (fixed)
```

 **Throughput Formula** 

```
shared_throughput_target = 125

Where:
- Base throughput = 125 MB/s (fixed)
```

**Examples**  
 *512 GiB Memory System HANA Shared Volume:* 

**Example**  
+ Size = 512 GiB
+ IOPS = 3000
+ Throughput = 125 MB/s

### HANA Backup Volume (Optional)
<a name="hana_backup"></a>

The `/backup` filesystem provides local storage for SAP HANA file-based backups, including data and log backups. While local filesystem backups can be useful for non-critical systems or as a secondary backup option, they present several challenges in production environments:
+ An additional sync step is required to move backups to durable storage like Amazon S3
+ The recovery point objectives may be impacted if there is a disk or hardware failure
+ Careful management of local storage capacity is required via housekeeping and monitoring
+ In scale-out, volume needs to be accessible across all nodes

**Important**  
 AWS recommends using [AWS Backup for SAP HANA](https://docs.aws.amazon.com/sap/latest/sap-hana/aws-backint-agent-backup.html) or the [AWS Backint Agent](https://docs.aws.amazon.com/sap/latest/sap-hana/aws-backint-agent-backup.html) instead of file-based backups. These solutions provide direct backup to durable storage and simplify backup management.

**Size Calculation**  
The size of the backup volume is very dependent on the usage of the system. The following should be used as an initial baseline, but adapted post deployment depending on backup size, volume of change, retention of local copies and contingency.

```
backup_volume_size = memory_size * 3

Where:
- memory_size is system memory in GiB
```

**Storage Type Selection**
+ For single-node deployment, we recommend using Amazon EBS Throughput Optimized HDD (st1) volumes for SAP HANA to perform file-based backup. This volume type provides low-cost magnetic storage designed for large sequential workloads. SAP HANA uses sequential I/O with large blocks to back up the database, so st1 volumes provide a low-cost, high-performance option for this scenario. To learn more about st1 volumes, see [Amazon EBS Volume Types](https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html).
+ For multi-node deployment, we recommend using Amazon EFS for SAP HANA to perform file-based backup. It can support performance over 10 GB/sec and over 500,000 IOPS.

 **IOPS Formula** 

```
backup_iops_target = n/a
```

**Note**  
ST1 Baseline is 500 IOPs but this is not configurable. Backup operations typically depend more on throughput than IOPS performance.

**Throughput Formula**  
For ST1 volumes, use this formula as a starting point to determine the number of volumes needed for backup throughput. Adjust the final volume count based on your actual backup window requirements and performance monitoring data.

```
backup_volumes_for_throughput = CEILING(memory_size/6000) * 500

Where:
- memory_size is system memory in GiB
- 6000 represents the GiB threshold for striping
- 500 is maximum throughput MB/s per st1 volume
- Result indicates number of volumes needed for throughput
```

 **Examples for scale-out deployments** 


|  |  |  | 
| --- |--- |--- |
|  Worker Node Memory  |  Volumes  |  Throughput  | 
|  4 TiB  |  1  |  500 MB/s  | 
|  12 TiB  |  2  |  1000 MB/s  | 
|  24 TiB  |  4  |  2000 MB/s  | 

### When to Stripe Volumes
<a name="_when_to_stripe_volumes"></a>

Linux Logical Volume Management (LVM) striping distributes data across multiple EBS volumes to increase I/O performance. The striped volumes act as a single logical volume, with reads and writes distributed across all volumes in the stripe set.

Implement storage volume striping in the following scenarios:

Technical Limits  
+ Throughput requirements exceed single volume maximum (1,000 MB/s for gp3, 4,000 MB/s for io2 Block Express).
  + For io2 Block Express volumes, throughput is calculated as IOPS × I/O size. SAP HANA workloads typically use 256 KiB I/O operations - at this size, a single io2 Block Express volume can achieve 4,000 MB/s throughput with 16,000 IOPS. Given these capabilities, volume striping is not required for most HANA deployments on io2 Block Express. If higher throughput is needed, you can adjust the provisioned IOPS accordingly.
+ IOPS requirements exceed single volume maximum (16,000 for gp3, 256,000 for io2 Block Express)
+ Volume size requirements exceed single volume maximum (16 TiB for gp3, 64 TiB for io2 Block Express)

Operational Requirements  
+ Large data loads or backups that need to complete within specific time windows
+ Systems with memory sizes > 4 TiB where data operations exceed acceptable durations
+ High-throughput analytical workloads requiring sustained parallel I/O
+ Expected growth that will exceed single-volume limits

**Important**  
Before implementing striping, first consider using higher performance EBS volume types or adjusting the IOPS and throughput settings within single-volume limits. Striping requires volumes of the same type and size, and balanced I/O patterns to be effective.

# SAP HANA EBS Storage Reference
<a name="hana-storage-config-reference-layout"></a>

**Important**  
These values serve as a starting point. For guidance on how to size and configure storage for your specific workload, including calculations and striping considerations, refer to [Calculate Requirements](hana-storage-config-ebs.md).

**Topics**
+ [

## Certified Instances - General
](#general)
+ [

## Certified Instances - High Memory
](#_certified_instances_high_memory)
+ [

## Suitable for Non-Production Use
](#_suitable_for_non_production_use)

## Certified Instances - General
<a name="general"></a>

For systems with less than 2 TiB of memory storage can typically be configured using standard Amazon EBS volumes. gp3 volumes usually balance price and performance for a variety of workloads, while io2 volumes should be considered when higher durability is required or to improve startup and EBS snapshot restore times.

Sample layouts are provided for the following memory configurations:

Memory sizes: [256 GiB](#mem-256), [384 GiB](#mem-384), [488 GiB](#mem-512), [512 GiB](#mem-512), [768 GiB](#mem-768), [976 GiB](#mem-1024), [1024 GiB](#mem-1024), [1536 GiB](#mem-1536), [2 TiB](#mem-2tb) 

### 256 GiB Memory Systems
<a name="mem-256"></a>

Applicable Instance Types: **r8i.8xlarge**, **r7i.8xlarge**, **r6i.8xlarge**, **r5.8xlarge**, **r5b.8xlarge**, **x2iedn.2xlarge**, **r4.8xlarge**, **r3.8xlarge1 **, **x1e.2xlarge1 ** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  300  |  7,300  |  500  |  gp3/io2  |  Not Required  |  | 
|  HANA Log  |  100  |  3,000  |  300  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  256  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

 1 Xen instance types. We suggest migrating to a Nitro instance type.

### 384 GiB Memory Systems
<a name="mem-384"></a>

Applicable Instance Types: **r8i.12xlarge**, **r7i.12xlarge**, **r6i.12xlarge**, **r5.12xlarge**, **r5b.12xlarge** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  500  |  7,400  |  500  |  gp3/io2  |  Not Required  |  | 
|  HANA Log  |  200  |  3,000  |  300  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  384  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

### 488 GiB / 512 GiB Memory Systems
<a name="mem-512"></a>

Applicable Instance Types: **r8i.16xlarge**, **r7i.16xlarge**, **r6i.16xlarge**, **r5.16xlarge**, **r5b.16xlarge**, **x2iedn.4xlarge**, **r4.16xlarge**, **x1e.4xlarge** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  600  |  7,400  |  500  |  gp3/io2  |  Not Required  |  | 
|  HANA Log  |  300  |  3,000  |  300  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  512  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

### 768 GiB Memory Systems
<a name="mem-768"></a>

Applicable Instance Types: **r8i.24xlarge**, **r7i.24xlarge**, **r6i.24xlarge**, **r5.24xlarge**, **r5.metal**, **r5b.24xlarge**, **r5b.metal**, **x8i.12xlarge** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  900  |  7,500  |  625  |  gp3/io2  |  Not Required  |  | 
|  HANA Log  |  400  |  3,000  |  300  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  768  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

### 976 GiB / 1024 GiB Memory Systems
<a name="mem-1024"></a>

Applicable Instance Types: **x2idn.16xlarge**, **r6i.32xlarge**, **x1.16xlarge1 **, **x8i.16xlarge** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  1,200  |  7,700  |  625  |  gp3/io2  |  Not Required  |  | 
|  HANA Log  |  500  |  3,000  |  300  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  1,024  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

 1 Xen instance types. We suggest migrating to a Nitro instance type.

### 1,536 GiB Memory Systems
<a name="mem-1536"></a>

Applicable Instance Types: **r8i.48xlarge**, **x2idn.24xlarge**, **r7i.48xlarge**, **x8i.24xlarge** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  1,800  |  7,900  |  750  |  gp3/io2  |  Not Required  |  | 
|  HANA Log  |  500  |  3,000  |  300  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  1,024  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

### 2 TiB Memory Systems
<a name="mem-2tb"></a>

Applicable Instance Types: **x2idn.32xlarge**, **x1.32xlarge**, **x8i.32xlarge** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  2,500  |  8,100  |  875  |  gp3/io2  |  Not Required  |  | 
|  HANA Log  |  500  |  3,000  |  300  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  1,024  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

## Certified Instances - High Memory
<a name="_certified_instances_high_memory"></a>

Storage configuration for high memory systems requires careful planning to meet increased I/O demands. Multiple EBS volumes in striped configurations and/or io2 may be required to meet the higher IOPs and throughput demands, particularly for data volumes. As with smaller systems, durability, startup and snapshot restore times should also be considered.

Sample layouts are provided for the following memory configurations:

Memory sizes: [3 TiB](#mem-3tb), [4 TiB](#mem-4tb), [6 TiB](#mem-6tb), [8 TiB](#mem-8tb), [9 TiB](#mem-9tb), [12 TiB](#mem-12tb), [16 TiB](#mem-16tb), [18 TiB](#mem-18tb), [24 TiB](#mem-24tb), [32 TiB](#mem-32tb) 

### 3 TiB Memory Systems
<a name="mem-3tb"></a>

Applicable Instance Types: **r8i.96xlarge**, **x2iedn.24xlarge**, , **x8i.48xlarge**, **u-3tb1.56xlarge** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  3,700  |  8,600  |  1,125  |  gp3/io2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sap/latest/sap-hana/hana-storage-config-reference-layout.html)  |  | 
|  HANA Log  |  500  |  3,000  |  300  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  1,024  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

### 4 TiB Memory Systems
<a name="mem-4tb"></a>

Applicable Instance Types: **x2iedn.32xlarge**, **x1e.32xlarge**, **x8i.64xlarge** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  4,900  |  9,000  |  1,250  |  gp3/io2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sap/latest/sap-hana/hana-storage-config-reference-layout.html)  |  | 
|  HANA Log  |  500  |  3,000  |  300  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  1,024  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

### 6 TiB Memory Systems
<a name="mem-6tb"></a>

Applicable Instance Types: , **x8i.96xlarge**, **u-6tb1.112xlarge**, **u-6tb1.56xlarge**, **u-6tb1.metal**, **u7i-6tb.112xlarge** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  7,300  |  10,000  |  1,625  |  gp3/io2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sap/latest/sap-hana/hana-storage-config-reference-layout.html)  |  | 
|  HANA Log  |  500  |  3,000  |  300  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  1,024  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

### 8 TiB Memory Systems
<a name="mem-8tb"></a>

Applicable Instance Types: **u7i-8tb.112xlarge** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  9,800  |  10,900  |  2,000  |  gp3/io2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sap/latest/sap-hana/hana-storage-config-reference-layout.html)  |  | 
|  HANA Log  |  500  |  3,000  |  300  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  1,024  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

### 9 TiB Memory Systems
<a name="mem-9tb"></a>

Applicable Instance Types: **u-9tb1.112xlarge**, **u-9tb1.metal** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  11,100  |  11,300  |  2,000  |  gp3/io2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sap/latest/sap-hana/hana-storage-config-reference-layout.html)  |  | 
|  HANA Log  |  500  |  3,000  |  300  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  1,024  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

### 12 TiB Memory Systems
<a name="mem-12tb"></a>

Applicable Instance Types: **u-12tb1.112xlarge**, **u-12tb1.metal**, **u7i-12tb.224xlarge** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  14,700  |  12,700  |  2,000  |  gp3/io2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sap/latest/sap-hana/hana-storage-config-reference-layout.html)  |  | 
|  HANA Log  |  500  |  3,000  |  500  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  1,024  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

### 16 TiB Memory Systems
<a name="mem-16tb"></a>

Applicable Instance Types: **u7in-16tb.112xlarge**, **u7in-16tb.224xlarge** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  19,700  |  14,600  |  2,000  |  gp3/io2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sap/latest/sap-hana/hana-storage-config-reference-layout.html)  |  | 
|  HANA Log  |  500  |  3,000  |  500  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  1,024  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

### 18 TiB Memory Systems
<a name="mem-18tb"></a>

Applicable Instance Types: **u-18tb1.112xlarge**, **u-18tb1.metal** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  22,100  |  15,500  |  2,000  |  gp3/io2  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sap/latest/sap-hana/hana-storage-config-reference-layout.html)  |  | 
|  HANA Log  |  500  |  3,000  |  500  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  1,024  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

### 24 TiB Memory Systems
<a name="mem-24tb"></a>

Applicable Instance Types: **u7in-24tb.224xlarge**, **u-24tb1.metal** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  29,500  |  18,300  |  2,000  |  gp3/io2 (io2 recommended)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sap/latest/sap-hana/hana-storage-config-reference-layout.html)  |  Throughput target can be met with 2 stripes for gp3, 3 recommended to reduce volume size.  | 
|  HANA Log  |  500  |  3,000  |  500  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  1,024  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

### 32 TiB Memory Systems
<a name="mem-32tb"></a>

Applicable Instance Types: **u7inh-32tb.480xlarge** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  39,300  |  21,900  |  4,000  |  gp3/io2 (io2 recommended)  |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sap/latest/sap-hana/hana-storage-config-reference-layout.html)  |  | 
|  HANA Log  |  500  |  3,000  |  500  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  1,024  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

## Suitable for Non-Production Use
<a name="_suitable_for_non_production_use"></a>

While not SAP-certified, these configurations are suitable for small non-production environments where cost optimization is a priority. Storage targets listed represent minimum requirements and can be increased to improve performance or meet SAP storage KPIs.

Sample layouts are provided for the following memory configurations:

Memory sizes: [64 GiB](#mem-64), [128 GiB](#mem-128) 

### 64 GiB Memory Systems
<a name="mem-64"></a>

Applicable Instance Types: **r8i.2xlarge**, **r7i.2xlarge**, **r6i.2xlarge**, **r5.2xlarge**, **r5b.2xlarge**, **r4.2xlarge1 **, **r3.2xlarge1 ** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  100  |  3,000  |  125  |  gp3  |  Not required  |  | 
|  HANA Log  |  50  |  3,000  |  125  |  gp3  |  Not required  |  | 
|  HANA Shared  |  64  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

 1 Xen instance types. We suggest migrating to a Nitro instance type.

### 128 GiB Memory Systems
<a name="mem-128"></a>

Applicable Instance Types: **r8i.4xlarge**, **x2iedn.xlarge**, **r7i.4xlarge**, **r6i.4xlarge**, **r5.4xlarge**, **r5b.4xlarge**, **x1e.xlarge**, **r4.4xlarge1 **, **r3.4xlarge1 ** 

Suggested Storage Configuration:


| System Configuration | Target Size (GiB) | Target IOPS | Target Throughput (MB/s) | Target Volume Type | Stripe Configuration | Comments | 
| --- | --- | --- | --- | --- | --- | --- | 
|  Root/OS  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  SAP Binaries  |  50  |  3,000  |  125  |  gp3  |  |  | 
|  HANA Data  |  200  |  7,300  |  500  |  gp3/io2  |  Not Required  |  | 
|  HANA Log  |  100  |  3,000  |  300  |  gp3/io2  |  Not Required  |  | 
|  HANA Shared  |  128  |  3,000  |  125  |  gp3  |  |  For scale out, review formula or use EFS  | 
|  HANA Backup  |  -  |  -  |  -  |  st1/efs  |  |  Optional and Workload Dependent. Review [HANA Backup](hana-storage-config-ebs.md#hana_backup)   | 

 1 Xen instance types. We suggest migrating to a Nitro instance type.

# Deploy SAP HANA Workloads with Amazon EBS Volumes
<a name="deployment-steps-using-the-aws-management-console"></a>

This topic explains how to assign EBS Volumes when launching an Amazon EC2 Instance. Choose one of the following methods.

**Example**  

1. Log in to the console with appropriate permissions and ensure that you have the right Region selected.

1. Choose **Services**, and then choose **EC2** (under **Compute**).

1. Choose **Launch Instance**.

1. In Section **Application and OS Images (Amazon Machine Images)**:
   + Choose a recently used AMI or **My AMIs** to search for your BYOS or custom AMI ID.
   + Choose **Browse more AMIs** to search for more AMIs from AWS, Marketplace and the Community.

1. In Section **Choose an Instance Type** page, select the instance type that you identified when [planning the deployment](planning-the-deployment.md#compute) 

1. In Section **Key Pair (login)** . Select an existing key pair if you have one. Otherwise, create a new key pair.

1. In Section **Network Settings** 
   + Select the VPC ID and subnet for the network.
   + Turn off the **Auto-assign Public IP** option.
   + Select **Security Groups** 
     + Choose **Select an existing security group** and select a security group, if you have one, to attach to your instance. Otherwise, choose **Create a new security group** and configure the **Type**, **Protocol**, **Port Range**, and the **Source IP address** from where you want to allow traffic to your SAP HANA instance. Refer to [Security groups in AWS Launch Wizard for SAP](https://docs.aws.amazon.com/launchwizard/latest/userguide/launch-wizard-sap-security-groups.html) for a list of ports that we recommend. You can change the port as needed to meet your security requirements.

1. In Section **Configure Storage** 
   + Choose **Advanced** to see extended details, and **Add new volume** to provision volumes for SAP binaries, and SAP HANA data, log, shared and optionally backup. Ensure that you follow the guidance for size, IOPS and Throughput in [Calculate Requirements](hana-storage-config-ebs.md) or [Storage Reference](hana-storage-config-reference-layout.md).
   + If you are planning to deploy scale-out workloads, you can optionally include EFS or FSX **filesystems** for SAP HANA shared and backup volumes.  
![\[Image of EC2 console showing the storage configuration\]](http://docs.aws.amazon.com/sap/latest/sap-hana/images/std-sap-hana-storage-configuration.png)

      **Figure 1: SAP HANA Storage Configuration with the console** 

1. In Section **Advanced Details**, review and modify the options to suit your workload.

1. Select **Launch Instance** 

1. Your instance should be launching now with the selected configuration. After the instance is launched, you can proceed with the operating system and storage configuration steps.

1.  **Prepare Storage Configuration for SAP HANA** 

   Use the editor of your choice to create a .json file that contains block device mapping details similar to the following example, and save your file in a temporary directory. The example shows the block device mapping details for the x2iedn.24xlarge instance with gp3 volumes for HANA data and log. Change the details depending on instance and storage type that you intend to use for your deployment.

   ```
   [
   {"DeviceName":"/dev/sda1","Ebs":{"VolumeSize":50,"VolumeType":"gp3","Iops":3000,"Throughput":125,"Encrypted":true,"DeleteOnTermination":true}},
   {"DeviceName":"/dev/sdb","Ebs":{"VolumeSize":50,"VolumeType":"gp3","Iops":3000,"Throughput":125,"Encrypted":true,"DeleteOnTermination":true}},
   {"DeviceName":"/dev/sdc","Ebs":{"VolumeSize":2300,"VolumeType":"gp3","Iops":3600,"Throughput":625,"Encrypted":true,"DeleteOnTermination":true}},
   {"DeviceName":"/dev/sdd","Ebs":{"VolumeSize":2300,"VolumeType":"gp3","Iops":3600,"Throughput":625,"Encrypted":true,"DeleteOnTermination":true}},
   {"DeviceName":"/dev/sde","Ebs":{"VolumeSize":500,"VolumeType":"gp3","Iops":3000,"Throughput":300,"Encrypted":true,"DeleteOnTermination":true}},
   {"DeviceName":"/dev/sdf","Ebs":{"VolumeSize":1024,"VolumeType":"gp3","Iops":3000,"Throughput":125,"Encrypted":true,"DeleteOnTermination":true}}
   ]
   ```

    **Notes** 
   + The initial Device name for root should match the AMI you are trying to assign it to. Query this with

     ```
     $ aws ec2 describe-images --image-ids ami-0123456789abcdef0 --query 'Images[].RootDeviceName' --output text
     ```
   + You may choose to set `DeleteOnTermination` flag to false so that Amazon EBS volumes are not deleted when you terminate your Amazon EC2 instance. This helps preserve your data from accidental termination of your Amazon EC2 instance. When you terminate the instance, you need to manually delete the Amazon EBS volumes that are associated with the terminated instance to stop incurring storage cost.
   + If you plan to deploy scale-out workloads, you can use Amazon EFS and Network File System (NFS) to mount the SAP HANA shared and backup volumes to your coordinator and subordinate nodes after deployment.

1.  **Launch the Amazon EC2 instance** 

   Use AWS CLI to launch the Amazon EC2 instance for SAP HANA, including Amazon EBS storage, in the VPC in your target AWS Region by using the information you gathered during the preparation steps; for example:

   ```
   aws ec2 run-instances \
     --image-id ami-0123456789abcdef0 \
     --instance-type x2iedn.24xlarge \
     --count 1 \
     --region us-west-2 \
     --key-name my_key \
     --security-group-ids sg-0123456789abcdef0 \
     --subnet-id subnet-0123456789abcdef0 \
     --block-device-mappings file:///tmp/ebs_hana.json \
     --tag-specifications \
         'ResourceType=instance,Tags=[{Key=Name,Value=PRD-HANA01},{Key=Environment,Value=Production},{Key=SID,Value=PRD},{Key=ApplicationComponent,Value=HANA}]' \
         'ResourceType=volume,Tags=[{Key=Environment,Value=Production},{Key=SID,Value=PRD}]' \
     --ebs-optimized \
     --metadata-options "HttpTokens=required,HttpEndpoint=enabled"
   ```

    **Notes** 
   + This is a sample command only, with a focus on block-device-mappings. Review instance requirements seperately. It can be helpful to explore the options in the Console and then generate and adjust the code to replicate the setup for future deployments.
   +  `iam-instance-profile` and `user-data` flags can be used to ensure connectivity via Systems Manager.

# Configure SAP HANA Filesystems
<a name="configure-storage-for-sap-hana"></a>

## Overview
<a name="_overview"></a>

This guide explains how to configure Amazon EBS storage for SAP HANA on Amazon EC2. It covers volume identification, filesystem creation, and LVM configuration where required.

**Note**  
This guide uses NVMe device names (e.g., /dev/nvme1n1) which are standard on Nitro-based instances. On non-Nitro instances, devices will use different naming (e.g., /dev/sdb). Adjust commands according to your device names.

Before beginning configuration, verify that you have the following:
+ An EC2 instance with appropriate EBS volumes attached
+ Root or administrative access to the instance

## Identify Volumes
<a name="_identify_volumes"></a>

Identify block devices, their sizes, and associated volume IDs in order to assign them to the appropriate filesystems.

1.  **Run lsblk to view the associations** 

   As root, on the host, run the following:

   ```
   # lsblk -o NAME,SIZE,TYPE,FSTYPE,LABEL,PATH,SERIAL | sed 's/vol0/vol-0/g'
   ```

    *Example* 

   ```
   NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS FSTYPE LABEL PATH           SERIAL
   nvme1n1     259:0    0  2.2T  0 disk                          /dev/nvme1n1   vol-0abc123def456789a
   nvme0n1     259:1    0   50G  0 disk                          /dev/nvme0n1   vol-0xyz987uvw654321b
   ├─nvme0n1p1 259:5    0    2M  0 part                          /dev/nvme0n1p1
   ├─nvme0n1p2 259:6    0   20M  0 part /boot/efi   vfat   EFI   /dev/nvme0n1p2
   └─nvme0n1p3 259:7    0   50G  0 part /           xfs    ROOT  /dev/nvme0n1p3
   nvme4n1     259:2    0    1T  0 disk                          /dev/nvme4n1   vol-0pqr456mno789123c
   nvme2n1     259:3    0  2.2T  0 disk                          /dev/nvme2n1   vol-0jkl789ghi123456d
   nvme3n1     259:4    0  500G  0 disk                          /dev/nvme3n1   vol-0def456abc789123e
   ```

1.  **Record the Volume Associations** 

   Document the volume requirements and assignments in a structured format. This table will help ensure the correct commands for setting up the volumes.    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/sap/latest/sap-hana/configure-storage-for-sap-hana.html)

1.  **Review or Assign Tags (optional)** 

   Tags help identify volumes in the AWS console and API commands, particularly useful during maintenance, volume extensions, or backup/restore operations. Review existing, or add new tags using the following command or the AWS Console.

    *Example* 

   ```
   $ aws ec2 create-tags --resources vol-0abc123def456789a --tags Key=Name,Value="PRD - Hana Data Volume 1 of 2"
   ```

   Repeat for all volumes.

## Create Filesystems
<a name="_create_filesystems"></a>

Create Filesystems according to whether or not striping has been identifed as a requirement

1.  **Configure Single Volumes** 

   When performance requirements can be met using a single volume (including capacity for growth), create XFS filesystems directly on the device.

    *Example* 

   ```
   # Create XFS filesystem with label for HANA Shared
   mkfs.xfs -f /dev/nvme4n1 -L HANA_SHARED
   
   # Create XFS filesystem with label for HANA Log
   mkfs.xfs -f /dev/nvme3n1 -L HANA_LOG
   ```
**Tip**  
Labels provide consistent device identification across instance restarts. You can add or change a label on an existing XFS filesystem using `xfs_admin -L LABEL_NAME /dev/device_name`. Always use labels in /etc/fstab by referencing `/dev/disk/by-label/LABEL_NAME`.

1.  **Configure Striped Volumes** 

   Logical Volume Management (LVM) manages storage in three layers: Physical Volumes (created with pvcreate) are the actual disks, Volume Groups (created with vgcreate) combine these disks into storage pools, and Logical Volumes (created with lvcreate) are virtual partitions that can span multiple disks for features like striping.

    *Example* 

   ```
   # Create physical volumes
   pvcreate /dev/nvme1n1 /dev/nvme2n1
   
   # Create volume group
   vgcreate vg_hana_data /dev/nvme1n1 /dev/nvme2n1
   
   # Create striped logical volume
   lvcreate -i 2 -I 256 -l 100%VG -n lv_hana_data vg_hana_data
   
   # Create XFS filesystem with label for HANA data
   mkfs.xfs -L HANA_DATA /dev/vg_hana_data/lv_hana_data
   ```
**Important**  
Use 256 KB stripe size (`-I 256`) for data volumes
Use 64 KB stripe size (`-I 64`) for log volumes
The `-i` parameter should match the number of physical volumes. In the example we have 2 volumes.

## Create Mount Points
<a name="_create_mount_points"></a>

1.  **Create filesystems and modify permissions** 

   ```
   # mkdir -p /hana/data /hana/log /hana/shared
   # chown <sid>adm:sapsys /hana/data /hana/log /hana/shared
   # chmod 750 /hana/data /hana/log /hana/shared
   ```

1.  **Configure fstab** 

   The fstab file controls how Linux filesystem partitions, remote filesystems, and block devices are mounted into the filesystem.

   Add the following entries to `/etc/fstab`:

    *Example* 

   ```
   # SAP HANA Storage Configuration
   /dev/disk/by-label/HANA_DATA       /hana/data       xfs    noatime,nodiratime,logbsize=256k       0  0
   /dev/disk/by-label/HANA_LOG        /hana/log        xfs    noatime,nodiratime,logbsize=256k       0  0
   /dev/disk/by-label/HANA_SHARED     /hana/shared     xfs    noatime,nodiratime,logbsize=256k       0  0
   ```

## Mount and Verify
<a name="_mount_and_verify"></a>

1.  **Mount all filesytems** 

   ```
   # mount -a
   ```

1.  **Verify your final configuration** 

   ```
   # lsblk -o NAME,SIZE,TYPE,FSTYPE,LABEL,PATH,SERIAL | sed 's/vol0/vol-0/g'
   ```

    *Example* 

   ```
   NAME                         SIZE TYPE FSTYPE      LABEL       PATH                                  SERIAL
   nvme0n1                       50G disk                         /dev/nvme0n1                          vol-0xyz987uvw654321b
   ├─nvme0n1p1                    2M part                         /dev/nvme0n1p1
   ├─nvme0n1p2                   20M part vfat        EFI         /dev/nvme0n1p2
   └─nvme0n1p3                   50G part xfs         ROOT        /dev/nvme0n1p3
   nvme1n1                      2.2T disk LVM2_member             /dev/nvme1n1                          vol-0abc123def456789a
   └─vg_hana_data-lv_hana_data  4.5T lvm  xfs         HANA_DATA   /dev/mapper/vg_hana_data-lv_hana_data
   nvme2n1                      2.2T disk LVM2_member             /dev/nvme2n1                          vol-0jkl789ghi123456d
   └─vg_hana_data-lv_hana_data  4.5T lvm  xfs         HANA_DATA   /dev/mapper/vg_hana_data-lv_hana_data
   nvme3n1                      500G disk xfs         HANA_LOG    /dev/nvme3n1                          vol-0def456abc789123e
   nvme4n1                        1T disk xfs         HANA_SHARED /dev/nvme4n1                          vol-0pqr456mno789123c
   ```

1.  **Restart System** 

   Verify all mount points are correct using `mount` and `df -h` before rebooting, as incorrect /etc/fstab entries can prevent successful system boot. Once confirmed, restart the operating system to ensure filesystem persistence before HANA installation.

# Architecture
<a name="architecture-ebs"></a>

The following architecture diagrams show scale-up and scale-out environments for SAP HANA workloads using Amazon EBS volumes.

**Topics**
+ [

## Scale-up environment
](#ebs-scale-up)
+ [

## Scale-out environment
](#ebs-scale-out)

## Scale-up environment
<a name="ebs-scale-up"></a>

The following architecture diagram shows a scale-up environment for SAP HANA workloads using Amazon EBS volumes.

![\[Configuration for scale-up SAP HANA workloads.\]](http://docs.aws.amazon.com/sap/latest/sap-hana/images/std-sap-hana-scale-up-diagram.png)


## Scale-out environment
<a name="ebs-scale-out"></a>

The following architecture diagram shows a scale-out environment for SAP HANA workloads using Amazon EBS volumes.

![\[configuration for scale-out SAP HANA workloads.\]](http://docs.aws.amazon.com/sap/latest/sap-hana/images/std-sap-hana-scale-out-diagram.png)
