自己生成docker存储
lvm创建docker存储
lvcreate-L4G-ndocker-poolMeta/dev/VolGroup00
lvcreate-L200G-ndocker-pool/dev/VolGroup00
转换lvm格式
lvconvert--typethin-pool--poolMetadataVolGroup00/docker-poolMetaVolGroup00/docker-pool
三种方式启动,随你喜欢
命令行启动
/usr/bin/docker-d-Hunix:///var/run/docker.sock--storage-driver=devicemapper--storage-optdm.fs=ext4--storage-optdm.thinpooldev=/dev/mapper/VolGroup00-docker--pool
修改 init的docker 改为如下格式
/etc/init.d/docker
$exec-d-Hunix:///var/run/docker.sock--storage-driver=devicemapper--storage-optdm.fs=ext4--storage-optdm.thinpooldev=/dev/mapper/VolGroup00-docker--pool&>>$logfile&
配置文件启动
vi /etc/sysconfig/docker
docker_own="root:dockerroot" docker_sock="/var/run/docker.sock" docker_listen="0.0.0.0:2375" other_args="-Hunix://$docker_sock-H$docker_listen--storage-driver=devicemapper--storage-optdm.fs=ext4--storage-optdm.thinpooldev=/dev/mapper/VolGroup00-docker--pool"原文链接:https://www.f2er.com/centos/381279.html