Simple clear advice in plain English

Maximise your hard disk's potential in Ubuntu

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

Reader Comments

   

Add your comment

All fields must be completed. Your email address will not be displayed or used to send marketing messages.

All messages will be checked by moderators before appearing on the site.

See our Privacy Policy for more information.

Related articles

Security shield illustration

How to use the Command Prompt

Lurking under Windows is the little-known world of the command line. We explain how to use this to fix faults and make your PC much more secure

Inside a hard disk drive

Cost-effective ways to upgrade a PC

You don’t need to break the bank to improve the performance of your computer

jargon invaders illustration

What is mobile broadband?

Accessing the internet from a mobile device is an incredibly useful tool but trying to understand what all the various acronyms and words mean leads to confusion

Question & Answer

Q.Why are some of the keys on my keyboard doing strange...

> Read the answer

Q.Is my phone’s Bluetooth any use?

> Read the answer

Q.Can I switch boot drives so that I can work on older...

> Read the answer

Best deals on the web

img

Samsung RV520-A07

£359.98- Buy it now

img

Acer Aspire 5750G (LX.RXP02.019)

£399.99- Buy it now

img

Apple MacBook Pro (MD313B/A)

£904.37- Buy it now

Latest issue & subscription deals

Poll

Are you concerned about viruses that target mobile phones?

Jargon Buster

Computing terms explained in plain English

Virtual drive

A set of files seen by Windows as a separate hard disk.

Great shopping deals from Computeractive