CentOS 7.x docker uses overlay2 storage method

CentOS 7.x docker uses overlay2 storage method

Edit /etc/docker/daemon.json and add the following:

{
 "storage-driver": "overlay2",
 "storage-opts": [
  "overlay2.override_kernel_check=true"
 ]
}

Installation dependencies:

yum install yum-plugin-ovl -y

Otherwise the following error will be reported:

May 05 18:20:45 node1 dockerd[49605]: Error starting daemon: error initializing graphdriver: /var/lib/docker contains several valid graphdrivers: overlay2, overlay; Please cleanup or explicitly choose storage driver (-s )

Finally restart Docker

systemctl restart docker

Additional knowledge: Compile and load toa module on centos7

1. Install the kernel-devel package, which needs to be consistent with the current kernel version

yum install kernel-devel

yum update kernel

2. After updating the kernel, you need to restart the system to make it take effect

3. Get toa source code

cd /usr/local/src/
git clone https://github.com/huaweicloud/elb-toa.git
cd elb-toa/src
make

4. If normal, toa.ko should be generated, load and test

insmod toa.ko

lsmod |grep toa

Deploy nginx for testing

Add boot auto-load

cd /lib/modules/uname -r/kernel/net/

cp /usr/local/src/elb-toa/src/toa.ko .

Add the following line to rc.local

insmod /lib/modules/3.10.0-957.21.3.el7.x86_64/kernel/net/toa.ko

Make sure /etc/rc.d/rc.local has execution permission, otherwise rc.local will not take effect.

The above article about CentOS 7.x docker using overlay2 storage method is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

You may also be interested in:
  • Docker Overlay2 disk space usage is too large to clean up the method
  • Solve the problem of insufficient docker disk space
  • How to clean up the disk space occupied by Docker
  • About Docker's cleanup of Overlay2's occupied disk space (tested and effective)

<<:  Provides helpful suggestions for improving website design

>>:  Web lesson plans, lesson plans for beginners

Recommend

JS+Canvas realizes dynamic clock effect

A dynamic clock demo based on Canvas is provided ...

Linux yum package management method

Introduction yum (Yellow dog Updater, Modified) i...

How to introduce Excel table plug-in into Vue

This article shares the specific code of Vue intr...

Design Reference Beautiful and Original Blog Design

All blogs listed below are original and uniquely ...

Detailed examples of how to use the box-shadow property in CSS3

There are many attributes in CSS. Some attributes...

Implementation process of nginx high availability cluster

This article mainly introduces the implementation...

vue-router hook function implements routing guard

Table of contents Overview Global hook function R...

JS Decorator Pattern and TypeScript Decorators

Table of contents Introduction to the Decorator P...

Mysql index types and basic usage examples

Table of contents index - General index - Unique ...

How to make vue long list load quickly

Table of contents background Main content 1. Comp...

HTML version declaration DOCTYPE tag

When we open the source code of a regular website...

Tips for using the docker inspect command

Description and Introduction Docker inspect is a ...