CentOS7.x系统中使用Docker时,在存储方面需要注意的问题


简述:

1、Docker 1.12.6/v17.03文档中CentOS7系统下安装时,明确说明,用于生产时,必须使用devicemapper驱动的direct-lvm模式,需要我们提前准备好块设备,以提供更好的稳定性和性能。默认使用devicemapper驱动的loop-lvm模式,因为安装简单,只适用于测试环境。从docker info 信息可以看出,loop-lvm模式最大可用空间只有107GB。生产环境下必须使用devicemapper驱动的direct-lvm模式,使用块设备,速度更快并且能更有效地使用系统资源。

2、在Docker v17.06及以后的版本中,关于OverlayFS存储驱动,尽量使用overlay2而不要使用overlay,官方的说明是overlay可以使用但不建议。使用overlay2时Linux系统内核要求4.0以上,或者CentOS7的内核在3.10.0-693以上。Docker-ce v17.06及以上,在使用overlay2驱动时,还需要设置额外的参数,以禁止检测内核为4.0版本。


官网截图:

01-Docker v17.03文档中CentOS7系统下安装时,明确说明,用于生产时,必须使用devicemapper驱动的direct-lvm模式,需要我们提前准备好块设备,以提供更好的稳定性和性能

01-Docker v17.03文档中CentOS7系统下安装时,明确说明,用于生产时,必须使用devicemapper驱动的direct-lvm模式,需要我们提前准备好块设备,以提供更好的稳定性和性能

02-Docker v17.03文档中CentOS7系统下安装时,默认使用devicemapper驱动的loop-lvm模式,因为安装简单,只适用于测试环境

02-Docker v17.03文档中CentOS7系统下安装时,默认使用devicemapper驱动的loop-lvm模式,因为安装简单,只适用于测试环境

03-Docker v17.03文档中CentOS7系统下安装时,默认使用devicemapper驱动的loop-lvm模式,docker info 信息显示,最大可用空间只有107GB

03-Docker v17.03文档中CentOS7系统下安装时,默认使用devicemapper驱动的loop-lvm模式,最大可用空间只有107GB


04-生产环境下必须使用devicemapper驱动的direct-lvm模式,使用块设备,速度更快并且能更有效地使用系统资源

04-生产环境下必须使用devicemapper驱动的direct-lvm模式,使用块设备,速度更快并且能更有效地使用系统资源


05-关于OverlayFS存储驱动,尽量使用overlay2而不要使用overlay,使用overlay2时Linux系统内核要求4.0以上

05-关于OverlayFS存储驱动,尽量使用overlay2而不要使用overlay,使用overlay2时Linux系统内核要求4.0以上


06-新版本的Docker存储驱动说明,overlay可以使用但不建议,最好使用overlay2,内核需要4.0以上,或者CentOS7的内核在3.10.0-693以上,需要额外的设置参数。

06-新版本的Docker存储驱动说明,overlay可以使用但不建议,最好使用overlay2,内核需要4.0以上,或者CentOS7的内核在3.10.0-693以上


07-CentOS7的用户,内核在3.10.0-693以上,Docker-ce v17.06及以上,在使用overlay2驱动时,还需要设置额外的参数,禁止检测内核为4.0版本。

07-CentOS7的用户,内核在3.10.0-693以上,在使用overlay2驱动时,还需要设置额外的参数,禁止检测内核为4.0版本


参考链接:

CentOS7下安装Docker v17.03

https://docs.docker.com/v17.03/engine/installation/linux/centos/#install-from-a-package

Use the Device Mapper storage driver

https://docs.docker.com/v17.03/engine/userguide/storagedriver/device-mapper-driver/

Use the OverlayFS storage driver

https://docs.docker.com/v17.03/engine/userguide/storagedriver/overlayfs-driver/

CentOS下修改Devicemapper存储驱动为Direct-lvm模式

https://forums.cnrancher.com/article/19

Use the Device Mapper storage driver

https://docs.docker.com/storage/storagedriver/device-mapper-driver/

CentOS下 Docker的安装

https://docs.docker.com/v17.03/engine/installation/linux/centos/#install-from-a-package

Configure direct-lvm mode for production

https://docs.docker.com/v17.03/engine/userguide/storagedriver/device-mapper-driver/#configure-direct-lvm-mode-for-production

Docker问答录(100)

https://blog.lab99.org/post/docker-2016-07-14-faq.html#docker-de-var-lib-docker-devicemapper-zhan-yong-kong-jian-bu-duan-zeng-chang-zen-me-po

Redhat7.2_release_notes (OverlayFS)

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/7.2_release_notes/technology-preview-file_systems

Redhat7.3_release_notes (OverlayFS)

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/7.3_release_notes/technology_previews_file_systems

Redhat7.4_release_notes (OverlayFS)

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/7.4_release_notes/technology_previews_file_systems

猜你喜欢

转载自blog.csdn.net/CSDN_duomaomao/article/details/79674322