Inexpensive RAID1 card required

Dave Mason dmason-bqArmZWzea/GcjXNFnLQ/w at public.gmane.org
Mon Feb 11 16:26:56 UTC 2008


lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org (Lennart Sorensen) wrote:

>> 1) create a degraded RAID1 with a single drive of sufficient capacity

I didn't mention that, if you happen to have a new partition that is
just the size of the original non-RAID partition, you can resize2fs down
a meg or so first, then change the partition table to reflect the
shrunken file system (you reboot and do a fsck at this point to verify
that the new partition size is still big enough for the file system).

> That would mean going to new larger disks.

Well, if you're installing RAID1 I would expect you to have at least 1
new disk, but as I added above, you don't actually need to have a larger
partition.

>> 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.

See above.

>> 3) resize2fs the new filesystem on the RAID

> And using cp avoids resizing.

Why would you want to do that?  :-) *MUCH* slower.

cp is somewhat less susceptible to typos killing your data, but you
actually only need to be normally careful (as you do any time you're
messing with partition sizes), and in a few minutes you can be in a
state where you *have* a backup on the new RAID partition before you do
anything to the old partition.  As I mention above, there are no steps
that can't be undone before any data is over-written and there are
safety tests you can run along the way.

>> 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).

Of course!

> 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.

It would be awfully nice (in the years when it's at the end of the
partition :-) for someone to write a utility RAID1-my-e2fs that would write
the RAID1 header at the end of the partition (or if there wasn't enough
space told you how much you needed to resize2fs your system so a RAID1
header would fit).  Then it would be trivial (and pretty safe) to turn
an existing file system into a degraded RAID1 in a few minutes, then
simply add a partition and you'd have a full RAID1 (in about 30 minutes
for a few hundred gig file system).

../Dave
--
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