On Tue Mar 20 22:13:20 EDT 2007, devon.odell@gmail.com wrote:
> Hey.
>
> I'm setting up a fileserver. Right now I have 2 250GB disks in it,
> that I would like to mirror. I don't particularly care to mirror
> single partitions. I want the whole damn thing to be mirrored, and
> when anything happens to it, on any partition, it should be synced
> between the two.
>
>
> I'm lead to believe that this is possible by using fs(3). I've put:
>
> mirror rootmirror /dev/sdC0/data /dev/sdD0/data
>
> into /dev/fs/ctl, and put this into a partition accessible through
> /dev/sdC0/fscfg


i believe this would create the device /dev/fs/rootmirror.

> #1) Is fs supposed to sync data from sdC0 to sdD0? If so, shouldn't
> sdD0 have all the partitions of sdC0 at some point?


no. it doesn't you'd have to

dd -if /dev/sdC0/data -of /dev/sdD0/data

before creating the mirror. of course once you did that, you could
use
disk/prep -p /dev/fs/rootmirror > /dev/fs/ctl
disk/fdisk -p /dev/fs/plan9 > /dev/fs/ctl

to recognize the dos and plan 9 partitions, respectively. since
the drive has no idea the partitions are there -- they are just
tables that associate data with offsets, you could partition the
mirror *after* setting it up. or you could repartition after
setting up the mirror, provided you copied the data from the
original disk onto the second one before creating the mirror.

the data for dos partition is just partition type and an offset.
the data for a plan 9 partition is a string (e.g. fossil, nvram
or 9fat) and an offset.

> #2) Later, when I add another 2 drives, I'll want to mirror them and
> add them to available storage. What's the easiest way to do this?


you could create a cat of mirrors or a mirror of cats. typically one
would go for the former. but fs(3) doesn't provide real raid functionality.
it doesn't fail an array, manage hot spares or sync data if there has been
a failure.

> #3) Which manpages should I read for info on exporting the storage
> pools to other good citizens on my network?


what do you mean by "exporting storage". do you want to export storage
at the block level, the as a venti store, or as a filesystem?

- erik