#!/bin/bash



##################################################

# Adjust the MOUNTDIR variable to create the volumes

# based on the where our mount point will be located

# Ideally, these mountpoints should be located on different

# disk partitions for redundancy and preventing the

# root partition from being filled

##################################################



MOUNTDIR=/mnt



mkdir -p $MOUNTDIR/stelo/sqdr

mkdir -p $MOUNTDIR/stelo/sqdrplus

mkdir -p $MOUNTDIR/stelo/backups

mkdir -p $MOUNTDIR/data/home

mkdir -p $MOUNTDIR/data/db2

mkdir -p $MOUNTDIR/logs/db2



docker volume create --driver local -o o=bind -o type=none -o device=$MOUNTDIR/stelo/sqdr sq-config

docker volume create --driver local -o o=bind -o type=none -o device=$MOUNTDIR/stelo/sqdrplus sqplus-config

docker volume create --driver local -o o=bind -o type=none -o device=$MOUNTDIR/stelo/backups backups

docker volume create --driver local -o o=bind -o type=none -o device=$MOUNTDIR/data/home db2-home

docker volume create --driver local -o o=bind -o type=none -o device=$MOUNTDIR/data/db2 db2-data

docker volume create --driver local -o o=bind -o type=none -o device=$MOUNTDIR/logs/db2 db2-logs

