最近项目在centOS7服务器上用docker部署了几个服务,在运行的时候发现,总是过一段时间,容器内的根目录就变为只读而无法写入了。

经过调查都是因为docker/devicemapper/devicemapper/data文件写满无法再写入而造成的。

具体分析可参见博文https://segmentfault.com/a/1190000004302467

现将在centOS7使用docker需要注意的两点罗列如下:

1.保存docker/devicemapper/devicemapper/data文件的分区要足够大

可以在/etc/sysconfig/docker中更改默认的存储路径

# /etc/sysconfig/docker

# Modify these options if you want to change the way the docker daemon runs
OPTIONS='--graph="/data0/docker" --selinux-enabled' DOCKER_CERT_PATH=/etc/docker

2.docker/devicemapper/devicemapper/data文件的默认大小为107.4GB, 如果可以的话在启动docker之前把这个值设的尽量大一些

如想设置文件大小为1.6T,可执行下面命令

dd if=/dev/zero  of=/data0/docker/devicemapper/devicemapper/data bs=1G count=0 seek=1600

最新文章

  1. 【javascript激增的思考04】MVC与Backbone.js(beta)
  2. linux shell脚本通过参数名传递参数值
  3. Gradle build设置自动log开关
  4. leap motion
  5. wikioi 1688 求逆序对
  6. 对Slony-I中wait on的理解
  7. 面向XX编程
  8. JSLink to render the list to show people detail info with picture
  9. unity 编辑器和插件生产(四.2)
  10. 利用ATiny85制作BadUSB
  11. vertx的Future设计
  12. vue2.0 微信分享
  13. 调试dump文件
  14. PHP之常用设计模式
  15. python的time模块总结
  16. python-思路整理-虚拟环境
  17. merge_节点
  18. 【慕课网实战】Spark Streaming实时流处理项目实战笔记三之铭文升级版
  19. [CentOS7] [VMWARE] 增加磁盘空间后扩大逻辑分区
  20. 操作iframe 的方法与兼容性

热门文章

  1. 利用 Hexo + Github 搭建自己的博客
  2. PP: GRU-ODE-Bayes: Continuous modeling of sporadically-observed time series
  3. dataTables插件的使用
  4. 认识Flow(一)
  5. python3练习100题——032
  6. matplotlib 的一些知识
  7. 判断IE版本的HTML语句[if lte IE 9]……[endif]
  8. ASP.NET Process Model之二:ASP.NET Http Runtime Pipeline - Part II
  9. Python入门9 —— 循环
  10. 记录 shell学习过程(5)continue break