Software RAID

Bjørn Ingmar Berg bjorn.ingmar.berg at gmail.com
Fri Aug 26 08:14:57 UTC 2005


As a part of the process of learning more (and probably due to a bit
more geekiness than my wife appreciates) I decided to set up an Ubuntu
machine with a software RAID.  Simply put I wanted to mirror the data
disks, also known as RAID-1.

The hardware:
Dell Optiplex GX-1
Pentium 3 / 550 MHz
640 MB RAM (256+256+128 100 MHz SDRAM)
hda 15.5 GB Matrox (IDE0 Master)
cdrom (IDE1 Master)
Promise Technology Tx2 Ultra ATA133 controller with
hde 40 GB Seagate Barracuda (Tx2 IDE0 Master)
hdg 41.5 BG Matrox (Tx2 IDE1 Master)

The setup of IDE devices might sound fishy at first, but I did it on
purpose.  Howtos I read stated very strongly that raided ATA disks
should not be on the same IDE controller.  Besides I suspect the
Promise controller to be faster than the onboard one.

The installation:
I booted a live CD to see if it detected the hardware, and removed all
old partitions on the disks.  Then I installed Ubuntu 5.04 from CD. 
The partitioner tool in the installation dialog made it very easy to
set up hde and hdg as a RAID; the prompting texts were so good and
detailed that there was no need for other info.  The installation was
surprisingly quick, considering the vintage hardware.
I partitioned the disks like this:
hda1  0.5 GB  /boot
hda2  1.0 GB  swap
hda3  14 GB  /
hde1  40 GB  raid device
hdg1  40 GB  raid device
hdg2  1.5 GB  swap
md0  40 GB  /home (RAID-1 of hde1 and hdg1)

The questions:

* I used the excess space on hdg as an extra swap partition.  Was this
a mistake?  Should I have made just one partition of 40 GB and left
the excess unpartitioned?

* Setting up Linux partitions is still somewhat muddy for me, in spite
of reading about it in several howtos and books.  Are there things I
should have done differently in general, or when considering the
mirrored disks in particular?

* The mirrored disks do not seem to be doing their job completely as
they should.  The "activating RAID" line in the bootup sequence comes
out red and "fail".  And later I get these messages:

md: md0: raid array is not clean -- starting background reconstruction
md: raid1 personality registered as nr 3
raid1: raid set md0 active with 2 out of 2 mirrors
.<6>md: syncing RAID array md0
md: minimum _guaranteed_ reconstruction speed: 1000 KB/sec/disc.
md: using maximum available idle IO bandwith (but not more than 200000
KB/sec) for reconstruction.
md: using 128k window, over a total of 39061952 blocks.
md: resuming recovery of md0 from checkpoint.

Not only that, all data and configuration changes written to my home
directory seems to vanish during a power cycle.  Help?

* Can I tune the hdparm settings for the mirrored disks individually? 
Or should the hdparm parameters be identical for both disks, for
reasons obvious to gurus?

* I want to benchmark this configuration, with regard to the speed of
the RAID array.  Are there tools that simulate real  load and times
various operations?  Or am I just as good off by copying some
humongous files in and out while timing it myself?  The _reason_ I
want to benchmark it at all is that I've planned a phase two:  I'm
going to replace the Promise controller with an Adaptec ATA RAID 1200A
controller I also have lying about and reinstall the system, this time
with the RAID mirror handled in hardware.

* What about mirroring the boot and system disk as well?  Will that be
more prone to errors while booting, or perhaps faster / safer than one
system disk as in the current setup?  I could easilly set in another
15.5 GB Matrox disk, moving the cdrom from master to slave on that
onboard controller.

The big idea:
I imagine you reading this, headbanging the nearest wall, muttering
"Why, oh why does he bother?!"  Understandable.  This is neither
hardware good enough nor disks large enough for this to be a smart
thing to do.  Apart from learning more this also works as preparation
for a real and sensible installation.  A couple of friends of mine and
myself are going to buy and set up a file server.  I guess most of the
problems and challenges will be similar, so the experience is
valuable.

I'm attaching the output from dmesg as a separate file, in case it can
tell something useful.  Any and all comments are very welcome!


Regards,
Bjørn Ingmar Berg
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dmesg.txt
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050826/0b2f573c/attachment.txt>


More information about the ubuntu-users mailing list