Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jvalencia authored and RichieEscarez committed Dec 4, 2015
1 parent b5350f9 commit a449179
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions cluster/aws/templates/format-disks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,23 +135,15 @@ else
move_kubelet="/mnt/ephemeral/kubernetes"
else
# aufs

# We used to split docker & kubernetes, but we no longer do that, because
# host volumes go into the kubernetes area, and it is otherwise very easy
# to fill up small volumes.
#
# No need for thin pool since we are not over-provisioning or doing snapshots
# (probably shouldn't be doing snapshots on ephemeral disk? Should be stateless-ish.)
# Tried to do it, but it cause problems (#16188)

release=`lsb_release -c -s`
if [[ "${release}" != "wheezy" ]] ; then
lvcreate -l 100%FREE --thinpool pool-ephemeral vg-ephemeral

THINPOOL_SIZE=$(lvs vg-ephemeral/pool-ephemeral -o LV_SIZE --noheadings --units M --nosuffix)
lvcreate -V${THINPOOL_SIZE}M -T vg-ephemeral/pool-ephemeral -n ephemeral
else
# Thin provisioning not supported by Wheezy
echo "Detected wheezy; won't use LVM thin provisioning"
lvcreate -l 100%VG -n ephemeral vg-ephemeral
fi

lvcreate -l 100%VG -n ephemeral vg-ephemeral
mkfs -t ext4 /dev/vg-ephemeral/ephemeral
mkdir -p /mnt/ephemeral
echo "/dev/vg-ephemeral/ephemeral /mnt/ephemeral ext4 noatime 0 0" >> /etc/fstab
Expand Down

0 comments on commit a449179

Please sign in to comment.