diff options
| author | Andrew Tridgell <tridge@samba.org> | 2008-07-07 16:12:07 +1000 |
|---|---|---|
| committer | Andrew Tridgell <tridge@samba.org> | 2008-07-07 16:12:07 +1000 |
| commit | a74b60b4f5f3abe7c8b5b63685f2234d48c59c87 (patch) | |
| tree | e9272bf0f1b7bbb64754dae14027698ae1c32761 /create_node.sh | |
| parent | a68b3193d429b2f979c5e73bc44d4e11b2118560 (diff) | |
make it possible to have more than 1 cluster on a machine
Diffstat (limited to 'create_node.sh')
| -rwxr-xr-x | create_node.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/create_node.sh b/create_node.sh index 10db1e8..03753d8 100755 --- a/create_node.sh +++ b/create_node.sh @@ -12,24 +12,24 @@ CLUSTER="$1" NODENUMBER="$2" NUMNODES=4 NAME="$CLUSTER""n$NODENUMBER" -BASE="/virtual/$BASENAME.img" -DISK="/virtual/$CLUSTER/$NAME.qcow2" +BASE="$VIRTBASE/$BASENAME.img" +DISK="$VIRTBASE/$CLUSTER/$NAME.qcow2" NUMSHARED=3 # first node needs more memory for SoFS GUI if [ $NODENUMBER = 1 ]; then - MEM=1024000 + MEM=$GUIMEM fi echo "Creating cluster node $NAME" -mkdir -p /virtual/$CLUSTER +mkdir -p $VIRTBASE/$CLUSTER echo "Creating the disk" rm -f "$DISK" qemu-img create -b "$BASE" -f qcow2 "$DISK" || exit 1 -IPBASE=`expr 10 + $NODENUMBER` +IPNUM=`expr $FIRSTIP + $NODENUMBER` mount_disk $DISK setup_base @@ -65,15 +65,15 @@ cat<<EOF > tmp/$NAME.xml <target dev='sda' bus='scsi'/> </disk> <disk type='file' device='disk'> - <source file='/virtual/$CLUSTER/shared1'/> + <source file='$VIRTBASE/$CLUSTER/shared1'/> <target dev='sdb' bus='scsi'/> </disk> <disk type='file' device='disk'> - <source file='/virtual/$CLUSTER/shared2'/> + <source file='$VIRTBASE/$CLUSTER/shared2'/> <target dev='sdc' bus='scsi'/> </disk> <disk type='file' device='disk'> - <source file='/virtual/$CLUSTER/shared3'/> + <source file='$VIRTBASE/$CLUSTER/shared3'/> <target dev='sdd' bus='scsi'/> </disk> <interface type='network'> |
