Use software Raid to make the most of your disk space
Installing Ubuntu
It is possible to set up a Raid device while installing Ubuntu, and then to
install the operating system onto this device. The only requirement is that one
partition is reserved for a small boot partition.
The installer found on the Live CD cannot perform this kind of installation, however; it currently lacks any advanced methods of installation. Instead you must use the ‘alternative’ installation CD, a text-based installation program based on the Debian distribution installer.
Installing in this way is a little more complicated than usual and I would strongly recommend that you try it out first in a virtual machine (using VirtualPC or VMware Server) or on a PC with disks that can be overwritten. It is easy to make mistakes if you are not completely sure of what you are doing, and these can be disastrous with disks that contain data.
But with that warning out of the way, we can look at an example installation. This is performed in VMware using two virtual drives. On a real PC the procedure would be identical.
After booting the alternative installation CD, the first partitioning screen will offer to set things up for you. Choose a manual installation, as this is the only way you can set up Raid. Next, you will see an overview screen with a list of the hard disks and their partitions. As this is a new PC, the disks are not partitioned.
After initialising the disks you can create regular partitions, which is the first step in creating a Raid system. The /boot partition is the first to set up, which only needs to be around 200MB. The filesystem for this partition should be set to ext3, and the mount point as /boot.
Next, two partitions must be created for the Raid array, one on each drive. Instead of setting the type to ext3 as before, set it to ‘physical volume for Raid’.
Each partition should be the same size, though the resulting partition number doesn’t matter; in our example one is /dev/sda5 and the other is /dev/sdb1. When the partitions are created and set up, a new option appears at the top of the overview screen, ‘Configure software Raid’.
Here you can create a new Raid device (or delete existing ones). Select the option to create a device and choose its type: Raid 0, 1, and 5 are offered. Choose level 0 for striping or 1 for mirroring; level 5 requires at least three disks.
The installer will now let you select which partitions to include in the new Raid device. In our example there are just two partitions available, so both are selected.
Now the Raid array is set up it becomes available in the partitioning overview screen, and can be treated like a typical partition. Set its type to ext3 and the mount point to ‘/’ (for the root filesystem).
With this done our setup is as follows: two 21GB partitions are set up for Raid 0, providing a single 42GB array. This is where the operating system is to be installed, so it is set to ext3 and the ‘/’ mount point. The actual disk partitions are shown at the bottom of the screen: a boot and Raid partition on one disk, and the other Raid partition and one for swap on the second disk.
Once everything is configured, you can proceed with the installation as normal.
Typical problems
The most important thing to consider when setting up Raid devices is that the
component partitions should always be on different disks. Linux will allow you
to create them on the same disks, but this will defeat the purpose; not only
will performance suffer, but you will not be protected from disk failures. If
you wish to set up a Raid 5 array, you will need three or more disks with a Raid
partition on each of them.
Another potential problem occurs when re-using existing disks. Information about the array is stored in the component partitions, so that the operating system can make sure the partitions are used correctly.
If a partition was previously used in a Raid system it may still contain this information, which can confuse the installer. Repartition the disk, or set the installer to remove existing arrays if you see this problem.
Finally, always remember to create a /boot partition when installing onto a Raid array. The installation may appear to complete successfully, but you will not be able to boot it unless this partition is set up properly.
Article tags
Related articles
Q.Why are some of the keys on my keyboard doing strange...
Q.Is my phone’s Bluetooth any use?
Q.Can I switch boot drives so that I can work on older...
St Helena, a 'small British village' in the mid-Atlantic, is seeking support and funding for a broadband connection
|
|
|
|
|
Computeractive Excel (2010) Online tutorialPrice: £19.99 |
Computeractive Word (2010) Online TutorialPrice: £19.99 |
Computeractive Powerpoint (2010) Online TutorialPrice: £19.99 |
Angry BirdsPrice: £9.99 |
Back Issue CD-Rom 14 (2011)Price: £15.99 |