1. For software raid on multipath disks, setup sda,sdb,sdc,sdd to the default bootup device. 2. For software raid, setup sda,sdb to be the default bootup device. 3. For multipath disks without raid, setup sda,sdb as the default bootup device.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10151 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
46968801ca
commit
20ddf5b275
@ -25,15 +25,40 @@ if [[ $OS = "Linux" ]]; then
|
||||
|
||||
BOOTDEVICE=`echo $BOOTENTRY | awk '{print $1}'`
|
||||
|
||||
if [[ -f /sbin/multipath ]] ; then
|
||||
MPATH=`/sbin/multipath -ll`
|
||||
fi
|
||||
|
||||
#software raid, assume sda and sdb
|
||||
if echo $BOOTDEVICE | grep "md"
|
||||
then
|
||||
if echo $MPATH | grep "sdc"
|
||||
then
|
||||
if echo $MPATH | grep "sdd"
|
||||
then
|
||||
logger -t xcat setbootfromdisk: Setting sda sdb sdc sdd to be the default bootup device
|
||||
echo "setbootfromdisk: setting up sda sdb sdc sdd to be the default bootup device"
|
||||
bootlist -m normal sda sdb sdc sdd
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
logger -t xcat setbootfromdisk: Setting sda sdb to be the default bootup device
|
||||
echo "setbootfromdisk: setting up sda sdb to be the default bootup device"
|
||||
echo "setbootfromdisk: setting up sda sdb to be the default bootup device for software raid"
|
||||
bootlist -m normal sda sdb
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if echo $MPATH | grep "sda"
|
||||
then
|
||||
if echo $MPATH | grep "sdb"
|
||||
then
|
||||
logger -t xcat setbootfromdisk: Setting sda sdb to be the default bootup device
|
||||
echo "setbootfromdisk: setting up sda sdb to be the default bootup device"
|
||||
bootlist -m normal sda sdb
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -z $BOOTDEVICE ]]; then
|
||||
logger -t xcat setbootfromdisk: cannot find the booting device
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user