9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] fs(3), venti, raid, and more
@ 2007-03-21 11:08 erik quanstrom
  0 siblings, 0 replies; 4+ messages in thread
From: erik quanstrom @ 2007-03-21 11:08 UTC (permalink / raw)
  To: 9fans

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] fs(3), venti, raid, and more
  2007-03-21  2:12 Devon H. O'Dell
  2007-03-21  7:10 ` Francisco J Ballesteros
@ 2007-03-21  9:11 ` Steve Simon
  1 sibling, 0 replies; 4+ messages in thread
From: Steve Simon @ 2007-03-21  9:11 UTC (permalink / raw)
  To: 9fans

> mirror rootmirror /dev/sdC0/data /dev/sdD0/data

sounds plausablem though when I have done it I mirrored
partition by partition.

I also didn't mirror fossil as that can be re-generated
easily from venti but used its pair as my `other' - partition
for big temporary stuff that I don't want to keep in
venti - eg MP3s, MPEGs, ISO's etc.

-Steve


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] fs(3), venti, raid, and more
  2007-03-21  2:12 Devon H. O'Dell
@ 2007-03-21  7:10 ` Francisco J Ballesteros
  2007-03-21  9:11 ` Steve Simon
  1 sibling, 0 replies; 4+ messages in thread
From: Francisco J Ballesteros @ 2007-03-21  7:10 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

for 1, yes, but dont forget the ctl. It´s outside of the mirror interface.
I always made partitions by hand, then set up mirror.

devfs does not update one disk from another AFAIK, only that writes go to
both disks. Thus, to add another disk, partition, copy by hand (while the
original is idle) and reconfigure as a mirror for four.

regarding export you can do it by, for example, starting a venti. In principle,
you can export the raw fs device using import from another machine, but I don´t
know how slow that would be.

hth

On 3/21/07, Devon H. O'Dell <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
>
> #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?
>
> #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?
>
> #3) Which manpages should I read for info on exporting the storage
> pools to other good citizens on my network?
>
> Thanks,
>
> Devon
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [9fans] fs(3), venti, raid, and more
@ 2007-03-21  2:12 Devon H. O'Dell
  2007-03-21  7:10 ` Francisco J Ballesteros
  2007-03-21  9:11 ` Steve Simon
  0 siblings, 2 replies; 4+ messages in thread
From: Devon H. O'Dell @ 2007-03-21  2:12 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

#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?

#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?

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

Thanks,

Devon


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-21 11:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-21 11:08 [9fans] fs(3), venti, raid, and more erik quanstrom
  -- strict thread matches above, loose matches on Subject: below --
2007-03-21  2:12 Devon H. O'Dell
2007-03-21  7:10 ` Francisco J Ballesteros
2007-03-21  9:11 ` Steve Simon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).