[CentOS] Turn an ext2 filesystem into a component of a mirrored RAID?
jpotter-centos at codepuppy.com
Mon Nov 27 20:24:38 UTC 2006
> .... A straight
> disk-to-disk copy (with rsync, tar, or "cp -a" doesn't much matter)
> manages about 75MB per minute, which would take almost three days, and
> the system gets very sluggish while such a copy is going on, so we
> can't afford to just let it run.
> Is it possible, without loss of data, to convert the existing ext2
> filesystem into a mirrored software RAID, then add the new drive as a
> second device and let rebuilding the RAID take care of making the
> copy? Even if this took more time, we've had good overall system
> performance with software RAIDs rebuilding in the background before,
> so it could run as long as necessary. We'd then need to be able to
> remove the second device from the RAID and either convert it back into
> a plain ext2 or put it into a similar software RAID in the destination
> Is this possible? Is there another plan that would make more sense?
I'm sure it's possible, and other users here can give you the exact
However, I'd suggest running rsync to the second server before
attempting anything anyway, since if your mirror-add operation fails,
well, do you have a backup?
rsync has an option for bandwidth limiting (--bwlimit). You could run
it throttled, which should cause it to calm down quite a bit and not
thrash your system so much. Also, on subsequent runs, it will run
much faster, since it'll only be sending the diffs between the servers.
You may find doing it this way completely negates the need to use the
mirror-and-move method -- the initial run could be done over a week
or two with bwlimit, and then you could run it again without bwlimit
on an already-rsynced path and "clean up" the most recent changes
quickly enough as to not need very long of a downtime maintenance
More information about the CentOS