Skip to content

Commit

Permalink
Issue #82 Create bind mount for to persistent volume
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenkumar authored and LalatenduMohanty committed May 10, 2018
1 parent 22d2ecb commit 7d305dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions iso/scripts/automount
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BOOT2DOCKER_DATA=`blkid -o device -l -t LABEL=$LABEL`
echo $BOOT2DOCKER_DATA
if [ ! -n "$BOOT2DOCKER_DATA" ]; then
echo "Is the disk unpartitioned?, test for the 'boot2docker format-me' string"

# Is the disk unpartitioned?, test for the 'boot2docker format-me' string
UNPARTITIONED_HD=`fdisk -l | grep "doesn't contain a valid partition table" | head -n 1 | sed 's/Disk \(.*\) doesn.*/\1/'`

Expand Down Expand Up @@ -124,11 +124,15 @@ if [ -n "$BOOT2DOCKER_DATA" ]; then
mkdir -p /mnt/$PARTNAME/var/lib/boot2docker
mkdir -p /var/lib/boot2docker
mount --bind /mnt/$PARTNAME/var/lib/boot2docker /var/lib/boot2docker

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

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

mkdir -p /mnt/$PARTNAME/data
ln -s /mnt/$PARTNAME/data /data

Expand Down
2 changes: 1 addition & 1 deletion tests/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function verify_nfs_installation() {

function verify_bind_mount() {
output=`$BINARY ssh 'mount | grep /dev/sda1 | grep /var/lib/ | wc -l'`
assert_equal $output "5"
assert_equal $output "6"
print_success_message "Bind mount check"
}

Expand Down

0 comments on commit 7d305dd

Please sign in to comment.