ks pre script to determine hw raid drive to install to

Rodney Mercer rmercer at harris.com
Thu Feb 12 18:42:41 UTC 2009


I just purchased a Sun Fire X2250 rack mounted server to use as a build
machine. I have set it up to use the built in hardware raid to mirror
the two 250 GB disks. I am using RHEL 5 update2 X86_64.

On our normal Dell desktops we don't use a raid configuration.

So to install via pxeboot, I setup my generic kickstart config file to
use a pre script that includes:
----
# Determine how many drives we have and use the first drive only.
set $(list-harddrives)
let numd=$#/2
d1=$1
d2=$3

cat << EOF > /tmp/part-include
bootloader --location=mbr --driveorder=$d1 --append="apic rhgb quiet"
clearpart --all
zerombr
part /boot --fstype ext3 --size=100 --ondisk=$d1
part / --fstype ext3 --size=1000 --grow --ondisk=$d1
part /usr --fstype ext3 --size=4000 --grow --ondisk=$d1
part /var --fstype ext3 --size=1000 --grow --ondisk=$d1
part /tmp --fstype ext3 --size=250 --grow --ondisk=$d1
part /usr1 --fstype ext3 --size=10000 --grow --ondisk=$d1
part swap --size=1000 --grow --maxsize=2000 --ondisk=$d1

EOF
-----

This setup works great on the non hardware raid machines. With the
raided Sun Fire X2250, it fails to determine the device name of the
raided Volume but sees the individual disks, /dev/sda and /dev/sdb.

Of course it fails the partition. Commenting out the part directives
shows me that raided volume name is /dev/mapper/isw_dficaggeej_Volume0.

If I hardcode "d1=isw_dficaggeej_Volume0" and restore the part
directives, the install completes without a problem.

Does anyone know how to have the pre script recognize the hardware
mirrored device volume name and use it automatically?

Thanks in advance.

Rodney Mercer.

Nobody said computers were going to be polite.




More information about the Kickstart-list mailing list