I have a server with this hardware
- two Intel Xeon E5620 CPUs
- Areca 1880i 8-port SAS RAID PCIe 512MB cache
- Areca Battery Backup Module
- 5 pcs Hitachi Deskstar 7K3000 HDS723030ALA640 64MB 3TB
and have created one RAID 6 volume that makes use of all the 5 hard drives.
Unfortunately there is no support for the Areca 1880i RAID card in the Linux kernel on the CentOS 6.0 installation image. There is though an updated kernel module available on the Areca web site (both as a precompiled binary for RHEL 6.0 and as source code).
How do I write a kickstart script to automate the installation of CentOS 6.0 on the server?
Update: Good news! CentOS 6.2 has support for Areca 1880i. When I upgraded to CentOS 6.2 by doing "yum -y update", the new kernel had native support for Areca 1880i. I haven't tested a CentOS 6.2 kickstart installation though, but I guess that should work too.
In a %pre section of the kickstart script we need to run the pre-install.sh script that loads the updated binary kernel module (arcmsr) with /sbin/insmod. After that the kickstart installation has access to the hard drive that the Areca 1880i raid card presents to the computer and can thus partition and create file systems on it. In a %post section of the kickstart script we need to run the post-install.sh script that installs the updated binary kernel module into /mnt/sysimage/lib/modules/ and then runs /sbin/mkinitrd so that the server will be able to boot after the installation.
The precompiled kernel module found at the Areca web page is packaged as a ZIP archive
http://www.areca.us/support/s_linux/driver/rhel/6_0.zip
but the unzip command is not available during the %pre section of a Centos 6.0 kickstart installation. Therefore we unzip the archive in advance.
Now put the file driver.img on some internal web server. In this example the file will be available as http://www.example.com/driver.img but you need to adjust this URL in your own kickstart script. Here is what you write in the %pre section
The
sleep 5
was necessary as otherwise theparted -s /dev/sda mklabel gpt
would fail like thisWe need to create a GUID Partition Table (GPT) because the raid card presents the RAID 6 volume as a 9 Tb hard drive to the computer. 9 Tb is bigger than the maximum 2 Tb that can be handled by a normal partition table.
The idea to use GPT came from a mailing list post by Joshua Daniel Franklin.
In a %post section of the kickstart script we first copy some of the installation files into /mnt/sysimage as they need to be available when we later run commands after a chroot into /mnt/sysimage
Note, that we need to have two %post sections, the first one without chroot and the second one with chroot into /mnt/sysimage. First I tried to
/usr/sbin/chroot /mnt/sysimage
inside a non-chroot %post section but that didn't work.The partitioning scheme for the server could look like this
The mailing list post by Joshua Daniel Franklin says one should avoid having
zerombr
orclearpart --all
in the kickstart file as otherwise the GPT we created in the %pre section would be overwritten.After installation the server looks like this