diff --git a/xCAT-server/share/xcat/ib/scripts/configiba.1port b/xCAT-server/share/xcat/ib/scripts/configiba.1port index a00b529c5..17663d2ab 100755 --- a/xCAT-server/share/xcat/ib/scripts/configiba.1port +++ b/xCAT-server/share/xcat/ib/scripts/configiba.1port @@ -47,7 +47,7 @@ then echo 'options ib_ehca nr_ports=1' >> /etc/modprobe.conf echo 'options ib_ehca lock_hcalls=0' >> /etc/modprobe.conf fi - /sbin/chkconfig --level 2345 $ib_driver on + /sbin/chkconfig --level 2345 $ib_driver on > /dev/null 2>&1 /sbin/service $ib_driver restart sysctl -p @@ -88,6 +88,7 @@ else while [ $num -lt $loop_number ] do `rmdev -d -l ib$num >/dev/null 2>&1` + `rmdev -d -l iba$num >/dev/null 2>&1` n=`expr $num % 2` if [ $n == 1 ] then @@ -96,7 +97,9 @@ else fi num=`expr $num + 1` done - + `rmdev -dl icm >/dev/null 2>&1` + mkdev -c management -s infiniband -t icm + cfgmgr loop_number=`lsdev -Cc adapter |grep iba |wc -l` fi @@ -116,8 +119,10 @@ do if [ $NODE ] then hostname="$NODE-$nic" + shortname=$NODE else hostname="$HOST-$nic" + shortname=$HOST fi `ifconfig $nic up` if [ $PLTFRM == "Linux" ] @@ -172,24 +177,25 @@ GATEWAY=$gateway" > $dir/ifcfg-$nic fi elif [ $PLTFRM == "AIX" ] then - lsdev -C | grep icm | grep Available - if [ $? -ne 0 ] - then - mkdev -c management -s infiniband -t icm - if [ $? -ne 0 ] - then - mkdev -l icm - if [ $? -ne 0 ] - then - exit $? - fi - fi - fi + #lsdev -C | grep icm | grep Available + #if [ $? -ne 0 ] + #then + # mkdev -c management -s infiniband -t icm + # if [ $? -ne 0 ] + # then + # mkdev -l icm + # if [ $? -ne 0 ] + # then + # exit $? + # fi + # fi + #fi #Configure the IB interfaces. Customize the port num. iba_num=$num ib_adapter="iba$iba_num" port=1 + chdev -l $ib_adapter -a hostname=$shortname mkiba -a $ip -i $nic -A $ib_adapter -p $port -P -1 -S up -m $netmask fi fi diff --git a/xCAT-server/share/xcat/ib/scripts/configiba.2ports b/xCAT-server/share/xcat/ib/scripts/configiba.2ports index 4e78028c2..499f8419d 100755 --- a/xCAT-server/share/xcat/ib/scripts/configiba.2ports +++ b/xCAT-server/share/xcat/ib/scripts/configiba.2ports @@ -42,7 +42,7 @@ then sed -i "/options ib_ehca lock_hcalls/d" /etc/modprobe.conf echo 'options ib_ehca lock_hcalls=0' >> /etc/modprobe.conf fi - /sbin/chkconfig --level 2345 $ib_driver on + /sbin/chkconfig --level 2345 $ib_driver on > /dev/null 2>&1 /sbin/service $ib_driver restart sysctl -p @@ -85,11 +85,15 @@ else num0=`expr $num \* 2` num1=`expr $num0 + 1` `rmdev -d -l ib$num0 >/dev/null 2>&1` + `rmdev -d -l iba$num0 >/dev/null 2>&1` `rmdev -d -l ib$num1 >/dev/null 2>&1` + `rmdev -d -l iba$num1 >/dev/null 2>&1` `rmdev -d -l ml$num >/dev/null 2>&1` num=`expr $num + 1` done - + `rmdev -dl icm >/dev/null 2>&1` + mkdev -c management -s infiniband -t icm + cfgmgr ib_number=`lsdev -Cc adapter |grep iba |wc -l` loop_number=`expr $ib_number \* 2` @@ -109,8 +113,10 @@ do if [ $NODE ] then hostname="$NODE-$nic" + shortname=$NODE; else hostname="$HOST-$nic" + shortname=$HOST; fi `ifconfig $nic up` if [ $PLTFRM == "Linux" ] @@ -180,19 +186,19 @@ GATEWAY=$gateway" > $dir/ifcfg-$nic fi elif [ $PLTFRM == "AIX" ] then - lsdev -C | grep icm | grep Available - if [ $? -ne 0 ] - then - mkdev -c management -s infiniband -t icm - if [ $? -ne 0 ] - then - mkdev -l icm - if [ $? -ne 0 ] - then - exit $? - fi - fi - fi + #lsdev -C | grep icm | grep Available + #if [ $? -ne 0 ] + #then + # mkdev -c management -s infiniband -t icm + # if [ $? -ne 0 ] + # then + # mkdev -l icm + # if [ $? -ne 0 ] + # then + # exit $? + # fi + # fi + #fi #Configure the IB interfaces. Customize the port num. @@ -204,6 +210,7 @@ GATEWAY=$gateway" > $dir/ifcfg-$nic else port=2 fi + chdev -l $ib_adapter -a hostname=$shortname mkiba -a $ip -i $nic -A $ib_adapter -p $port -P -1 -S up -m $netmask fi fi