The basic parameters of the old server:
- 2 x Intel(R) Xeon(TM) CPU 2.40GHz
- 4G Memory
- Adaptec (formerly DPT) SmartRAID V Controller
- 6x 36704 MB SCSI disks
- Intel Corporation 82545EM Gigabit Ethernet Controller
- ATAPI 52X CD-ROM drive
0. Make a RAID5 array
Before installation, we use SmartRAID Storage Manager to make a RAID5 array using 5 SCSI disks, and leave 1 SCSI disk as HotSpare.
1. Choose installation media
We have downloaded a Centos 5.1 DVD ISO. But the machine has no DVD-ROM. We make a USB boot disk using images/diskboot.img, but the server can't boot. We have to burn a bootable CD-ROM using images/boot.iso. On the other Linux machine, we mount CentOS 5.1 DVD ISO under a directory of the Apache HTTP server. We will boot the machine by the bootable CD-ROM and choose HTTP installation media.
2. Boot, load RAID drivers
Boot the machine, choose HTTP installation media, configure network parameters and HTTP server addresses. The installation process now enters the graphical interface. But if we click 'Next' on the screen now, the installation process will not recognize any hard disks. This is because: CentOS does not put SmartRAID V drivers into the kernel used in installation process.
The method to solve this problem is: on the other Linux machine, unpack CentOS/kernel-2.6.18-53.el5.i686.rpm, copy the following two drivers
to some directory of the Apache HTTP server so that the machine can see them through HTTP.
Then, in the graphical interface of installation, press Ctrl-Alt-F2 to switch to command line, use 'wget' to get the above two drivers, execute the commands:
It may cause some minutes when loading i2o_scsi.ko.
# insmod i2o_block.ko
# insmod i2o_scsi.ko
After that, press Ctrl-Alt-F6 to switch back to the graphical interface, click 'Next' to proceed. A popup may appear, which says something like:
Error opening /dev/sda: No such device or addressDon't care, click 'Cancel' to ignore it. At this time, the installation process will recognize the RAID5 array as /dev/i2o/hda successfully. We can follow normal steps to install the OS itself.
(In the partitioning step, using LVM may cause trouble - after installation, the boot process of the new system will be extremely slow, almost dead. We don't know the reason yet. After times of failure, we choose to create custom layout, do not use LVM, the boot process afterwards goes smoothly.)
3. Make initrd
After all packages are installed, do not click 'Reboot' right now. Since 'i2o_block.ko' and 'i2o_scsi.ko' are not included in the default kernel's initrd file, the boot prcess will not recognize our RAID5 array.
At the last stage of the graphical interface of installation, press Ctrl-Alt-F2 to switch to command line, execute the commands:
Then, press Ctrl-Alt-F6 to switch back to the graphical interface, click 'Reboot' to reboot the system.
# chroot /mnt/sysimage /bin/bash
# /sbin/mkinitrd -f --preload=i2o_block --preload=i2o_scsi /boot/initrd-2.6.18-53.el5PAE.img 2.6.18-53.el5PAE
Every time we upgrade the kernel, we should execute the 'mkinitrd' command to rebuild the initrd file, including 'i2o_block' and 'i2o_scsi' modules in it.
If you load both i2o_block and i2o_scsi, then the CentOS installer will see both /dev/i2o/hda and the individual /dev/sda and so on.ReplyDelete
I found that by only using i2o_block, the individual scsi devices would remain obfuscated from the OS, preventing accidental damage to the RAID container.
This is a really cool thing guys. Thank you and regards from GermanyReplyDelete