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.
$ mkdir /tmp/a
$ cd /tmp/a
$ wget --quiet http://www.areca.us/support/s_linux/driver/rhel/6_0.zip
$ unzip 6_0.zip
Archive: 6_0.zip
creating: 6_0/
inflating: 6_0/install.zip
inflating: 6_0/README.txt
$ mkdir /tmp/b
$ cd /tmp/b
$ unzip /tmp/a/6_0/install.zip
Archive: /tmp/a/6_0/install.zip
inflating: driver.img
$ ls -l driver.img
-rw-r--r-- 1 erik users 1474560 2011-05-09 10:48 driver.img
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
%pre --log=/tmp/kspre.log
#!/bin/sh
cd /tmp
wget http://example.com/driver.img
mkdir /arcmsr
mount -o loop driver.img /arcmsr
cd /arcmsr
sh ./pre-install.sh
sleep 5
dd if=/dev/zero of=/dev/sda bs=512 count=64
parted -s /dev/sda mklabel gpt
%end
The sleep 5
was necessary as otherwise the parted -s /dev/sda mklabel gpt
would fail like this
# parted -s /dev/sda mklabel gpt
Error: Can't have the end before the start! (start sector=34 length=-3)
Error: Can't have overlapping partitions.
Error: Can't have overlapping partitions.
We 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
%post --nochroot --log=/mnt/sysimage/root/ks-post1.log
cp -r /tmp /mnt/sysimage/root/tmp
mkdir /mnt/sysimage/tmp/arcmsr
cp -r /arcmsr/* /mnt/sysimage/tmp/arcmsr
%end
%post --log=/root/ks-post2.log
cd /tmp/arcmsr
sh ./post-install.sh
%end
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
bootloader --location=mbr
clearpart --linux --drives=sda
part /boot --fstype=ext4 --size=8192
part pv.01 --grow --size=1
volgroup vg0 --pesize=4096 pv.01
logvol swap --name=lv_swap --vgname=vg0 --size=65536
logvol / --fstype=ext4 --name=lv0 --vgname=vg0 --grow --size=1024
The mailing list post by Joshua Daniel Franklin says one should avoid having zerombr
or clearpart --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
[user@server ~]$ cat /proc/meminfo |grep SwapTotal
SwapTotal: 67108856 kB
[user@server ~]$ df -m
Filesystem 1M-blocks Used Available Use% Mounted on
/dev/mapper/vg0-lv0 8256978 828 7836720 1% /
tmpfs 12012 0 12012 0% /dev/shm
/dev/sda1 8064 194 7460 3% /boot
Although, email settings can be edited in the Controller web interface (here chosen to be TCP port 80), that doesn't seem to work. Instead you should edit the email settings in the Cfg Assistant web interface (here chosen to be TCP port 81). Create a ssh tunnel to your server
[user@desktop ~]$ ssh -N -L 8081:localhost:81 root@server.example.com
Note, that you then need to open the URL http://localhost:8081 in a Firefox web browser. The latest Chromium web browser (as of August 2011) will just show you a blank screen.
Instead of configuring the email settings through a web browser it is also possible to manually edit the file archttpsrv.conf and have it located in the current working directory from where you start archttp64. The file could look like this
[GENERAL]
BindingIp=127.0.0.1
HTTPPort=80
SMTPPort=25
ScanPci=YES
ScanRs232=NO
ScanInband=NO
[MAIL]
Server=130.237.98.104
Sender=arecaraid
SenderMail=arecaraid@example.com
Account=
Password=
MailToName1=arecaraid
MailToName2=
MailToName3=
MailToName4=
MailAddr1=arecaraid@example.com
MailAddr2=
MailAddr3=
MailAddr4=
EvtLevel=4
NotifyForNoEvent=YES
where Server
is the SMTP server
Best Answer
The FAQ answer Q10120906 on the Areca home page talked about a similar problem for ARC-1210. As the suggestion was to "remove battery module to clear the data remain in cache", I unplugged the 2 power cables from the computer and opened up the computer case.
There was a small cable connecting the Areca Battery Backup Module to the Areca 1880i card. I disconnected this cable and waited 30 seconds and then reconnected it again.
This fixed the problem. At the next boot, the Areca 1880i card initialized normally.
After waiting about 10 seconds for this message
this message was shown
I could then proceed with the kickstart installation of the computer.