9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Mirrorarenas in p9p
       [not found] <073120081453.4828.4891D1D2000C4C1E000012DC22243429029B0A02D2089B>
@ 2008-07-31 14:58 ` erik quanstrom
  2008-07-31 15:30   ` Brian L. Stuart
  0 siblings, 1 reply; 6+ messages in thread
From: erik quanstrom @ 2008-07-31 14:58 UTC (permalink / raw)
  To: 9fans

> - Is this going to cause any problems?
> - Is there a better way to handle this?

could you use disk/prep instead of disk/fdisk?
prep should work in this situation as long as the
sector size on both drives is the same.

- erik




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

* Re: [9fans] Mirrorarenas in p9p
  2008-07-31 14:58 ` [9fans] Mirrorarenas in p9p erik quanstrom
@ 2008-07-31 15:30   ` Brian L. Stuart
  0 siblings, 0 replies; 6+ messages in thread
From: Brian L. Stuart @ 2008-07-31 15:30 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> > - Is this going to cause any problems?
> > - Is there a better way to handle this?
>
> could you use disk/prep instead of disk/fdisk?
> prep should work in this situation as long as the
> sector size on both drives is the same.

I don't think so.  Unless it's been added recently,
p9p doesn't have prep.  But even if it did, the
subpartitions it creates wouldn't be visible to
Linux, so I wouldn't have any way to name them
for mirrorarenas.  At least that's the way I
understand it.  It's certainly possible I'm
mistaken, however.

BTW the reason it's p9p on Linux instead of an
actual Plan 9 install is that the particular
hardware I scrounged has one of those SCSI
controllers that can do RAID but has no driver
in Plan 9.  I did set it up before 9vx, though.
So maybe I could rethink some things and build
it all around that.  It'd be a little weird
because it's an archive server for UNIX machines
using vbackup.  So it runs vnfs to serve the
dumps.  But I suppose I could run venti in 9vx
and vnfs in Linux and, in principle, I think
it would work.  Or I could probably compile
vnfs under Plan 9 and run both under 9vx.
Sorry to ramble.  I'm brainstorming as I
write...

Thanks,
BLS




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

* Re: [9fans] Mirrorarenas in p9p
  2008-07-31 19:52   ` Brian L. Stuart
@ 2008-07-31 22:13     ` Russ Cox
  0 siblings, 0 replies; 6+ messages in thread
From: Russ Cox @ 2008-07-31 22:13 UTC (permalink / raw)
  To: 9fans

>> Also, if you do create a Plan 9 partition and
>> then prep it to make subpartitions (you'd have
>> to use 9vx, copying the binaries from sources),
>> then p9p venti can handle those partition names
>> too: /dev/sda1:arenas assuming /dev/sda1 is a
>> Plan 9 fdisk partition containing a subpartition
>> named arenas.
>
> So here's what I ended up with.  I installed 9vx on
> the machine and used that to partition the big
> drive: one fairly big partition with 4 subpartitions
> for the 4 arena disks already on the machine. The
> p9p mirrorarenas didn't like the partition name
> notation.  It calls initpart which calls parsepart
> which seems to only like the numeric range notation.
> But running the Plan 9 mirrorarenas in 9vx works
> just fine.  So I'm pretty much where I want to be
> for now.

It should be there as of HG revision 2825 (July 3).
The particular file contents that I expect are at
http://swtch.com/go/venti-plan9-partitions
It's at the bottom of the file.

In addition to /dev/sda1:arenas you can say
/dev/sda:arenas -- the code parses the fdisk table
to find the Plan 9 partition too (but it's also happy
if you give it the Plan 9 partition directly).

Using 9vx is fine, of course, but this is one less
moving piece in your mirroring scripts.

Russ



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

* Re: [9fans] Mirrorarenas in p9p
  2008-07-31 16:06 ` Russ Cox
@ 2008-07-31 19:52   ` Brian L. Stuart
  2008-07-31 22:13     ` Russ Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Brian L. Stuart @ 2008-07-31 19:52 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> Also, if you do create a Plan 9 partition and
> then prep it to make subpartitions (you'd have
> to use 9vx, copying the binaries from sources),
> then p9p venti can handle those partition names
> too: /dev/sda1:arenas assuming /dev/sda1 is a
> Plan 9 fdisk partition containing a subpartition
> named arenas.

So here's what I ended up with.  I installed 9vx on
the machine and used that to partition the big
drive: one fairly big partition with 4 subpartitions
for the 4 arena disks already on the machine. The
p9p mirrorarenas didn't like the partition name
notation.  It calls initpart which calls parsepart
which seems to only like the numeric range notation.
But running the Plan 9 mirrorarenas in 9vx works
just fine.  So I'm pretty much where I want to be
for now.

Thanks,
BLS




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

* Re: [9fans] Mirrorarenas in p9p
  2008-07-31 14:53 Brian L. Stuart
@ 2008-07-31 16:06 ` Russ Cox
  2008-07-31 19:52   ` Brian L. Stuart
  0 siblings, 1 reply; 6+ messages in thread
From: Russ Cox @ 2008-07-31 16:06 UTC (permalink / raw)
  To: 9fans

> I'm running a p9p venti server under Linux using several
> (small by current standards) physical drives as my arena
> pool.  I got a 500GB external USB drive to use as a backup
> of the arenas.  But here's the gotcha.  The number of blocks
> per cylinder on the 500GB drive isn't the same as the other
> smaller drives.  So, I can't create a partition that's exactly
> the same size as one of the smaller drives, which means that
> the last arena is a different size when I format it.  mirrorarenas
> complains about that and considers it fatal.  I modified
> it so that if the destination arena is bigger than the source,
> it's just a warning and not fatal and it's happily mirroring
> as we speak.  But I've got a couple of questions:
> - Is this going to cause any problems?
> - Is there a better way to handle this?

It would be best to set up an arena set that
matches the one you are mirroring exactly.

To cope with the lack of real partitioning
support in operating systems that are not
Plan 9, the p9p venti lets you specify disk
subpieces in the partition names.  So you
can say /dev/hda:0-10G to get the first ten
gigabytes of /dev/hda.  Or /dev/hda:0-12345M
or /dev/hda:1G-123123123123M etc.

Also, if you do create a Plan 9 partition and
then prep it to make subpartitions (you'd have
to use 9vx, copying the binaries from sources),
then p9p venti can handle those partition names
too: /dev/sda1:arenas assuming /dev/sda1 is a
Plan 9 fdisk partition containing a subpartition
named arenas.

Yes, it's terrible.  You use Unix long enough,
you get used to that.

Russ



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

* [9fans] Mirrorarenas in p9p
@ 2008-07-31 14:53 Brian L. Stuart
  2008-07-31 16:06 ` Russ Cox
  0 siblings, 1 reply; 6+ messages in thread
From: Brian L. Stuart @ 2008-07-31 14:53 UTC (permalink / raw)
  To: 9fans

I'm running a p9p venti server under Linux using several
(small by current standards) physical drives as my arena
pool.  I got a 500GB external USB drive to use as a backup
of the arenas.  But here's the gotcha.  The number of blocks
per cylinder on the 500GB drive isn't the same as the other
smaller drives.  So, I can't create a partition that's exactly
the same size as one of the smaller drives, which means that
the last arena is a different size when I format it.  mirrorarenas
complains about that and considers it fatal.  I modified
it so that if the destination arena is bigger than the source,
it's just a warning and not fatal and it's happily mirroring
as we speak.  But I've got a couple of questions:
- Is this going to cause any problems?
- Is there a better way to handle this?

Thanks,
BLS




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

end of thread, other threads:[~2008-07-31 22:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <073120081453.4828.4891D1D2000C4C1E000012DC22243429029B0A02D2089B>
2008-07-31 14:58 ` [9fans] Mirrorarenas in p9p erik quanstrom
2008-07-31 15:30   ` Brian L. Stuart
2008-07-31 14:53 Brian L. Stuart
2008-07-31 16:06 ` Russ Cox
2008-07-31 19:52   ` Brian L. Stuart
2008-07-31 22:13     ` Russ Cox

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).