Gmirror on a partition of a slice
John Nielsen
lists at jnielsen.net
Mon Oct 8 17:03:06 PDT 2007
On Monday 08 October 2007, Ivan Voras wrote:
> cyberdinn wrote:
> > Could someone confirm its impossible to boot off a mirrored partition ?
>
> In case of gmirror, unlikely.
>
> > else explain how to do it ?
>
> Up to the point hte kernel really kicks in, all you have are separate,
> disconnected drives, partitions, etc. The boot process will run off one
> of the mirrored partition pair just like it's a "normal" partition.
>
> Your loader.conf should point to a "normal" partition (before
> mirroring), and your fstab should point to gmirror device.
I actually do this all the time, so it's definitely possible. Set up the
primary (first in BIOS boot order) disk as you normally would for a boot
device:
fdisk -B ... [set your slice to be active]
bsdlabel -B ... [set your partition to be 'a']
then instead of newfs-ing the partition, add it to a gmirror instead
gmirror label ...
Then just newfs the mirror provider instead of the partition. Easy. As Ivan
noted you should specify the mirror provider in fstab instead of the raw
partition.
If you want to be able to boot off of the second member of the mirror should
the primary be failed or absent then you should duplicate the same steps
for it, and be sure you have a mechanism (can be manual) for telling your
BIOS to boot to that drive instead.
JN
More information about the freebsd-geom
mailing list