A couple of days ago I upgraded a home machine from FreeBSD 8.3 to FreeBSD 9.1. Unexpectedly the machine would refuse to boot, with the kernel unable to find the root partition. In fact, while the disks where detected, the mirror built on top of them was not. Something new was there instead: entries in /dev/raid which I never saw before; where did they come from ?
FreeBSD 9 introduced graid, a new GEOM class for handling BIOS based soft-RAID. Unfortunately, my machine contains one of such RAIDs, and maybe for some reasons the disks had some metadata attached (probably from previous attempts to use them with the soft-RAID). The result was that graid kicked in, while gmirror failed to use the drives for my mirror.
The simplest (and safest) solution was to disable graid entirely in /boot/loader.conf:
An alternative may be to remove such metadata with graid, which would be a cleaner solution if not for the risk of removing valuable data(at this point I can’t assume that the metadata doesn’t overlap with something else).
Now I only have to remember to never load graid again on that machine…