Topic: software raid

hi!

i'm running freebsd 7.1 with the sil 3114 controller.

using the controller bios utility, i setup a raid 0 configuration using two identical drives.

i booted freebsd, and i set up the disklabels of the two disks like this:

# /dev/ad4:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 488397168        0    unused        0     0         # "raw" part, don't edit
  e: 488397168        0    4.2BSD        0     0     0


# /dev/ad6:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 488397168        0    unused        0     0         # "raw" part, don't edit
  e: 488397168        0    4.2BSD        0     0     0

i then ran this:

euterpe# ccdconfig ccd0 32 0x02 /dev/ad4e /dev/ad6e

i set up the ccd disklabel like this:

# /dev/ccd0:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  c: 976794304        0    unused        0     0         # "raw" part, don't edit

then i simply ran this:

euterpe# newfs /dev/ccd0c

-------
questions!

(1) the freebsd handbook suggests using /dev/ccd0c for a filesystem. is this ok to do, or should i make a label for "a" and use that instead?

(2) i set up my raid 0 array using my controller. but then when i booted freebsd, there were two separate disks, not one single striped volume. isn't the controller supposed to do this itself? if not, why should i even bother setting up the raid array with the controller? can't it all be done using the ccd utility with freebsd?

Last edited by lucas (2009-05-16 08:34:36)

Re: software raid

That's not a true hardware RAID controller.  It's a software RAID/pseudo-RAID controller, where all the RAID stuff happens in the driver.  That's why you see both drives in the OS.

On a controller like that, you would be better off disabling all the RAID features on the card, using it like a normal SATA controller, and then using software RAID (gmirror/gstrip/graid).

Re: software raid

so making changes with the bios controller doesn't do anything at all?

what's the difference between using ccd or geom or vinum or atacontrol? which should i use?

Re: software raid

lucas wrote:

so making changes with the bios controller doesn't do anything at all?

It adds a bit of metadata to the drives, to tell the driver what to do.  Using the "raid" features of this card and the "raid" features of atacontrol are pretty much the same.

what's the difference between using ccd or geom or vinum or atacontrol? which should i use?

ccd and vinum are deprecated in FreeBSD 5+ in favour of GEOM.  Use the GEOM tools for software raid: gstripe for RAID0, gmirror for RAID1, graid3 for RAID3, graid5 for RAID5 (although this isn't fully production-ready).  Or use ZFS.

Re: software raid

ok, thanks for the info! i wish the handbook said something like that about ccd.