Request Amazon EBS volume modifications - Amazon EBS

Request Amazon EBS volume modifications

With Elastic Volumes, you can dynamically increase the size, increase or decrease the performance, and change the volume type of your Amazon EBS volumes without detaching them.

Use the following process when modifying a volume:

  1. (Optional) Before modifying a volume that contains valuable data, it is a best practice to create a snapshot of the volume in case you need to roll back your changes. For more information, see Create Amazon EBS snapshots.

  2. Request the volume modification.

  3. Monitor the progress of the volume modification. For more information, see Monitor the progress of Amazon EBS volume modifications.

  4. If the size of the volume was modified, extend the volume's file system to take advantage of the increased storage capacity. For more information, see Extend the file system after resizing an Amazon EBS volume.

Modify an EBS volume using Elastic Volumes

Considerations

Keep the following in mind when modifying volumes:

  • After modifying a volume, you must wait at least six hours and ensure that the volume is in the in-use or available state before you can modify the same volume.

  • Modifying an EBS volume can take from a few minutes to a few hours, depending on the configuration changes being applied. An EBS volume that is 1 TiB in size can typically take up to six hours to be modified. However, the same volume could take 24 hours or longer in other situations. The time it takes for volumes to be modified doesn't always scale linearly. Therefore, a larger volume might take less time, and a smaller volume might take more time.

  • You can't cancel a volume modification request after it has been submitted.

  • You can only increase volume size. You can't decrease volume size.

  • You can increase or decrease volume performance.

  • If you are not changing the volume type, then volume size and performance modifications must be within the limits of the current volume type. If you are changing the volume type, then volume size and performance modifications must be within the limits of the target volume type

  • If you change the volume type from gp2 to gp3, and you do not specify IOPS or throughput performance, Amazon EBS automatically provisions either equivalent performance to that of the source gp2 volume, or the baseline gp3 performance, whichever is higher.

    For example, if you modify a 500 GiB gp2 volume with 250 MiB/s throughput and 1500 IOPS to gp3 without specifying IOPS or throughput performance, Amazon EBS automatically provisions the gp3 volume with 3000 IOPS (baseline gp3 IOPS) and 250 MiB/s (to match the source gp2 volume throughput).

To modify an EBS volume, use one of the following methods.

Console
To modify an EBS volume using the console
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Volumes.

  3. Select the volume to modify and choose Actions, Modify volume.

  4. The Modify volume screen displays the volume ID and the volume's current configuration, including type, size, IOPS, and throughput. Set new configuration values as follows:

    • To modify the type, choose a value for Volume type.

    • To modify the size, enter a new value for Size.

    • (gp3, io1, and io2 only) To modify the IOPS, enter a new value for IOPS.

    • (gp3 only) To modify the throughput, enter a new value for Throughput.

  5. After you have finished changing the volume settings, choose Modify. When prompted for confirmation, choose Modify.

  6. Important

    If you've increased the size of your volume, then you must also extend the volume's partition to make use of the additional storage capacity. For more information, see Extend the file system after resizing an Amazon EBS volume.

  7. (Windows instances only) If you increase the size of an NVMe volume on an instance that does not have the AWS NVMe drivers, you must reboot the instance to enable Windows to see the new volume size. For more information about installing the AWS NVMe drivers, see AWS NVMe drivers for Windows instances.

AWS CLI
To modify an EBS volume using the AWS CLI

Use the modify-volume command to modify one or more configuration settings for a volume. For example, if you have a volume of type gp2 with a size of 100 GiB, the following command changes its configuration to a volume of type io1 with 10,000 IOPS and a size of 200 GiB.

aws ec2 modify-volume --volume-type io1 --iops 10000 --size 200 --volume-id vol-11111111111111111

The following is example output:

{ "VolumeModification": { "TargetSize": 200, "TargetVolumeType": "io1", "ModificationState": "modifying", "VolumeId": "vol-11111111111111111", "TargetIops": 10000, "StartTime": "2017-01-19T22:21:02.959Z", "Progress": 0, "OriginalVolumeType": "gp2", "OriginalIops": 300, "OriginalSize": 100 } }
Important

If you've increased the size of your volume, then you must also extend the volume's partition to make use of the additional storage capacity. For more information, see Extend the file system after resizing an Amazon EBS volume.

Modify an EBS volume if Elastic Volumes is not supported

If you are using a supported instance type, you can use Elastic Volumes to dynamically modify the size, performance, and volume type of your Amazon EBS volumes without detaching them.

If you cannot use Elastic Volumes but you need to modify the root (boot) volume, you must stop the instance, modify the volume, and then restart the instance.

After the instance has started, you can check the file system size to see if your instance recognizes the larger volume space. On Linux, use the df -h command to check the file system size.

[ec2-user ~]$ df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda1 7.9G 943M 6.9G 12% / tmpfs 1.9G 0 1.9G 0% /dev/shm

If the size does not reflect your newly expanded volume, you must extend the file system of your device so that your instance can use the new space. For more information, see Extend the file system after resizing an Amazon EBS volume.

With Windows instances, you might have to bring the volume online in order to use it. For more information, see Make an Amazon EBS volume available for use. You do not need to reformat the volume.