Amazon Elastic Compute Cloud
User Guide for Linux Instances

Considerations for Modifying EBS Volumes

Be aware of the following limitations and special cases affecting volume modification:

  • In some cases, your volume needs to be detached or the instance stopped for modification to proceed. If you encounter an error message while attempting to apply a modification to an EBS volume, or if you are modifying an EBS volume attached to a previous-generation instance type, take one of the following steps:

  • The previous generation Magnetic volume type is not supported by the volume modification methods described in this topic. However, you can take a snapshot of a Magnetic volume and restore it to a differently configured EBS volume.

  • Decreasing the size of an EBS volume is not supported. However, you can create a smaller volume and then migrate your data to it using an application-level tool such as rsync.

  • After modifying a volume, you need to wait at least six hours before applying further modifications to the same volume.

  • Linux AMIs require a GUID partition table (GPT) and GRUB 2 for boot volumes 2 TiB (2,048 GiB) or larger. Many Linux AMIs today still use the MBR partitioning scheme, which only supports boot-volume sizes up to 2,047 GiB. If your instance does not boot with a boot volume that is 2 TiB or larger, the AMI you are using may be limited to a 2,047 GiB boot volume size. Non-boot volumes do not have this limitation on Linux instances.

    Before attempting to resize a boot volume beyond 2 TiB, you can determine whether the volume is using MBR or GPT partitioning by running the following command on your instance:

    [ec2-user ~]$ sudo gdisk -l /dev/xvda

    An Amazon Linux instance with GPT partitioning returns the following information:

    GPT fdisk (gdisk) version 0.8.10
    Partition table scan:
      MBR: protective
      BSD: not present
      APM: not present
      GPT: present
    Found valid GPT with protective MBR; using GPT.

    A SUSE instance with MBR partitioning returns the following information:

    GPT fdisk (gdisk) version 0.8.8
    Partition table scan:
      MBR: MBR only
      BSD: not present
      APM: not present
      GPT: not present
  • Volumes that were attached to current generation instances before Nov. 1, 2016 require one of the following actions to initialize the modification support described in this topic:

    • Stop and restart the instance.


      When you stop an instance, the data on any instance store volumes is erased. Therefore, if you have any data on instance store volumes that you want to keep, be sure to back it up to persistent storage.

    • Detach and re-attach the volume.

    This is a one-time requirement.

    To determine when your volume was created, navigate to the volume details page in the Amazon EC2 console and view the Created field. To display the volume's most recent attachment time, which may be more recent than the creation time, use the AWS CLI. The following command issues a query for volumes that were most recently attached before the cutoff date:

    aws ec2 describe-volumes --region us-east-1 --query "Volumes[?Attachments[?AttachTime<='2016-11-01']].{ID:VolumeId}" --output text

    The output is a text list of IDs for volumes that need attention:

  • Current generation m3.medium instances fully support volume modification. However, some m3.large, m3.xlarge, and m3.2xlarge instances may not support all volume modification features. If you encounter an error, follow the procedures for previous generation instance types in Appendix: Starting and Stopping an Instance to Modify an EBS Volume.