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

wip: fix mounting /var/lib/contaired to tmpfs in VM ISO #7834

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 4 additions & 43 deletions deploy/iso/minikube-iso/package/automount/minikube-automount
Original file line number Diff line number Diff line change
Expand Up @@ -89,37 +89,10 @@ if [ -n "$BOOT2DOCKER_DATA" ]; then
fi

# Just in case, the links will fail if not
umount -f /var/lib/docker || true
rm -rf /var/lib/docker /var/lib/boot2docker
mkdir -p /var/lib

mkdir -p /mnt/$PARTNAME/var/lib/boot2docker
mkdir /var/lib/boot2docker
mount --bind /mnt/$PARTNAME/var/lib/boot2docker /var/lib/boot2docker

mkdir -p /mnt/$PARTNAME/var/lib/docker
mkdir -p /var/lib/docker
mount --bind /mnt/$PARTNAME/var/lib/docker /var/lib/docker

mkdir -p /mnt/$PARTNAME/var/lib/containers
mkdir -p /var/lib/containers
mount --bind /mnt/$PARTNAME/var/lib/containers /var/lib/containers

mkdir -p /mnt/$PARTNAME/var/log
mkdir /var/log
mount --bind /mnt/$PARTNAME/var/log /var/log

mkdir -p /mnt/$PARTNAME/var/tmp
mkdir /var/tmp
mount --bind /mnt/$PARTNAME/var/tmp /var/tmp

mkdir -p /mnt/$PARTNAME/var/lib/kubelet
mkdir /var/lib/kubelet
mount --bind /mnt/$PARTNAME/var/lib/kubelet /var/lib/kubelet

mkdir -p /mnt/$PARTNAME/var/lib/cni
mkdir /var/lib/cni
mount --bind /mnt/$PARTNAME/var/lib/cni /var/lib/cni
umount -f /var || true
medyagh marked this conversation as resolved.
Show resolved Hide resolved
rm -rf /var
mkdir -p /var
medyagh marked this conversation as resolved.
Show resolved Hide resolved
mount --bind /mnt/$PARTNAME/var /var

mkdir -p /mnt/$PARTNAME/data
mkdir /data
Expand All @@ -141,18 +114,6 @@ if [ -n "$BOOT2DOCKER_DATA" ]; then
chown -R docker:docker /home/docker/.ssh
rm -f '/home/docker/boot2docker, please format-me'

mkdir -p /mnt/$PARTNAME/var/lib/minikube
mkdir /var/lib/minikube
mount --bind /mnt/$PARTNAME/var/lib/minikube /var/lib/minikube

mkdir -p /mnt/$PARTNAME/var/lib/toolbox
mkdir /var/lib/toolbox
mount --bind /mnt/$PARTNAME/var/lib/toolbox /var/lib/toolbox

mkdir -p /mnt/$PARTNAME/var/lib/minishift
mkdir /var/lib/minishift
mount --bind /mnt/$PARTNAME/var/lib/minishift /var/lib/minishift

## make an env file for other services to discover this PARTNAME easier
mkdir -p /var/run/minikube
medyagh marked this conversation as resolved.
Show resolved Hide resolved
echo "PERSISTENT_DIR=\"/mnt/$PARTNAME\"" > /var/run/minikube/env
Expand Down