You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 16, 2020. It is now read-only.
I have a coreos vagrant image i'm using locally to run and build docker images on my mac. I'm using the latest CoreOS Alpha channel to test and have run into an issue that I will exhaust inodes on the VM after only half dozen to a dozen docker builds. This seems to be happening far to quickly then it should be. I've made a comment on this docker issue, which looks like it could be related.
I'm not sure if this happens on AWS or this might be related to vagrant specifically. But this bug, whether it's related to docker or CoreOS, will definitely have a big impact on switching over to ext4 from btrfs.
@efuquen I am running in to a similar issue and I see this behavior in AWS.
I run docker builds on a machine in AWS. That server is running Ubuntu 14.04, Docker 1.4 and is using the aufs driver. I can post more details if needed.
I am running these containers on CoreOS hosts with ext4 and the overlayfs driver.
The Ubuntu server doesn't have any problems with inode usage but the CoreOS machines do, so I suspect the issue is related to overlayfs but I'm not sure what else I can look at to narrow things down.
As far as I can tell the gist of the issue is that the overlay driver only uses an overlay mount for containers, it does not use it to stack images together. Instead it copies the entire directory tree for each image, hard-linking files as it goes. So data and inodes of files do not get duplicated but every directory does get duplicated. After a docker build here is a list of inodes per layer vs size reported by docker: (actual disk usage is a bit higher)
2 0 B
12830 188.1 MB
2960 194.5 kB
2952 1.895 kB
2951 0 B
2951 0 B
12741 221.2 MB
5407 20.22 MB
4954 4.999 MB
4707 0 B
5107 3.64 MB
5235 12.77 MB
4775 0 B
9599 39.69 MB
5220 0 B
5220 0 B
5452 97.92 MB
5266 0 B
5266 0 B
7294 797 MB
5637 0 B
5638 3.497 MB
6396 15.7 MB
7489 22.72 MB
6214 20.21 MB
6129 2.115 MB
6128 0 B
6727 16 MB
6256 0 B
6353 1.462 MB
6284 64 B
6284 41 B
6287 1.897 kB
6297 332 kB
6284 0 B
6284 0 B
6284 0 B
6948 2.909 MB
6650 5.811 MB
6567 3.617 MB
6509 0 B
7856 54.81 MB
total inodes: 252390
total image size reported by docker: 1.535 GB
total disk usage reported by du: 2.0G
By default mke2fs allocates 1 inode per 16384 bytes but based on the above we actually want something like 8000 bytes per inode. Is that representative? Could folks running into this post the output of df / and df -i / so we can figure out what the bytes-per-inode ratio should be?
Went with allocating 1 inode per 4096 bytes, or 1 inode per block which is the maximum. So this should no longer be an issue with machines installed with the next alpha image.
I've been bitten by this also - for what it's worth, my used space/used inodes = 3045 so the proposed fix sounds like it would be appropriate for me. I was running beta but I'll switch to alpha to pick up the changes.
@BugRoger it landed in 591.0.0, so definitely in stable by now. However, if you have upgraded instances from a version before this filesystem formatting tweak then you will have to install a fresh filesystem (full CoreOS install or manually format a new partition). It won't happen "automatically" via upgrades to newer CoreOS versions.
Activity
jmreicha commentedon Feb 11, 2015
@efuquen I am running in to a similar issue and I see this behavior in AWS.
I run docker builds on a machine in AWS. That server is running Ubuntu 14.04, Docker 1.4 and is using the aufs driver. I can post more details if needed.
I am running these containers on CoreOS hosts with ext4 and the overlayfs driver.
The Ubuntu server doesn't have any problems with inode usage but the CoreOS machines do, so I suspect the issue is related to overlayfs but I'm not sure what else I can look at to narrow things down.
marineam commentedon Feb 12, 2015
As far as I can tell the gist of the issue is that the overlay driver only uses an overlay mount for containers, it does not use it to stack images together. Instead it copies the entire directory tree for each image, hard-linking files as it goes. So data and inodes of files do not get duplicated but every directory does get duplicated. After a docker build here is a list of inodes per layer vs size reported by docker: (actual disk usage is a bit higher)
By default mke2fs allocates 1 inode per 16384 bytes but based on the above we actually want something like 8000 bytes per inode. Is that representative? Could folks running into this post the output of
df /anddf -i /so we can figure out what the bytes-per-inode ratio should be?marineam commentedon Feb 12, 2015
Went with allocating 1 inode per 4096 bytes, or 1 inode per block which is the maximum. So this should no longer be an issue with machines installed with the next alpha image.
jmreicha commentedon Feb 12, 2015
@marineam did you still want stats or should moving to newest alpha take care of this?
marineam commentedon Feb 12, 2015
@jmreicha I am still curious about usage in case we need to adjust this later.
jmreicha commentedon Feb 12, 2015
@marineam here is what I come up with.
Let me now if you want any other info.
marineam commentedon Feb 12, 2015
Ok, you are running at about 5998 bytes per inode, so sounds like the 4K value I went with is truly what is required.
jmreicha commentedon Feb 12, 2015
Good to know. Do you happen to know which release this change will be available in?
marineam commentedon Feb 12, 2015
https://github.com/coreos/manifest/releases/tag/v591.0.0 or later
stresler commentedon Feb 20, 2015
localhost core # df /
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda9 114791876 27598308 86603868 25% /
localhost core # df -i /
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda9 0 0 0 - /
seems off - but we have been troubleshooting a bit before we foudn this thread.
lordelph commentedon Feb 27, 2015
I've been bitten by this also - for what it's worth, my used space/used inodes = 3045 so the proposed fix sounds like it would be appropriate for me. I was running beta but I'll switch to alpha to pick up the changes.
BugRoger commentedon May 27, 2015
I'm still being bitten by this every over day on 647.0.0 stable. My ratios are:
df -i /
df -h /
blocks per inode: 4.0165
bytes per inode: 16451.6
Shouldn't this have landed in stable by now?
lamielle commentedon May 27, 2015
@BugRoger it landed in 591.0.0, so definitely in stable by now. However, if you have upgraded instances from a version before this filesystem formatting tweak then you will have to install a fresh filesystem (full CoreOS install or manually format a new partition). It won't happen "automatically" via upgrades to newer CoreOS versions.
BugRoger commentedon May 28, 2015
@lamielle Thanks for the clarification, Alan. That was indeed the problem.