簡述:
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模式,需要我們提前準備好塊裝置,以提供更好的穩定性和效能
02-Docker v17.03文檔中CentOS7系統下安裝時,預設使用devicemapper驅動的loop-lvm模式,因為安裝簡單,只適用於測試環境
03-Docker v17.03文檔中CentOS7系統下安裝時,預設使用devicemapper驅動的loop-lvm模式,docker info 資訊顯示,最大可用空間只有107GB
04-生產環境下必須使用devicemapper驅動的direct-lvm模式,使用塊裝置,速度更快並且能更有效地使用系統資源
05-關於OverlayFS儲存驅動,盡量使用overlay2而不要使用overlay,使用overlay2時Linux系統核心要求4.0以上
06-新版本的Docker儲存驅動說明,overlay可以使用但不建議,最好使用overlay2,核心需要4.0以上,或者CentOS7的核心在3.10.0-693以上,需要額外的設定參數。
07-CentOS7的使用者,核心在3.10.0-693以上,Docker-ce v17.06及以上,在使用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