Slices + stripes and mirrors

James Snow snow at teardrop.org
Fri May 19 19:29:53 UTC 2006


On Fri, May 19, 2006 at 01:06:04PM -0500, Rick C. Petty wrote:
> 
> If you're not mirroring the entire disk, I think you're halfway down a
> dangerous path.

I think the original poster's use case is a fairly common one.  For
example, you've got two 40GB disks, and you want to use the first 20GB
of each disk for a single 20GB mirror, and the second 20GB for a 40GB
stripe.

Why does this constitute a dangerous path?

> In any case, I've had better luck using gvinum even for just plain
> mirroring.  

I guess we've had somewhat opposite experiences here.  I usually wind up
digging up old documentation on vinum off the web and fiddling with
gvinum until I determine what's still applicable.  I found out that I
could use 'sd length 0' to autosize disks from this list rather than
from any of the docs.  Maybe I'm suffering from a severe case of the
stupids, but good documentation on gvinum seems to be hard to come by.

> IMO, it's easier to use a livecd since you have to reboot the box
> anyway.

But this assumes you have console access.  I've successfully used
gmirror to convert machines on the opposite side of the country to RAID
without any remote-hands or physical access.  It works perfectly for me
most of the time.  I've little doubt that I'm doing something stupid
this time.

I should have prefaced my "I'm having some difficulty" comment with
"It's working flawlessly for me in six other places.  ;)

> For that number of steps, why not use gvinum instead?  You'd have more
> flexibility and you can do things like resize volumes and add/remove
> drives while the system is up.

You can hot add/remove drives out of a gvinum partition as well.  I'll
grant that it was somewhat ungraceful, but I did this recently when I
needed to duplicate a machine in a hurry.  It worked very well.

I actually started out playing with gvinum for my setup, but it
didn't seem to perform very well.  I freely admit I wasn't being very
scientific in my testing - just simple dd write tests - but, well, see
for yourself:

273k stripe size:   7857123 bytes/sec
8190k stripe size:  8207057 bytes/sec
regular disk:      29639806 bytes/sec
graid3 disk:       54549442 bytes/sec

I was going to try a few different stripe sizes, but the jump between
gvinum RAID5 and a single disk was pretty severe.  It seemed like more
than a stripe size change could remedy.


-Snow



More information about the freebsd-geom mailing list