In general, this part of the instructions assumes that you are using storage devices (disks and CF) that contain nothing that you care about. If this is not the case, please either first copy the data you want to keep to a safe location, or learn how to adapt these steps to preserve what you have.
Boot your RAIDbox hardware and launch the Ubuntu installation process.
- Choose Manual Partitioning
- For each disk displayed, delete every partition.
- Once complete, partition your CF card as a single ext3 partition with / as its mount point.
- Move the cursor to the single row underneath its drive descriptor, e.g. :
IDE1 master (hda) - 8.0 GB TRANSCEND
pri/log 8.0 GB FREE SPACE
- Press ENTER
- Select Create a new partition and press ENTER
- Press ENTER to accept the default size, which is all of your disk space.
- Select Primary and press ENTER
- If Use as: is not Ext3 journaling file system, then
Select Use as: and press ENTER
Select Ext3 journaling file system and press ENTER - If Mount point: is not /, then
Select Mount point
Select / – the root file system - If Bootable flag: is not on, then
Select Bootable flag: and press ENTER. - Press ESC to return to the partition menu.
- Move the cursor to the single row underneath its drive descriptor, e.g. :
- For each hard disk, first create a 384 MB RAID partition at the end of the disk:
Move the cursor to the single row underneath its drive descriptor, e.g. :
SCSI4 (0,0,0) (sda) - 500.1 GB ATA ST3500841Apri/log 500.1 GB FREE SPACE
Press ENTER
Select Create a new partition and press ENTER
Press BACKSPACE until the partition size field is empty. Then type 384 MB and press ENTER
Select Primary and press ENTER
Select END and press ENTER
Select Use as: and press ENTER
Select physical volume for RAID and press ENTER
Press ESC to return to the partition menu.
After all disks are complete, fill out the remaining space with another RAID partition:
Move the cursor to the row underneath its drive descriptor that shows FREE SPACE, e.g. :
SCSI4 (0,0,0) (sda) - 500.1 GB ATA ST3500841Apri/log 499.7 GB FREE SPACE#1 primary 378.4 MB K raid
Press ENTER
Select Create a new partition and press ENTER
Press ENTER to accept the default size, which is the rest of your disk space.
Select Primary and press ENTER
Select Use as: and press ENTER
Select physical volume for RAID and press ENTER
Press ESC to return to the partition menu.
Scroll back up to the top of the Partition disks page, select Configure software RAID and press ENTER.
If asked to Write the changes to the storage devices and configure RAID, select Yes and press ENTER.
To clear out results from previous attempts, select Delete MD device and press ENTER. Delete all devices until there are no more defined.
Once all MD devices are deleted, select Create MD device and press ENTER.
Select RAID5 and press ENTER.
Press BACKSPACE until the default number of active devices for the RAID5 array is deleted, then type 4 and press ENTER.
If the default number of spare devices for the RAID5 array is not 0, press BACKSPACE until the number is deleted, then type 0 and press ENTER.
One by one, move the cursor to each of the 4 lines that ends in 1 (e.g. /dev/sda1) and press SPACE to select it. When done, press ENTER.
Repeat the above steps, but this time, select all the lines that end in 2 (e.g. /dev/sda2) which should be the only 4 options remaining.
Select Finish and press ENTER.
When the partitioner is done, it’ll take you back to show you the results of your RAID work. From this point on, leave your actual disk partitions alone and only work with the RAID5 device entries. e.g.
RAID5 device #0 - 1.1 GB Software RAID device#1 1.1 GB
and
RAID5 device #1 - 1.5 TB Software RAID device#1 1.5 TB
Select the line under the smaller RAID5 device and press ENTER.
Select Use as: and press ENTER
Select swap area and press ENTER
Press ESC to return.
Select the line under the larger RAID5 device and press ENTER.
Select Use as: and press ENTER
Select Ext3 journaling file system and press ENTER
If Format the partition: is not set to yes, format it, then select it and press ENTER.
Select Mount point: and press ENTER
Select Enter manually
Change the default to /raid and press ENTER.
Press ESC to go back.
When back at the Partition disks screen, review your partitions one final time and then scroll down to select Finish partitioning and write changes to disk, then press ENTER.
The rest of the installation process is just like a normal Ubuntu installation, except with more simultaneous disk activity. When your system boots, Ubuntu will be entirely on the CF card, and your swap partition will be on one raid array, and a giant chunk of storage will be mounted at /raid.
The only thing that remains is to get /var off the CF as soon as /raid is mounted, because CF cards can only take a certain number of write cycles, and we don’t want logging to kill our boot disk.
Once your RAIDbox boots for the first time, log in as your main user account. If you run the command ‘df -h’ then you should see something like this:
Filesystem Size Used Avail Use% Mounted on /dev/hda1 7.4G 660M 6.4G 10% / varrun 188M 44K 188M 1% /var/run varlock 188M 0 188M 0% /var/lock udev 188M 112K 188M 1% /dev devshm 188M 0 188M 0% /dev/shm lrm 188M 34M 154M 19% /lib/modules/2.6.22-14-generic/volatile /dev/md1 1.4T 198M 1.3T 1% /raid
As you can see, our CF disk is mostly underused, and we want to keep it that way to ensure a long life. More on that later.
Did you ever continue this RAIDBox series? I find it very interesting, and I find that I have most of the requisite parts. Very tempting.
I have some notes for part 4, but I had to start using it before I could formally document what I was doing 🙂 I still need to determine how to know if a disk has failed, and what steps are required to recover from it. But the cheapo CF memory acting as the boot disk is still going strong after all this time.
Price-wise, things are much different now. A 1TB RAID box from Buffalo goes for about $300, but of course it’s designed for Windows, an attempted Operating System by Microsoft Corporation, a convicted monopolist. Feature-wise, you can’t beat building your own, and I suspect it actually becomes cost-effective when using larger-capacity drives.