mirror of https://github.com/k3s-io/k3s
Mount disk in kubemark earlier
parent
6b7ddc56d3
commit
cde44bc07c
|
@ -48,16 +48,12 @@ function mount-master-pd() {
|
|||
# persistent data, and link them to where they're used.
|
||||
mkdir -p "${mount_point}"
|
||||
|
||||
device=$1
|
||||
mountpoint=$2
|
||||
|
||||
# Format only if the disk is not already formatted.
|
||||
if ! tune2fs -l "${pd_path}" ; then
|
||||
echo "Formatting '${pd_path}'"
|
||||
mkfs.ext4 -F -E lazy_itable_init=0,lazy_journal_init=0,discard "${pd_path}"
|
||||
fi
|
||||
|
||||
mkdir -p "${mount_point}"
|
||||
echo "Mounting '${pd_path}' at '${mount_point}'"
|
||||
mount -o discard,defaults "${pd_path}" "${mount_point}"
|
||||
echo "Mounted master-pd '${pd_path}' at '${mount_point}'"
|
||||
|
@ -78,6 +74,8 @@ function mount-master-pd() {
|
|||
fi
|
||||
}
|
||||
|
||||
mount-master-pd
|
||||
|
||||
if [ "${EVENT_STORE_IP}" == "127.0.0.1" ]; then
|
||||
# Retry starting etcd to avoid pulling image errors.
|
||||
retry sudo docker run --net=host \
|
||||
|
@ -101,8 +99,6 @@ retry sudo docker run --net=host \
|
|||
# Increase the allowed number of open file descriptors
|
||||
ulimit -n 65536
|
||||
|
||||
mount-master-pd
|
||||
|
||||
tar xzf kubernetes-server-linux-amd64.tar.gz
|
||||
|
||||
kubernetes/server/bin/kube-scheduler --master=127.0.0.1:8080 $(cat scheduler_flags) &> /var/log/kube-scheduler.log &
|
||||
|
|
Loading…
Reference in New Issue