Skip to content

Commit

Permalink
Update docker storage setup parameters
Browse files Browse the repository at this point in the history
With the version of Docker included in CentOS 7.5 (1.13.1-63),
docker-storage-setup fails with the currently used parameters. The
error message is:

"ERROR: XFS filesystem at /var has ftype=0, cannot use overlay backend;
consider different driver or separate volume or OS reprovision"

The setup script also warns about new parameters that should be used.
This commit changes the configuration to use these new parameters.

Also increase the size of the loopback device used for testing, since
4 GB seems not to be enough anymore.

Change-Id: Ibc062aeeea6bc37df458a717c65ec917fc8e920f
  • Loading branch information
javierpena committed Jun 8, 2018
1 parent 03a974b commit 5f175d5
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions roles/host-preparation/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,9 @@
DEVS={{ host_preparation_docker_disk }}
VG=docker-vg
STORAGE_DRIVER=overlay2
DOCKER_ROOT_VOLUME=yes
DOCKER_ROOT_VOLUME_SIZE=100%FREE
CONTAINER_ROOT_LV_MOUNT_PATH=/var/lib/docker
CONTAINER_ROOT_LV_NAME=lvol1
CONTAINER_ROOT_LV_SIZE=100%FREE
dest: "/etc/sysconfig/docker-storage-setup"
when:
- host_preparation_docker_disk is defined
Expand All @@ -87,7 +88,7 @@
seconds: 10

- name: Create file for loopback device
command: dd if=/dev/zero of=/tmp/loopback bs=1M count=4096
command: dd if=/dev/zero of=/tmp/loopback bs=1M count=8192

- name: Set up loopback device
command: losetup -f /tmp/loopback
Expand All @@ -102,8 +103,9 @@
content: |
VG=docker-vg
STORAGE_DRIVER=overlay2
DOCKER_ROOT_VOLUME=yes
DOCKER_ROOT_VOLUME_SIZE=100%FREE
CONTAINER_ROOT_LV_MOUNT_PATH=/var/lib/docker
CONTAINER_ROOT_LV_NAME=lvol1
CONTAINER_ROOT_LV_SIZE=100%FREE
dest: "/etc/sysconfig/docker-storage-setup"

- name: Run docker-storage-setup
Expand Down

0 comments on commit 5f175d5

Please sign in to comment.