<?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"><channel><title><![CDATA[docker fills up /data, prevents code from running]]></title><description><![CDATA[<p dir="auto">I have been doing development with docker containers for some time on a particular voxl.  On occasion, I will save the docker image.  I believe this has, slowly, come to fill up the entire disk space on /data.</p>
<p dir="auto">If I check the disk utilization on <code>/data</code>, it shows that there is plenty of disk space:</p>
<pre><code>yocto:/data$ df -h /data
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda9        15G  8.1G  6.5G  56% /data
</code></pre>
<p dir="auto">However, if I try to create a single file in /data, the kernel tells me there is no disk space left:</p>
<pre><code>yocto:/data$ touch test.txt
touch: cannot touch 'test.txt': No space left on device
</code></pre>
<p dir="auto">These two commands present contradictory information about the state of the disk space remaining.  Since I cannot create a single file, I believe the latter command is the one that is reflective of reality.</p>
<p dir="auto">Before this occurred, I realized that I was running out of disk space and attempted to clean up old docker images.  I tried commands like <code>docker system prune</code> or <code>docker prune images</code> but the version of docker installed on the voxl does not support those commands.</p>
<p dir="auto">Instead, I used <code>docker image rm &lt;name&gt;</code> to remove everything but two images.  While that cleared up what was displayed by typing <code>docker images</code>, it did not appear to affect the disk utilization.</p>
<p dir="auto">It appears that docker preserves images and containers in <code>/data/overlay</code> (the directory names match the image_id's and container_id's in docker).  After running the above commands, the corresponding directories were not removed out of the /data/overlay directory.  I am afraid to remove them manually because of my (very limited) understanding of how docker works - that images are built on top of other images.  I worry that if I delete a particular directory, it could mess up the entire process that is used to build/start the latest docker image I am using.</p>
<p dir="auto">I currently believe that docker is somehow masking/hiding how much disk space is actually being used (or the kernel is unaware of disk space that docker is no longer using).  Either way, I don't know how to fix it.</p>
<p dir="auto">At this point, when I turn on the voxl, the docker-daemon will not stay running.   If I try to restart it with <code>systemctl restart docker-daemon</code>, it will die after about 15 seconds.  I am hoping to get it to run to I can save off my latest code.  After that, I'd be fine nuking <code>/data</code> and starting over.  (If there is a better way to go about this, I'm all ears!)</p>
<p dir="auto">For completeness, I can use <code>journalctl -u docker-daemon</code> to see the error messages:</p>
<pre><code>Oct 25 22:45:49 apq8096 systemd[1]: Started docker service for VOXL.
Oct 25 22:45:49 apq8096 docker-prepare.sh[4628]: preparing docker with docker-prepare.sh
Oct 25 22:45:49 apq8096 docker-prepare.sh[4628]: this may take a few seconds
Oct 25 22:45:50 apq8096 docker[4627]: time="2021-10-25T22:45:50.015279000Z" level=info msg="API listen on /var/run/docker.
sock"
Oct 25 22:45:50 apq8096 docker[4627]: time="2021-10-25T22:45:50.025349000Z" level=info msg="[graphdriver] using prior stor
age driver \"overlay\""
Oct 25 22:45:50 apq8096 docker[4627]: time="2021-10-25T22:45:50.143791000Z" level=info msg="Firewalld running: false"
Oct 25 22:45:50 apq8096 docker[4627]: time="2021-10-25T22:45:50.282820000Z" level=info msg="Default bridge (docker0) is as
signed with an IP address 172.17.0.1/16. Daemon option --bip can be used to set a preferred IP address"
Oct 25 22:45:50 apq8096 docker[4627]: time="2021-10-25T22:45:50.501537000Z" level=fatal msg="Error starting daemon: unable
 to open database file"
Oct 25 22:45:50 apq8096 systemd[1]: [[1;39mdocker-daemon.service: Main process exited, code=exited, status=1/FAILURE[[0m
Oct 25 22:46:06 apq8096 docker-prepare.sh[4628]: docker-prepare: failed to see cpuset appear after 15 seconds
Oct 25 22:46:06 apq8096 systemd[1]: [[1;39mdocker-daemon.service: Control process exited, code=exited status=1[[0m
Oct 25 22:46:06 apq8096 systemd[1]: [[1;39mdocker-daemon.service: Unit entered failed state.[[0m
Oct 25 22:46:06 apq8096 systemd[1]: [[1;39mdocker-daemon.service: Failed with result 'exit-code'.[[0m
</code></pre>
<p dir="auto">I looked in <code>/etc/systemd/system/docker-daemon.service</code> to learn that this is the command issued at startup: <code>/usr/bin/docker daemon -g /data</code>.  When I run that command, I get this error:</p>
<pre><code>yocto:/data$ /usr/bin/docker daemon -g /data
INFO[0000] API listen on /var/run/docker.sock           
INFO[0000] [graphdriver] using prior storage driver "overlay" 
INFO[0000] Firewalld running: false                     
INFO[0000] Default bridge (docker0) is assigned with an IP address 172.17.0.1/16. Daemon option --bip can be used to set a preferred IP address 
FATA[0000] Error starting daemon: unable to open database file 
</code></pre>
<p dir="auto">At some point earlier in my investigation (before I found the disk was full), I found someone in another modalai forum post with the same error message.  They used this one-liner to fix things:</p>
<pre><code>rm /data/network/files/local-kv.db
</code></pre>
<p dir="auto">I don't know if this is somehow related to the issue at hand.</p>
<p dir="auto">Any guidance on how to recover from this situation would be appreciated.<br />
Any guidance on the best way to manage <code>/data</code> and keep track of its real disk utilization would be helpful too!</p>
]]></description><link>https://forum.modalai.com/topic/516/docker-fills-up-data-prevents-code-from-running</link><generator>RSS for Node</generator><lastBuildDate>Wed, 07 Oct 2026 12:56:26 GMT</lastBuildDate><atom:link href="https://forum.modalai.com/topic/516.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 Oct 2021 22:58:02 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to docker fills up /data, prevents code from running on Thu, 28 Oct 2021 19:33:51 GMT]]></title><description><![CDATA[<p dir="auto">Good to know -- thanks, Eric!</p>
]]></description><link>https://forum.modalai.com/post/2451</link><guid isPermaLink="true">https://forum.modalai.com/post/2451</guid><dc:creator><![CDATA[jaredjohansen]]></dc:creator><pubDate>Thu, 28 Oct 2021 19:33:51 GMT</pubDate></item><item><title><![CDATA[Reply to docker fills up /data, prevents code from running on Thu, 28 Oct 2021 15:48:03 GMT]]></title><description><![CDATA[<p dir="auto">We use Yocto to build the system image. It is a fairly old version (Jethro) and that really limits what we can do as far as upgrades. When you try to upgrade a single component you usually have to upgrade it's dependencies, and then the dependencies of those dependencies, etc. So upgrading the Docker version is likely a very large task and not something we are planning to do any time soon.</p>
]]></description><link>https://forum.modalai.com/post/2446</link><guid isPermaLink="true">https://forum.modalai.com/post/2446</guid><dc:creator><![CDATA[Eric Katzfey]]></dc:creator><pubDate>Thu, 28 Oct 2021 15:48:03 GMT</pubDate></item><item><title><![CDATA[Reply to docker fills up /data, prevents code from running on Thu, 28 Oct 2021 14:28:47 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/eric-katzfey" aria-label="Profile: Eric-Katzfey">@<bdi>Eric-Katzfey</bdi></a>, let me ask a follow-up question.</p>
<p dir="auto">Currently, the docker version that is on the VOXL is v1.9.  This version doesn't support commands like <code>docker system prune</code> or <code>docker prune images</code>.</p>
<p dir="auto">Does ModalAI plan to update the docker version used on VOXL?</p>
<p dir="auto">Is it possible to upgrade it myself?  Or are there reasons why ModalAI is still using v1.9?  (A google search told me the latest version of docker is 20.10.)</p>
]]></description><link>https://forum.modalai.com/post/2444</link><guid isPermaLink="true">https://forum.modalai.com/post/2444</guid><dc:creator><![CDATA[jaredjohansen]]></dc:creator><pubDate>Thu, 28 Oct 2021 14:28:47 GMT</pubDate></item><item><title><![CDATA[Reply to docker fills up /data, prevents code from running on Tue, 26 Oct 2021 15:52:15 GMT]]></title><description><![CDATA[<p dir="auto">I found a partial solution.  I deleted some unused, empty directories in <code>/data</code> (e.g., <code>audio</code>).  This allowed me to create four free inodes.</p>
<p dir="auto">I was able to run <code>systemctl restart docker-daemon</code> and it worked for just a few seconds before crashing.  In that time, I was able to run <code>docker ps -a</code> and see the list of containers.  I tried to <code>docker start &lt;my_container&gt;</code> but the docker-daemon had already crashed.</p>
<p dir="auto">I went into <code>/data/containers</code> and deleted the <code>hello world</code> container.</p>
<p dir="auto">I re-ran <code>systemctl restart docker-daemon</code> and was able to run <code>docker rm &lt;container_name&gt;</code> for some of the unused containers.  Doing this a few times freed up ~200 inodes.  The docker-daemon was able to run without crashing.</p>
<p dir="auto">At that point, I was able to start <code>&lt;my_container&gt;</code>, and enter it.  I was able to push my code to my git repo.  This is what I set out to do.</p>
<p dir="auto">Now that I have my data saved, I could nuke the /<code>data/overlay</code> directory and reclaim most of my inodes.  I'd prefer if there was a better way to keep the <code>/data/overlay</code> directory clean (perhaps as a part of regular maintenance).  This would be preferable to nuking the entire direcotry from time to time as it gets filled up.  If there is a good way modalAI knows how to do this, please share!</p>
<p dir="auto">(And thanks for the pointer about the inodes.  I didn't consider that that was what was happening.)</p>
]]></description><link>https://forum.modalai.com/post/2415</link><guid isPermaLink="true">https://forum.modalai.com/post/2415</guid><dc:creator><![CDATA[jaredjohansen]]></dc:creator><pubDate>Tue, 26 Oct 2021 15:52:15 GMT</pubDate></item><item><title><![CDATA[Reply to docker fills up /data, prevents code from running on Tue, 26 Oct 2021 15:16:24 GMT]]></title><description><![CDATA[<p dir="auto">I believe I already had system image 3.3 installed on my VOXL.  (The number of inodes dedicated to <code>overlay</code> is around the 3M mark.)  Earlier, when I said I reflashed the base image with 3.3, it is was an effort to rule out the system image being corrupt.</p>
<p dir="auto">Is there some way to clean up all the inodes being used by docker via the command line?  (The docker-daemon still dies on bootup/restart, so I can't use docker commands.)</p>
]]></description><link>https://forum.modalai.com/post/2414</link><guid isPermaLink="true">https://forum.modalai.com/post/2414</guid><dc:creator><![CDATA[jaredjohansen]]></dc:creator><pubDate>Tue, 26 Oct 2021 15:16:24 GMT</pubDate></item><item><title><![CDATA[Reply to docker fills up /data, prevents code from running on Tue, 26 Oct 2021 15:08:05 GMT]]></title><description><![CDATA[<p dir="auto">System image 3.3.0 increases the number of inodes on /data to 3M. However, that may require that /data is completely wiped when you install it.</p>
]]></description><link>https://forum.modalai.com/post/2412</link><guid isPermaLink="true">https://forum.modalai.com/post/2412</guid><dc:creator><![CDATA[Eric Katzfey]]></dc:creator><pubDate>Tue, 26 Oct 2021 15:08:05 GMT</pubDate></item><item><title><![CDATA[Reply to docker fills up /data, prevents code from running on Tue, 26 Oct 2021 14:56:50 GMT]]></title><description><![CDATA[<p dir="auto">Here is some more info.  Looks like docker is using all the inodes:</p>
<pre><code>yocto:/data$ sudo find . -xdev -type f | cut -d "/" -f 2 | sort | uniq -c | sort -n              
      1 adb_devid
      1 db
      1 dhcpcd-wlan0.info
      1 dnsmasq.conf
      1 dnsmasq_d.leases
      1 l2tp_cfg.xml
      1 linkgraph.db
      1 mobileap_cfg.xml
      1 modalai
      1 network
      1 repositories-overlay
      2 usb
      2 web_root
      4 persist
      7 iproute2
     20 misc
     53 containers
    189 graph
3265231 overlay
</code></pre>
]]></description><link>https://forum.modalai.com/post/2410</link><guid isPermaLink="true">https://forum.modalai.com/post/2410</guid><dc:creator><![CDATA[jaredjohansen]]></dc:creator><pubDate>Tue, 26 Oct 2021 14:56:50 GMT</pubDate></item><item><title><![CDATA[Reply to docker fills up /data, prevents code from running on Tue, 26 Oct 2021 14:35:03 GMT]]></title><description><![CDATA[<p dir="auto">Here you are:</p>
<pre><code>yocto:/$ df -i /data
Filesystem     Inodes  IUsed IFree IUse% Mounted on
/dev/sda9      977280 977280     0  100% /data
</code></pre>
]]></description><link>https://forum.modalai.com/post/2409</link><guid isPermaLink="true">https://forum.modalai.com/post/2409</guid><dc:creator><![CDATA[jaredjohansen]]></dc:creator><pubDate>Tue, 26 Oct 2021 14:35:03 GMT</pubDate></item><item><title><![CDATA[Reply to docker fills up /data, prevents code from running on Mon, 25 Oct 2021 23:13:11 GMT]]></title><description><![CDATA[<p dir="auto">Can you show the output of <code># df -i /data</code>?</p>
]]></description><link>https://forum.modalai.com/post/2397</link><guid isPermaLink="true">https://forum.modalai.com/post/2397</guid><dc:creator><![CDATA[Eric Katzfey]]></dc:creator><pubDate>Mon, 25 Oct 2021 23:13:11 GMT</pubDate></item><item><title><![CDATA[Reply to docker fills up /data, prevents code from running on Mon, 25 Oct 2021 23:00:25 GMT]]></title><description><![CDATA[<p dir="auto">There is one other thing I did that is noteworthy.  I reflashed the base image with 3.3 and installed the voxl-suite.  In this process, I selected the option that left /data intact.</p>
]]></description><link>https://forum.modalai.com/post/2396</link><guid isPermaLink="true">https://forum.modalai.com/post/2396</guid><dc:creator><![CDATA[jaredjohansen]]></dc:creator><pubDate>Mon, 25 Oct 2021 23:00:25 GMT</pubDate></item></channel></rss>