Running out of inodes on a docker volume

北战南征 提交于 2019-12-07 20:03:49

问题


I have the following docker-compos.yml file:

 web:
   build: .
   ports:
     - "4200:4200"
     - "35729:35729"
   volumes:
     - ..:/code
     - ../home:/home/dev

which maps the 2 volumes above. When I login into my VM and run df -i i see

Filesystem      Inodes  IUsed  IFree IUse% Mounted on
none           1218224 509534 708690   42% /
tmpfs           256337     18 256319    1% /dev
shm             256337      1 256336    1% /dev/shm
tmpfs           256337     11 256326    1% /sys/fs/cgroup
none              1000      0   1000    0% /code
none              1000      0   1000    0% /home/dev
/dev/sda1      1218224 509534 708690   42% /etc/resolv.conf
/dev/sda1      1218224 509534 708690   42% /etc/hostname
/dev/sda1      1218224 509534 708690   42% /etc/hosts
tmpfs           256337     18 256319    1% /proc/kcore
tmpfs           256337     18 256319    1% /proc/timer_stats

As you can /code and /home/dev my 2 volumes only have 1000 inodes, so when I run my build process and it ends up creating a ton of files, I get an error that I don't have enough inodes.

Host = OSX Guest = CentOs 6.5 Using Virtualbox

My question is: how do I assign more inodes to my data volumes /code and /home/dev above?


回答1:


I'm looking for a similar solution and so far, I've found this post to have some useful information in it:

  • how to free inode usage

Also, according to this post there doesn't seem to be a dynamic way of allocating inodes:

  • how can I increase the number of inodes ...

And finally, there is this line in the documentation:

  • it is not possible to expand the number of inodes on a filesystem after it is created


来源:https://stackoverflow.com/questions/33377828/running-out-of-inodes-on-a-docker-volume

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!