From f6440247ca168c509f6a403a5c853bd08954352c Mon Sep 17 00:00:00 2001 From: Justin Santa Barbara Date: Sun, 7 Jun 2015 09:59:38 -0400 Subject: [PATCH] AWS: Don't thin provision LVM volume on wheezy Thin provisioning isn't supported (unless you backport from jessie). Just use normal LVM volumes with aufs. --- cluster/aws/templates/format-disks.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cluster/aws/templates/format-disks.sh b/cluster/aws/templates/format-disks.sh index 3aeb09c7e53..3d35900a793 100644 --- a/cluster/aws/templates/format-disks.sh +++ b/cluster/aws/templates/format-disks.sh @@ -119,10 +119,17 @@ else # Create a docker lv, use docker on it # 95% goes to the docker thin-pool - lvcreate -l 95%VG --thinpool docker-thinpool vg-ephemeral + release=`lsb_release -c -s` + if [[ "${release}" != "wheezy" ]] ; then + lvcreate -l 95%VG --thinpool docker-thinpool vg-ephemeral - THINPOOL_SIZE=$(lvs vg-ephemeral/docker-thinpool -o LV_SIZE --noheadings --units M --nosuffix) - lvcreate -V${THINPOOL_SIZE}M -T vg-ephemeral/docker-thinpool -n docker + THINPOOL_SIZE=$(lvs vg-ephemeral/docker-thinpool -o LV_SIZE --noheadings --units M --nosuffix) + lvcreate -V${THINPOOL_SIZE}M -T vg-ephemeral/docker-thinpool -n docker + else + # Thin provisioning not supported by Wheezy + echo "Detected wheezy; won't use LVM thin provisioning" + lvcreate -l 95%VG -n docker vg-ephemeral + fi mkfs -t ext4 /dev/vg-ephemeral/docker mkdir -p /mnt/docker