Docker, storage isolation >= 1.8

lvcreate -n pool0 -L 20G dockers
lvcreate -n pool0meta -L 1G dockers
lvconvert --type thin-pool --poolmetadata dockers/pool0meta  dockers/pool0

# check how it is working?
[root@db7 ~]# docker daemon --storage-opt dm.thinpooldev=/dev/mapper/dockers-pool0

Install to systemctl

echo  'OPTIONS="--storage-opt dm.thinpooldev=/dev/mapper/dockers-pool0"' >> /etc/sysconfig/docker
vi /usr/lib/systemd/system/docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network.target docker.socket
Requires=docker.socket

[Service]
EnvironmentFile=-/etc/sysconfig/docker
Type=notify
ExecStart=/usr/bin/docker daemon -H fd:// $OPTIONS
MountFlags=slave
LimitNOFILE=1048576
LimitNPROC=1048576
LimitCORE=infinity

[Install]
WantedBy=multi-user.target

Stop docker.

systemctl daemon-reload

# It will drop all data...
rm /var/lib/docker -rvf

Now, start docker.

    • author
    • September 11th, 2015


    [root@db7 ~]# yum update -y
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: centos2.hti.pl
    * extras: centos.komster.pl
    * updates: centos2.hti.pl
    Resolving Dependencies
    --> Running transaction check
    ---> Package docker-engine.x86_64 0:1.8.1-1.el7.centos will be updated
    ---> Package docker-engine.x86_64 0:1.8.2-1.el7.centos will be an update
    --> Finished Dependency Resolution

    Dependencies Resolved

    =====================================================================================================================================================================================
    Package Arch Version Repository Size
    =====================================================================================================================================================================================
    Updating:
    docker-engine x86_64 1.8.2-1.el7.centos docker-main-repo 6.2 M

    Transaction Summary
    =====================================================================================================================================================================================
    Upgrade 1 Package

    Total download size: 6.2 M
    Downloading packages:
    Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
    docker-engine-1.8.2-1.el7.centos.x86_64.rpm | 6.2 MB 00:00:03
    Running transaction check
    Running transaction test
    Transaction test succeeded
    Running transaction
    Updating : docker-engine-1.8.2-1.el7.centos.x86_64 1/2
    Cleanup : docker-engine-1.8.1-1.el7.centos.x86_64 2/2
    Verifying : docker-engine-1.8.2-1.el7.centos.x86_64 1/2
    Verifying : docker-engine-1.8.1-1.el7.centos.x86_64 2/2

    Updated:
    docker-engine.x86_64 0:1.8.2-1.el7.centos

    [root@db7 ~]# cat /etc/sysconfig/docker
    # /etc/sysconfig/docker
    #
    # Other arguments to pass to the docker daemon process
    # These will be parsed by the sysv initscript and appended
    # to the arguments list passed to docker daemon

    other_args=""

    xd

  1. No trackbacks yet.