-
Notifications
You must be signed in to change notification settings - Fork 60
EBS volumes not getting deleted #30
Comments
Check what version you are running. The following was added to ensure volumes were deleted when an instance was terminated: amazon-ebs-autoscale/bin/create-ebs-volume Lines 342 to 345 in 4ada279
|
@likku123: Did you ever find a solution to this issue? I'm experiencing the same thing. Out of curiosity, were you using spot instances? @wleepang: Thanks for pointing out the Based on this, the following scenario seems feasible to me: the script initiates volume creation, but script execution is interrupted for some reason, resulting in an EBS volume without I realize this might appear unlikely, but I ended up with over 700 unattached volumes in my account over the course of two months. Hence, there might be certain conditions that increase the risk of orphaned volumes. As you can see in the Cost Explorer plot below, the ongoing EBS cost (proportional to the number of unattached volumes) jumps at specific points. For context, I'm using My current hypothesis is that spot termination causes the premature termination of the @wleepang: Does my logic seem sound to you? Can you think of other possible causes? |
@BrunoGrandePhD - That is a probable scenario. Attaching volumes and rebalancing the filesystem can take a up to a minute to complete. A spot termination should send a signal to the EC2 instance giving it about 2min to handle things gracefully. However, there is no functionality in EBS autoscale to specifically monitor for these signals. |
I have run across this situation as well. At times of heavy load, I came across thousands of orphaned volumes (costing upwards of 300$/d.) I have switched from creating an instance with a device for ebs-autoscale to start with to having ebs-autoscale create the initial device. All of my orphan volumes come from hitting API limits. I see this in the logs:
which then corresponds to:
What are your suggestions on putting a better retry and backoff mechanism in here? |
We occasionally see the same issue of lingering volumes. I'm wondering if you can either add the retry around the attach-volume and modify-instance-attribute, like it's used around eg the create-volume call. |
I have tried using EBS autoscale for my use case and it's working like a charm. One thing I have noticed is when ever EBS volume is created for my instance (to use scratch space)
sh /opt/amazon-ebs-autoscale/install.sh -m /var/lib/docker -d /dev/sdc -s 50 2>&1 > /var/log/ebs-autoscale-install.log
What is have noticed is this EBS volume is not getting deleted along with the termination of the instance and it's getting pile up.
Any body faced this issue before? Please help me in giving some pointers to overcome this.
The text was updated successfully, but these errors were encountered: