Merge pull request #16303 from jvalencia/master

Auto commit by PR queue bot
This commit is contained in:
k8s-merge-robot
2015-10-28 02:01:01 -07:00

View File

@@ -135,23 +135,15 @@ else
move_kubelet="/mnt/ephemeral/kubernetes" move_kubelet="/mnt/ephemeral/kubernetes"
else else
# aufs # aufs
# We used to split docker & kubernetes, but we no longer do that, because # 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 # host volumes go into the kubernetes area, and it is otherwise very easy
# to fill up small volumes. # 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` lvcreate -l 100%VG -n ephemeral vg-ephemeral
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
mkfs -t ext4 /dev/vg-ephemeral/ephemeral mkfs -t ext4 /dev/vg-ephemeral/ephemeral
mkdir -p /mnt/ephemeral mkdir -p /mnt/ephemeral
echo "/dev/vg-ephemeral/ephemeral /mnt/ephemeral ext4 noatime 0 0" >> /etc/fstab echo "/dev/vg-ephemeral/ephemeral /mnt/ephemeral ext4 noatime 0 0" >> /etc/fstab