[Experience] CentOS7 docker uses overlay storage, centos7docker

Source: Internet
Author: User

[Experience] CentOS7 docker uses overlay storage, centos7docker

For the advantages of docker overlay storage over device mapper, you can search for related information on google. Overlay storage can be used directly on ubuntu 16.04.2, while overlay storage can be used only after preprocessing on CentOS7.

1. CentOS7 Overlay storage status

The CentOS7 kernel is 3.x. the overlay storage driver is officially built based on the kernel, but cannot be loaded directly. Otherwise, exceptions may occur during running of docker and kubernetes. For example:

  • Calico node Reports file operation Error
  • Kubernetes calico network failure
  • Kube-dns deployment failed
2. How to enable CentOS7 Overlay

To enable Overlay storage correctly in CentOS7, refer to the following RedHat documents:

Https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/7.2_Release_Notes/technology-preview-file_systems.html

To put it simply, there are the following points:

2.1 xfs File System

The-n ftype = 1 parameter must be added when formatting the XFS file system.

Note: this parameter is not added by default during CentOS7 installation and is not modified on the installation page. We recommend that you mount another disk or partition, and format it with the ftype = 1 parameter in xfs format:

mkfs.xfs -n ftype=1 /dev/sdbX
2.2 selinux

/Etc/sysconfig/docker remove -- selinux-enabled

2.3 kernel driver
echo 'overlay' > /etc/modules-load.d/overlayreboot

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.