From 3993e12335200e908ac5f6720ecea61d00e72774 Mon Sep 17 00:00:00 2001 From: "rong.zhang" Date: Fri, 15 Dec 2017 20:06:55 +0800 Subject: [PATCH] Fix can not be used devicemapper driver Fix can not be used devicemapper driver --- roles/docker/docker-storage/defaults/main.yml | 3 +++ roles/docker/docker-storage/tasks/main.yml | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/roles/docker/docker-storage/defaults/main.yml b/roles/docker/docker-storage/defaults/main.yml index 9785dac47..38f137bd5 100644 --- a/roles/docker/docker-storage/defaults/main.yml +++ b/roles/docker/docker-storage/defaults/main.yml @@ -3,6 +3,9 @@ docker_container_storage_setup_version: v0.6.0 docker_container_storage_setup_profile_name: kubespray docker_container_storage_setup_storage_driver: devicemapper docker_container_storage_setup_container_thinpool: docker-pool +#It must be define a disk path for docker_container_storage_setup_devs. +#Otherwise docker-storage-setup will be executed incorrectly. +#docker_container_storage_setup_devs: /dev/vdb docker_container_storage_setup_data_size: 40%FREE docker_container_storage_setup_min_data_size: 2G docker_container_storage_setup_chunk_size: 512K diff --git a/roles/docker/docker-storage/tasks/main.yml b/roles/docker/docker-storage/tasks/main.yml index 5bbb38687..d61f91284 100644 --- a/roles/docker/docker-storage/tasks/main.yml +++ b/roles/docker/docker-storage/tasks/main.yml @@ -31,6 +31,12 @@ group: root mode: 0644 +#https://docs.docker.com/engine/installation/linux/docker-ce/centos/#install-using-the-repository +- name: docker-storage-setup | install lvm2 + yum: + name: lvm2 + state: present + - name: docker-storage-setup | install and run container-storage-setup become: yes script: install_container_storage_setup.sh {{ docker_container_storage_setup_version }} {{ docker_container_storage_setup_profile_name }}