3
# Verify default partitioning has used the entire local hard disk.
4
# Please remove any non-local attached storage prior to running this
8
echo "Checking maximum disk space available on : $disk"
10
psize=`parted -l | grep $disk | awk '{print $3}'`
14
echo "Disk space available : $psize"
16
fsizes=`df -B ${psize:(-2)} | grep $disk | awk '{print $2}'`
20
echo "Disk space used : $fsizes"
24
i=`echo $i | grep -oe '[0-9\.]*'`
25
fsize=$(($fsize + $i))
28
psize=`echo $psize | grep -oe '[0-9\.]*'`
29
pct_difference=`awk "BEGIN{print(($psize - $fsize) / $fsize)}"`
30
echo "Difference ( > 0.15 fails ) : $pct_difference"
31
awk "BEGIN{exit($pct_difference > 0.15)}" || exit 1