Handbook RAID1 example

Warren Block wblock at wonkity.com
Fri Mar 30 03:23:15 UTC 2012


On Tue, 27 Mar 2012, Warren Block wrote:

> Procedure tested on both 9.0-RELEASE and 8.2-RELEASE.  It could stand more 
> testing.

HTML: http://www.wonkity.com/~wblock/gmirror/geom-mirror.html

And more testing does show a problem.

My tests were all using the smaller drive as the new drive (20G). 
Create a mirror using that whole drive, copy the data from the 20G 
allocated space on the original 200G drive.

But it doesn't work the other way around.  Create a mirror of the full 
larger drive, and the smaller drive cannot be inserted into it; it can't 
mirror a 200G drive.

The procedure really ought to work with different-sized drives, because 
that situation is expectable.

Telling the users that the disks must be identical is weak.  It may 
still fail because of the presence or absence of a label or other 
metadata eating one or more sectors even if the drives are identical.

Now I'm considering labeling each disk, then using gnop(8) to create a 
matching-sized device on each.  This adds more complexity, and maybe the 
thing to do is put the whole thing into a shell script.

Suggestions welcome.



More information about the freebsd-doc mailing list