本文主要是介绍修改CentOs7 上Docker默认文件系统DeviceMapper为OverlayFS,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
1 2 3 4 5 | { "storage-driver" : "devicemapper" , "storage-opts" : [ "dm.thinpooldev=/dev/mapper/docker-thinpool" , "dm.use_deferred_removal=true" ] } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # docker info Containers: 11 Images: 63 Storage Driver: devicemapper Pool Name: docker-252:1-679218-pool Pool Blocksize: 65.54 kB Backing Filesystem: extfs Data file : /dev/loop0 Metadata file : /dev/loop1 Data Space Used: 2.221 GB Data Space Total: 107.4 GB Data Space Available: 9.648 GB Metadata Space Used: 4.166 MB Metadata Space Total: 2.147 GB Metadata Space Available: 2.143 GB Udev Sync Supported: true Deferred Removal Enabled: false Data loop file : /var/lib/docker/devicemapper/devicemapper/data Metadata loop file : /var/lib/docker/devicemapper/devicemapper/metadata Library Version: 1.02.95-RHEL6 (2015-09-08) Execution Driver: native-0.2 Logging Driver: json- file Kernel Version: 2.6.32-573.22.1.el6.x86_64 Operating System: <unknown> CPUs: 2 Total Memory: 2.819 GiB Name: bastion.shanker ID: SJVK:KAXO:ZDAB:XWSM:O45I:EF6U:GE2T:RU3Y:NW6B:K4IQ:DYEN:B4BJ |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # docker info Containers: 1 Running: 0 Paused: 0 Stopped: 1 Images: 38 Server Version: 1.10.3 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 101 Dirperm1 Supported: false Execution Driver: native-0.2 Logging Driver: json- file Plugins: Volume: local Network: host bridge null Kernel Version: 3.13.0-24-generic Operating System: Ubuntu 14.04.1 LTS OSType: linux Architecture: x86_64 CPUs: 1 Total Memory: 1.463 GiB Name: dbslave.shanker ID: IDR4:IA4B:3GDE:O6KF:IACI:BQE2:5SJL:25CA:4KV3:OCIG:RGYC:N22G Username: shanker Registry: https: //index .docker.io /v1/ WARNING: No swap limit support |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # docker info Containers: 3 Running: 0 Paused: 0 Stopped: 3 Images: 5 Server Version: 1.11.1 Storage Driver: overlay Backing Filesystem: xfs Logging Driver: json- file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge null host Kernel Version: 3.10.0-327.18.2.el7.x86_64 Operating System: CentOS Linux 7 (Core) OSType: linux Architecture: x86_64 CPUs: 1 Total Memory: 3.703 GiB Name: ukcent2.novalocal ID: 7Q46:GGPP:HOLP:5ICX:WXV7:ZC73:S45I:HVC2:UEWX:FL6L:DMSC:TVYH Docker Root Dir: /var/lib/docker Debug mode (client): false Debug mode (server): false Registry: https: //index .docker.io /v1/ |
1 | echo "overlay" > /etc/modules-load .d /overlay .conf |
1 2 | # lsmod | grep over overlay 42451 0 |
1 2 3 4 5 6 7 8 | cat > /etc/yum .repos.d /docker .repo<<E [dockerrepo] name=Docker Repository baseurl=https: //yum .dockerproject.org /repo/main/centos/ $releasever/ enabled=1 gpgcheck=1 gpgkey=https: //yum .dockerproject.org /gpg E |
1 2 3 4 5 6 | sudo mkdir -p /etc/systemd/system/docker .service.d sudo cat > /etc/systemd/system/docker .service.d /override .conf <<E [Service] ExecStart= ExecStart= /usr/bin/docker daemon --storage-driver=overlay -H fd: // E |
1 2 3 | sudo yum -y install docker-engine sudo sysctemctl start docker sudo systemctl enable docker |
1 | Storage Driver: overlay |
这篇关于修改CentOs7 上Docker默认文件系统DeviceMapper为OverlayFS的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!