I have an EBS volume that displays a state of "in-use - optimizing(%)". What does this mean? What are the optimizations that AWS is performing? This is on a 300gb encrypted gp2 volume attached to a Windows Server 2012 R2 EC2 instance.
3 Answers
The in-use - optimizing
state relates to EBS volume resizing.
in-use
indicates that this volume is attached to an EC2 instance.optimizing
is the volume's modification state.
According to the AWS documentation on volume modifications:
An EBS volume being modified goes through a sequence of states. After you issue a
ModifyVolume
directive, whether from the console, CLI, API, or SDK, the volume enters first theModifying
state, then theOptimizing
state, and finally theComplete
state....
While the volume is in the optimizing state, your volume performance is in between the source and target configuration specifications. Transitional volume performance will be no less than the source volume performance. If you are downgrading IOPS, transitional volume performance is no less than the target volume performance.
And finally, from the introductory blog post for Volume Modifications:
The volume’s state reflects the progress of the operation (modifying, optimizing, or complete):

- 1
- 1

- 2,265
- 1
- 25
- 23
-
1it's showing in-use - optimizing (64%) for me I modified from 50Gb to 80GG , now want to make it 100Gb but not able to due to in-use - optimizing (64%) so how much time will it require to be 100% , after that will I be able to modify to 100Gb or not ? – Ashish Karpe Sep 07 '17 at 08:29
-
12I personally noticed that the volume was available for "extending" in windows before the EBS volume was done optimizing. AWS also states you can do it while still optimizing: https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/recognize-expanded-volume-windows.html – Jonathan Grubb Nov 02 '17 at 18:49
-
2Will detaching the volume speed things up? Anything I can do to hurry this along? – N-ate Sep 05 '19 at 20:10
-
For linux folks here, you can resize the filesystem to the full size while it's optimizing. However you need to run `sudo e2fsck -f /dev/yourdevice` before `sudo resize2fs /dev/yourdevice`. `e2fsck` doesn't take very long (about 1 minute for 70GB) – Samuel Prevost Oct 25 '20 at 08:10
-
1@SamuelPrevost can you elaborate on why `e2fsck` is necessary? Is it only necessary if you are resizing _offline_? Because just running `sudo resize2fs /dev/[device]` has always worked for me for _online_ resizing when `/dev/[device]` is mounted https://unix.stackexchange.com/questions/446934/resize2fs-keeps-asking-me-to-run-e2fsck-f – Nick Meyer Feb 25 '22 at 17:42
-
@NickMeyer `e2fsck` checks the integrity of the `ext4` filesystem. It sounded like a good thing to do before manipulating the size of the file system. `resize2fs`'s doc says that [as of Linux 2.6, the kernel support online resizing for `ext3` and `ext4`](https://linux.die.net/man/8/resize2fs). When offline, it's not necessary because there's no operations in cache anyway. I just don't want to chance it so I run the fsck just in case. – Samuel Prevost Mar 02 '22 at 11:17
-
1Late to the party, but I asked the same question and ended up here. However, I'm not sure any of this actually answers the question 'What are the optimizations that AWS is performing?' - can anyone explain what is actually happening to to disk whilst the 'optimization' is going on? – Elliveny Jul 14 '22 at 09:11
If you modified the volume, most likely it will show like that. The performance will be degraded during this time since AWS EBS server needs to sync data.

- 61
- 4
-
IN Free trial, for my AWS EC2 instance modified and I could see volume as "in-use - completed (100%)" but still C-Drive space is 30G only. why? – Pand005 Aug 02 '18 at 19:31
-
5@Pand005 after you change volume size and wait to complete the optimizing you need to EXTEND your partition and filesystem, docs here http://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/recognize-expanded-volume-windows.html – Newton Pasqualini Filho Aug 20 '18 at 12:40
-
EBS Volumes are in this state after modifying the volume (e.g. resizing). It can take some time (can be stuck at 99% for hours) but eventually will go away.

- 1,821
- 18
- 23