CentOS 5.5 installation on SSD and RAID 5

technology: 

My test machine has an SSD, Solid State Disk, for the system disk and three identical disks for a RAID 5 array. I want to use Webmin and Webmin recommends CentOS 5 for the operating system. Here is a run through a CentOS 5 installation in preparation for use with Webmin and for many other uses.

Installation considerations

The latest version of CentOS is 5.5 so I will use 5.5 instead of 5. CentOS 5.5 should set up exactly the same configuration as CentOS 5.

Other distributions

CentOS is way behind some other Linux distributions because CentOS is based on Red Hat. Red Hat try out the latest software in Fedora for months or years before moving it into Red Hat. Fedora should create exactly the same configuration as CentOS and work with the same applications plus give you updated device drivers for your new computer.

RAID configuration

A three disk RAID 5 array gives you the reliability of RAID 5 and the storage capacity of two disks, with the third used as an active spare in case of failure. When you use RAID 5, replace a broken disk quickly in case a second disk fails before you replace the first broken disk.

You can use multiple spare disks with RAID 5 and it is called RAID 6 instead of RAID 5. When you create RAID 5 in CentOS, it lets you specify one or more spare disks.

RAID works with partitions, not disks. I buy identical disks, create one large primary partition on each disk, and connect the partitions in RAID. Occasionally you get disks with the same model number and a slightly different revision number that have different sizes. A really good RAID setup program would let you point to all the disks and create identical partitions automatically. CentOS does not do that.

If you are mixing disks of similar sizes and performance from different manufacturers, allocate the largest partition on each disk then look for the smallest one and change the partitions on the other disks to match the smallest one.

My test machine can hold six disks plus an SSD and could be used as RAID 6 with four storage disks and two spares. I prefer to stick with RAID 5 and have a completely separate backup computer.

Backup your disks

This installation is on one of my test machines. There is nothing on any of the disks that I need. I can delete everything and start from the beginning. You will wipe everything off the disks when testing the installation options. If you have anything on your disks that you want to keep, copy the data from the disks to somewhere else before starting this process.

Download CentOS

CentOS 5.5 is downloaded as 8 CDs. You cannot tell which CDs you will need until you start the installation process. Download disk 1 of 8. During the installation process, CentOS will list the other CDs you need. You can then download only the ones you need.

Here is the full list of CDs:

File Date Size
CentOS-5.5-x86_64-bin-1of8.iso 04-May-2010 12:21 623M
CentOS-5.5-x86_64-bin-2of8.iso 04-May-2010 12:21 587M
CentOS-5.5-x86_64-bin-3of8.iso 04-May-2010 12:21 634M
CentOS-5.5-x86_64-bin-4of8.iso 04-May-2010 12:22 633M
CentOS-5.5-x86_64-bin-5of8.iso 04-May-2010 12:22 634M
CentOS-5.5-x86_64-bin-6of8.iso 04-May-2010 12:22 627M
CentOS-5.5-x86_64-bin-7of8.iso 04-May-2010 12:22 624M
CentOS-5.5-x86_64-bin-8of8.iso 04-May-2010 12:22 242M

I needed 1, 2, 3, 4, 5, and 8. 8 was a waste, installing just one tiny system utility that should be up in disk 1 for installation on every computer. 5 installed only Thunderbird and I do not need Thunderbird on this computer. I selected Thunderbird mainly to prepare this computer for use as a possible backup in an emergency. Looking back, the version of Thunderbird in CentOS 5.5 is obsolete. I could leave it out, save a CD, then perform a separate install of a current version.

Boot from CD

Change your computer BIOS to allow booting from CD then load the CD and boot from CD.

Part of CentOS will load and display an image followed by coloured text on a black background. To install or upgrade in graphical mode, press the key.

Black screen

You get a black screen with meaningless white text. If the installation process stops here, panic because it means Linux cannot recognise your hardware.

When Linux fails to recognise basic hardware, it usually means you have new hardware and need a new version of Linux. I do not mean Dell style new, where you may receive a freshly manufactured computer using old designs and components, I mean hardware that has chips and components of a new design. For new Linux, read Fedora and Ubuntu. Fedora is the test version of the Red Hat Linux used to make CentOS. Fedora is from three to twelve months ahead of CentOS.

Blue screen

You then get a blue screen with messages about installing SCSI software. That is the software needed to read the CD and the disks.

If you get past this point, you have only one remaining obstacle, connecting to the network. If the network connection also works, you can usually download from the Internet anything you need to fix remaining problems.

CD Found

Select [OK] to test the media the first time then mark the media as tested.

You can run the media test on any computer. If you download all the CentOS CDs before starting this installation process, run the media check on all disks.

Media Check

[Test]

Media Check Result

The CD is ok. Select [OK] to continue.

Media Check

[Continue]

White screen

Next is a proper graphical interface. Select [Next] to continue.

The CD is ok. Select [OK] to continue.

Language

What language would you like to use during the installation process?
Select English then [Next].

Keyboard

Select the appropriate keyboard for your system.
Select U.S. English then [Next].

Partition disk

Installation requires partitioning of your hard drives.

The first time around, you can use the default of deleting all the partitions and creating a default layout. This will give you an idea of what size partitions you will need when you create your own.

The default layout is as follows.
The 64 GB SSD is /dev/sda and contains two partitions:

Device Mount point Type Format Size Start End
/dev/sda1 /boot Ext3 yes 101 MB 1 13
/dev/sda2 VolGroup00 LVM PV yes 60949 14 7783

The three 2 TB disks all have one partition:

Device Mount point Type Format Size Start End
/dev/sdb1 VolGroup00 LVM PV yes 1907726 1 243201
/dev/sdc1 VolGroup00 LVM PV yes 1907726 1 243201
/dev/sdd1 VolGroup00 LVM PV yes 1907726 1 243201

The LVM space is divided into two partitions:

Device Mount point Type Format Size Start End
LogVol00 / ext3 yes 5778368
LogVol01 swap 5696

Now we know what CentOS installs, we can delete it and install something useful.

Start by defining a 200 MB boot partition on the SSD. Make it and all the following partitions primary partitions. The 200 MB will be rounded down to 196 MB, or similar, based on the disk geometry. The stupid thing is, SSDs do not need the rounding down.

Create an 8 GB swap partition. A swap partition about the same size as real memory should be adequate. Normally I put the swap after the system partition on a magnetic disk. It does not matter on an SSD.

Fill the rest of the disk with a standard system partition.

You should now have something like the following partition layout on the system disk.

Device Mount point Type Format Size Start End
/dev/sda1 /boot Ext3 yes 196 MB 1 25
/dev/sda2 swap 8001 MB 25 1045
/dev/sda3 / Ext3 yes 52854 1046 7783

Create one RAID partition on each of the remaining disks:

Device Mount point Type Format Size Start End
/dev/sdb1 software RAID yes 1907726 1 243201
/dev/sdc1 software RAID yes 1907726 1 243201
/dev/sdd1 software RAID yes 1907726 1 243201

Create one RAID 5 partition using the three software RAID partitions. Make the partition the home drive so all your user data and Web sites will be on the RAID partition.

Device Mount point Type Format Size Start End
/dev/md0 /home ext3 yes 3815453

Boot loader

The GRUB boot loader will be installed on /dev/sda.
You need a boot loader somewhere. Normally the start up sequence starts with the BIOS reading the Master Boot Record from the first sector of the disk then the boot code defined in the MBR and the boot code is in the /boot partition created as /dev/sda1 in our configuration. The CentOS page says the boot loader points to /dev/sda3, the system partition. I think that bit is referring to the operating system to be loaded from the boot loader.

Network devices

Modern computers have at least one network adapter. Linux should find it and define it as eth0. If the network connection is not found, the connection is probably blocked by your router. Look in your router to make sure the router is allocating an IP address for your computer.

No idea what the network terms mean? Your network adapter has a special code in it called a MAC. Your network controller, usually a router but may have other names, is the device that connects your computers together and to the Internet. The router sees the MAC and gives the MAC an IP address. You need the IP address to talk across the network.

Routers start by automatically allocating IP addresses to MACs. You can then limit automatic allocation to stop other people plugging into your network. This is not a big problem when you have a small wired network. A large wired network could connect into unused rooms and cleaning staff could be in their downloading stuff. Weird things happen when you do not control networks.

Normally you switch off automatic IP address allocation after the first few computers then you manually allocate an address for the MAC in each new computer. You then know the only connections are the ones you want.

Select [Next].

Time zone

Choose a region, mine is Australia/Sydney, then select [Next].

Administration user

The administration login is called the root user. Enter a password for the root user then select [Next].

Select software

You can choose some general software categories from the following list.
[*] Desktop - Gnome
[ ] Desktop - KDE
[*] Server
[*] Server - GUI
[ ] Virtualization
[ ] Clustering
[ ] Storage clustering

You can select additional repositories for extra software and we will use only what is on the downloaded CDs.

You can use the defaults from each category or customise the selection. Choose Customize now then [Next].

Select software packages

The Customize now option lets you see and change all the individual packages to be installed. Tou select a category on the left, a group on the right, then select the options button to see the specific packages for that group within the category. You then repeat for each group within each category.

You find out a few things. Many of the packages are obsolete. For instance, the current version of PHP is 5.3, 5.2 is still available for use with very old code, but CentOS 5.5 still ships PHP 5.1.

CentOS is based on Red Hat Linux. Fedora is the modern replacement for Red Hat. CentOS should use the versions of PHP, Firefox, and Thunderbird from Fedora.

Required Install Media

The software you have selected to install will require the following CDs: 1, 2, 3, 4, 5, 8.
Select [Continue].

Reboot

You remove the last CD then reboot. The reboot will take you into the final graphical form of CentOS using the full Linux Gnome interface.

Welcome

Select [Forward] to continue.

Firewall

I disable the firewall on this computer because it is behind the firewall in the router. Individual access to disk files is separately controlled by the other services. Select [Forward].

SELinux

SELinux is an enhancement to the Linux security system in an attempt to make Linux secure for things other than basic servers. SELinux causes great pain because it tries to keep compatibility with the basic Unix style security of regular Linux and it implements rules that few people understand, including many of the people creating the rules.

You get all sorts of application failures from SELinux not allowing applications do what they are supposed to do. I will try SELinux one more time in the hope that the security problems are removed for the applications I use.

Select [Forward].

Kdump

I never use Kdump. You only need it for versions of Linux with new software. Leave it switched off. Select [Forward].

Date and time

Set the NTP protocol to get the correct date and time then select [Forward].

Create user

Enter a user name and a password then select [Forward].

Sound card

Test your sound card here if you have speakers or headphones plugged in. Select [Forward].

Additional CDs

We are not using additional CDs. For the small amount of extra software needed, we will download form the Internet. Select [Finish].

Login

Login with your user id.

You will see a message about package updates. There were 78 when I logged in. The CentOS package updater gives absolutely no indication of the importance of the updates or their size.

Ubuntu is way ahead in this area, listing security updates first and showing the size of every download. You can choose to leave non security updates for another day. The choice is important when you work on an expensive wireless connection and have the option of returning to a less expensive wired connection back in your office.