[WBEL-users] Raid 1 Software raid

Kirby C. Bohling kbohling@birddog.com
Fri, 19 Nov 2004 11:08:19 -0600


On Fri, Nov 19, 2004 at 11:51:56AM -0500, William Warren wrote:
> ok..so how would i make my current 80 gig drive mirroed across to 
> as econd 80 gig drive?  I have tried various docs and am not able 
> to get it rofl..<G>
> 
> btw the 80 gig drive is not bootable.

	Well, that's difficult.  It's very difficult to setup a mirror
of an existing drive (I don't know of any tools that will do it for
you).

	In theory, and only in theory, there should be a way to shrink
the filesystem you are working on (so there is enough room at the
end of the partition to put the RAID metadata), change the partition
type to (fd).  Then partition the other drive exactly the same and
then use the mdadm tools to force them to raid together. 

	However, that's a really good way to lose your data.  I've never
seen it done before, but it should be possible to do.  The metadata
on a Linux software RAID is stored in the last 128K of the
partition (technically speaking, I believe it's stored in the last
full 64K block, which means it can't be any longer then 128K).  If
the drives aren't identical in geometry, this might be a problem
(I've always partitioned my drives about 1% smaller then they are to
ensure that this isn't a problem when I'm buying replacement drives,
it really sucks to get a replacement drive that is 4 blocks (2k)
sort of letting you rebuild the mirror).

	In the end, shuffle all the data off the disks.  Build a fresh
mirror.  Shuffle the data back onto the disks.  As long as you have
the spare drive space, it's relatively easy to do.

	Kirby


> 
> William Hooper wrote:
> 
> >William Warren said:
> >
> >>so if i read this correctly..software raid in linux is restricted to
> >>mirroring ont he same drive?
> >
> >
> >No, it says "A software RAID partition must be constrained to one drive." 
> >Keep reading.  You create a RAID device out of multiple software RAID
> >partitions.
> >
> 
> -- 
> My "Foundation" verse:
> Isa 54:17  No weapon that is formed against thee shall prosper; 
> and every tongue that shall rise against thee in judgment thou 
> shalt condemn. This is the heritage of the servants of the LORD, 
> and their righteousness is of me, saith the LORD.
> 
> -- carpe ductum -- "Grab the tape"
> _______________________________________________
> Whitebox-users mailing list
> Whitebox-users@beau.org
> http://beau.org/mailman/listinfo/whitebox-users
>