Inexpensive RAID1 card required

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Mon Feb 11 15:42:48 UTC 2008


On Mon, Feb 11, 2008 at 10:11:53AM -0500, Dave Mason wrote:
> Len Sorensen wrote:
> > Switching to raid does require redoing the partition table layout to
> > do raid, and then adding the filesystem on top of the raid if using
> > software, and who even knows how a hardware raid card decides to
> > handle the disks.  I have never seen a raid system that didn't require
> > backing up everything and reinstalling it to get raid.
> 
> It's a tiny bit tricky, but what you can do is:
> 
> 1) create a degraded RAID1 with a single drive of sufficient capacity

That would mean going to new larger disks.

> 2) dd your current partition to the RAID partition

It won't fit since the raid partition will be slightly smaller unless
you are switching to larger disks, which for most people is not the
case.

I have done it by creating the filesystem and using cp -ax to transfer
the files to the new filesystem, which of course does work.

> 3) resize2fs the new filesystem on the RAID

And using cp avoids resizing.

> 4) add a partition to the RAID1 and it will start duplicating the data
> 
>  (note: you want the RAID partitions on separate IDE/ATA cables or it
>  will go *slowly*)

It will also be unreliable since a failed IDE/ATA disks usually takes
down the whole bus in which case you loose access to the raid.  So never
mind slow, it is simply a bad idea.

> All of the above can be a lot faster than backup/restore.  YMMV.

Of course you are nuts if you didn't do a backup first anyhow (not that
I always do, but then again that doesn't mean I wasn't nuts doing it).

> The software RAID information is at the end of the partition, I believe,
> so in theory you might be able to resize your existing partition down a
> few blocks, put the RAID information in place, get the RAID drive
> recognized, and then resize the partition back to the (now slightly
> smaller) size, but the few attempts I've made to do this haven't worked.

The software raid information location varies by raid version.  It has
been in various places over the years.  There are advantages and
disadvantages to each location.

--
Len Sorensen
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list