Skip to content

Commit

Permalink
volume script updates
Browse files Browse the repository at this point in the history
  • Loading branch information
wardviaene committed Jun 22, 2018
1 parent f01567a commit 376dd05
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docker-demo-3/scripts/jenkins-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ if [ "`echo -n $DEVICE_FS`" == "" ] ; then
DEVICEEXISTS=''
while [[ -z $DEVICEEXISTS ]]; do
echo "checking $DEVICENAME"
DEVICEEXISTS=`ls -asl /dev/disk/by-uuid/ | grep "$DEVICENAME"`
if [[ -z $DEVICEEXISTS ]]; then
DEVICEEXISTS=`lsblk |grep "$DEVICENAME" |wc -l`
if [[ $DEVICEEXISTS != "1" ]]; then
sleep 15
fi
done
pvcreate ${DEVICE}
vgcreate data ${DEVICE}
lvcreate --name volume1 -l 100%FREE data
mkfs.ext4 /dev/data/volume1
pvcreate ${DEVICE}
vgcreate data ${DEVICE}
lvcreate --name volume1 -l 100%FREE data
mkfs.ext4 /dev/data/volume1
fi
mkdir -p /var/lib/jenkins
echo '/dev/data/volume1 /var/lib/jenkins ext4 defaults 0 0' >> /etc/fstab
Expand Down

0 comments on commit 376dd05

Please sign in to comment.