Amazon EBS volume constraints - Amazon EBS

Amazon EBS volume constraints

The size of an Amazon EBS volume is constrained by the physics and arithmetic of block data storage, as well as by the implementation decisions of operating system (OS) and file system designers. AWS imposes additional limits on volume size to safeguard the reliability of its services.

The following sections describe the most important factors that limit the usable size of an EBS volume and offer recommendations for configuring your EBS volumes.

Storage capacity

The following table summarizes the theoretical and implemented storage capacities for the most commonly used file systems on Amazon EBS, assuming a 4,096 byte block size.

Partitioning scheme Max addressable blocks Theoretical max size (blocks × block size) Ext4 implemented max size* XFS implemented max size** NTFS implemented max size Max supported by EBS
MBR 232 2 TiB 2 TiB 2 TiB 2 TiB 2 TiB
GPT 264

64 ZiB

1 EiB =

10242 TiB

(50 TiB certified on RHEL7)

500 TiB

(certified on RHEL7)

256 TiB 64 TiB †

* https://ext4.wiki.kernel.org/index.php/Ext4_Howto and https://access.redhat.com/solutions/1532

** https://access.redhat.com/solutions/1532

io2 Block Express volumes support up to 64 TiB for GPT partitions. For more information, see Provisioned IOPS SSD (io2) Block Express volumes.

Service limitations

Amazon EBS abstracts the massively distributed storage of a data center into virtual hard disk drives. To an operating system installed on an EC2 instance, an attached EBS volume appears to be a physical hard disk drive containing 512-byte disk sectors. The OS manages the allocation of data blocks (or clusters) onto those virtual sectors through its storage management utilities. The allocation is in conformity with a volume partitioning scheme, such as master boot record (MBR) or GUID partition table (GPT), and within the capabilities of the installed file system (ext4, NTFS, and so on).

EBS is not aware of the data contained in its virtual disk sectors; it only ensures the integrity of the sectors. This means that AWS actions and OS actions are independent of each other. When you are selecting a volume size, be aware of the capabilities and limits of both, as in the following cases:

  • EBS currently supports a maximum volume size of 64 TiB. This means that you can create an EBS volume as large as 64 TiB, but whether the OS recognizes all of that capacity depends on its own design characteristics and on how the volume is partitioned.

  • Boot volumes must use either the MBR or GPT partitioning scheme. The AMI you launch an instance from determines the boot mode and subsequently the partition scheme used for the boot volume.

    With MBR, boot volumes are limited to 2 TiB in size.

    With GPT, boot volumes can be up to 64 TiB in size when used with GRUB2 (Linux) or UEFI boot mode (Windows).

    For more information, see Make an Amazon EBS volume available for use.

  • Non-boot volumes that are 2 TiB (2048 GiB) or larger must use a GPT partition table to access the entire volume. .

Partitioning schemes

Among other impacts, the partitioning scheme determines how many logical data blocks can be uniquely addressed in a single volume. For more information, see Data block sizes. The common partitioning schemes in use are Master Boot Record (MBR) and GUID partition table (GPT). The important differences between these schemes can be summarized as follows.

MBR

MBR uses a 32-bit data structure to store block addresses. This means that each data block is mapped with one of 232 possible integers. The maximum addressable size of a volume is given by the following formula:

232 × Block size

The block size for MBR volumes is conventionally limited to 512 bytes. Therefore:

232 × 512 bytes = 2 TiB

Engineering workarounds to increase this 2-TiB limit for MBR volumes have not met with widespread industry adoption. Consequently, Linux and Windows never detect an MBR volume as being larger than 2 TiB even if AWS shows its size to be larger.

GPT

GPT uses a 64-bit data structure to store block addresses. This means that each data block is mapped with one of 264 possible integers. The maximum addressable size of a volume is given by the following formula:

264 × Block size

The block size for GPT volumes is commonly 4,096 bytes. Therefore:

264 × 4,096 bytes
   = 264 × 212 bytes
   = 270 × 26 bytes
   = 64 ZiB

Real-world computer systems don't support anything close to this theoretical maximum. Implemented file-system size is currently limited to 50 TiB for ext4 and 256 TiB for NTFS.

Data block sizes

Data storage on a modern hard drive is managed through logical block addressing, an abstraction layer that allows the operating system to read and write data in logical blocks without knowing much about the underlying hardware. The operating system relies on the storage device to map the blocks to its physical sectors, and reads and writes data to disk using data blocks that are a multiple of the sector size.

Amazon EBS advertises either 512-byte or 4,096-byte (4 KiB) physical sectors to the operating system. Amazon EBS advertises 4-KiB physical sectors only if the Amazon EC2 instance type, operating system, and the AWS NVMe driver supports it. If either the instance type, operating system, or AWS NVMe driver does not support 4-KiB physical sectors, Amazon EBS advertises 512-byte physical sectors instead.

Amazon EC2 instance type support

The following table shows the sector sizes that Amazon EBS advertises for the different Amazon EC2 instance types.

Advertised physical sector size Instance types
512 byte All Xen-based instances and the following Nitro-based instances:
  • General purpose: A1 | M5 | M5a | M5ad | M5d | M5dn | M5n | M5zn | M6g | M6gd | Mac1 | Mac2 | T3 | T3a | T4g

  • Compute optimized: C5 | C5a | C5ad | C5d | C5n | C6g | C6gd

  • Memory optimized: R5 | R5a | R5ad | R5d | R5dn | R5n | R6g | R6gd | U-12tb1 | U-18tb1 | U-24tb1 | U-3tb1 | U-6tb1 | U-9tb1 | X2gd | X2iezn | Z1d

  • Storage optimized: D3 | D3en | I3en

  • Accelerated computing: Dl1 | G4ad | G4dn | G5 | G5g | Inf1 | P3dn | P4d | P4de | VT1

4 KiB All other Nitro-based instances
Operating system support

The following table shows the sector sizes that Amazon EBS advertises for some common operating systems.

Note

This is not an exhaustive list. We recommend that you verify the physical sector size advertised by Amazon EBS in your operating system.

Advertised physical sector size Operating systems
512 byte
  • Amazon Linux with kernel version 4.14 and earlier

  • RHEL 7.9 and earlier

  • Ubuntu 20.04 and earlier

  • Windows 7 and earlier

  • Windows Server 2008 and earlier

4 KiB
  • Amazon Linux with kernel version 5.3 and later

  • RHEL8.8 and later

  • Ubuntu 22.04 and later

  • Windows 8 and later

  • Windows Server 2012 and later

AWS NVMe driver support

Amazon EBS advertises 4 KiB physical sectors with AWS NVMe driver version 1.5.1 and later. Always ensure that you are using the latest version of the AWS NVMe driver.

Non-default block sizes

The industry default size for logical data blocks is currently 4 KiB. Because certain workloads benefit from a smaller or larger block size, file systems support non-default block sizes that can be specified during formatting. Scenarios in which non-default block sizes should be used (such as optimizations) are outside the scope of this documentation, but the choice of block size has consequences for the storage capacity of the volume. The following table shows theoretical storage capacity as a function of block size. However, keep in mind that the EBS-imposed limit on volume size (64 TiB for io2 Block Express) is currently equal to the maximum size enabled by 16-KiB data blocks.

Block size Max volume size
4 KiB (default) 16 TiB
8 KiB 32 TiB
16 KiB 64 TiB
32 KiB 128 TiB
64 KiB (maximum) 256 TiB