centos6 docker1.7 存储方式修改

自己生成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"

相关文章

Centos下搭建性能监控Spotlight
CentOS 6.3下Strongswan搭建IPSec VPN
在CentOS6.5上安装Skype与QQ
阿里云基于centos6.5主机VPN配置
CentOS 6.3下配置multipah
CentOS安装、配置APR和tomcat-native