Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve lvm provisioning by removing thin provisioning #16303

Merged
merged 1 commit into from
Oct 28, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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