<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[simi.says - Medium]]></title>
        <description><![CDATA[Thoughts on building things. - Medium]]></description>
        <link>https://medium.com/simi-says?source=rss----a9169daebdc4---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>simi.says - Medium</title>
            <link>https://medium.com/simi-says?source=rss----a9169daebdc4---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 22:58:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/simi-says" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Docker, AWS ECS optimized instances and Disk space]]></title>
            <link>https://medium.com/simi-says/docker-aws-ecs-optimized-instances-and-disk-space-9cbc42cd433c?source=rss----a9169daebdc4---4</link>
            <guid isPermaLink="false">https://medium.com/p/9cbc42cd433c</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[ces]]></category>
            <dc:creator><![CDATA[Andrei Simion]]></dc:creator>
            <pubDate>Fri, 14 Apr 2017 13:19:17 GMT</pubDate>
            <atom:updated>2017-04-24T07:43:22.211Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-A6_VSKiS27O9ptC2hWZMg.png" /><figcaption>that time when prod goes down</figcaption></figure><p>On a recent project we started working with Docker, AWS ECS (container orchestration from AWS) and a few other buzzwords. Needless to say that we ran into several interesting issues.</p><p>One such issue only showed up in production recently: Docker will not release disk space to the host instance when is de-allocated (read rm -f) from within the container.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*g33I-cXS_bb5L4jdhrpSsQ.gif" /><figcaption>You see you see!?!</figcaption></figure><p>In order to fix this you either stop and remove the container (which is not an option in most cases) or use fstrim in a cron job on the host:</p><blockquote>docker ps -qa | xargs docker inspect --format=’{{ .State.Pid }}’ | xargs -IZ fstrim /proc/Z/root/</blockquote><p>This is a docker issue rather than an AWS one. It might have been fixed in newer versions of Docker but until AWS upgrades their ECS Optimised AMIs (we are using the latest one which at the moment is <strong>amzn-ami-2016.09.g</strong>) the workaround above should suffice.</p><p>Another thing to note is that <em>df -h</em> on both the host and container will show plenty of disk space left even though in reality your docker containers might be out of space. This is because the ECS optimized AMI has a separate LVM partition for the docker volumes and associated metadata. The side effect of this is that your EC2 monitoring tools will not give you an alert for low disk space.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9cbc42cd433c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/simi-says/docker-aws-ecs-optimized-instances-and-disk-space-9cbc42cd433c">Docker, AWS ECS optimized instances and Disk space</a> was originally published in <a href="https://medium.com/simi-says">simi.says</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>