CentOS7.x系統中使用Docker時,在儲存方面需要注意的問題__儲存驅動

來源:互聯網
上載者:User


簡述:

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.