#!/bin/sh

##
## $Id: CreateVolume.sh,v 1.1.2.2 2003/05/23 17:59:48 seth Exp $
##

#######################################################################
## Copyright (c) 2002, 2003 by EqualLogic, Inc.
##
## All rights reserved.  This software may not be copied, disclosed,
## transferred, or used except in accordance with a license granted
## by EqualLogic, Inc.  This software embodies proprietary information
## and trade secrets of EqualLogic, Inc.
#######################################################################

if [ $# -ne 2 ]; then
   echo "usage: $0 volume_name volume_size";
   exit 1;
fi

MYDIR=$(dirname $0)

volName=$1;
volSize=$2;

echo "Creating volume $volName, size $volSize";

output=`echo "mypass" | ${MYDIR}/../EqlCliExec.pl -g mygroup -a myaccount vol cre $volName $volSize`

if [ $? -ne 0 ]; then
   echo "create volume '${volName}/${volSize}' failed: $output"
   exit 1;
fi

echo "volume ${volName} created successfully"
exit 0
