minishift/minishift-b2d-iso

Persistent storage for openshift configurations

praveenkumar opened this issue · 4 comments

Currently we only have persistent storage for docker configurations but we also required for openshift. we need to do perform some mount magic which we did for our centos iso to make sure it work - https://github.com/minishift/minishift-centos-iso/blob/master/scripts/handle-user-data#L38-L42

@LalatenduMohanty @hferentschik I tried to replicate same to same with b2d iso but looks like it not taking it as expected because of aufs file system (that's what my understanding).

EDIT: when I said what didn't work with aufs, it's bind mount which we did for centos iso. Changes which I added to automount script to replicate same with centos is below.

>>>>>
        mkdir -p /var/lib/origin
        mkdir -p /mnt/$PARTNAME/var/lib/origin
        mount --bind /mnt/$PARTNAME/var/lib/origin/ /var/lib/origin/
<<<<<
-- Creating host directories ... FAIL
   Error: cannot create volumes dir share
   Caused By:
     Error: Docker run error rc=1
     Details:
       Image: openshift/origin:v1.3.1
       Entrypoint: [/bin/bash]
       Command: [-c cat /rootfs/proc/1/mountinfo | grep /var/lib/origin/openshift.local.volumes | grep shared || nsenter --mount=/rootfs/proc/1/ns/mnt mount --make-shared /var/lib/origin/openshift.local.volumes]
       Error Output:
         mount: /var/lib/origin/openshift.local.volumes: Invalid argument
E0106 14:31:08.411023    5311 start.go:238] Error starting 'cluster up':  exit status 1

During this experiment I gave some thought and looks like what we can do use below command which will work across iso. we can create some meaningful directory like minishift and use that to store.

 ./minishift-linux start --vm-driver=virtualbox --iso-url=file:///home/prkumar/boot2docker-1.12.3.iso --cpus=4 --memory=9192 --use-existing-config --host-data-dir=/var/lib/minishift --host-config-dir=/var/lib/minishift

WDYT?

@praveenkumar I do not have any issue using /var/lib/minishift but I am not sure why /var/lib/boot2docker is not working as it seems /var/lib/minishift is also created in the same way. So not sure what is different between the two partitions.

@LalatenduMohanty I updated the comment what I wanted to say that bind mount didn't work but /var/lib/boot2docker have no issue.

So we can close this for the b2d ISO. There is nothing we need to do here.