9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Robert Raschke <rrplan9@tombob.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] multiple venti servers
Date: Wed, 30 Aug 2006 22:51:02 +0100	[thread overview]
Message-ID: <37aba9a551767195fc98065cc1a2a428@tombob.com> (raw)
In-Reply-To: <8ccc8ba40608301123s239a0f5ub7c736be6075fea7@mail.gmail.com>

Francisco wrote:
> We start the second venti server (the backup) just to update its
> arenas with those
> of the primary one. Also, we format a fossil on the backup machine so
> we could boot
> it upon failures of the primary.
> 
> All clients write to the primary file server (fossil) which has just
> one venti on its own
> machine. This is the venti backed up to our secondary venti (once per night).
> 

Yup, that's my approach as well.  I just start up a venti on my
(otherwise "diskless") terminal and then run a backup script on the
main server.  I got the backup script from somewhere Russ inspired,
but for the life of me cannot remember where exactly:

#!/bin/rc

rfork e
. bkup.info
fn x {
	echo x $*
	y=$1
	if(~ $#$y 0){
		$y=0
	}
	echo venti/wrarena -h other_venti_hostname -o $2 $3 $$y
	end=`{venti/wrarena -h other_venti_hostname -o $2 $3 $$y | grep '^end offset ' | sed 's/^end offset //'}
	if(~ $#end 1 && ! ~ $$y $end){
		$y=$end
		echo '#' `{date} >>bkup.info
		whatis $y >>bkup.info
	}
}
hget http://127.1:8000/index | 
awk '
/^index=/ { blockSize=0+substr($3, 11); }
/^arena=/ { arena=substr($1, 7); }
/^	arena=/ { start=0+substr($5, 2)-blockSize; printf("x %s %d %s\n", arena, start, $3); }
' |rc


This copies the latest blocks from your main venti to your running
backup one.  On the backup machine you can then do whatever you want
with the venti.  For example create yourself a fossil, and as long as
you make sure that fossil doesn't snap to the venti, you'll always
have a nice pristine copy of your original.

Robby



  reply	other threads:[~2006-08-30 21:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-29 20:46 John Floren
2006-08-30  4:37 ` Russ Cox
2006-08-30  5:13   ` geoff
2006-08-30 13:42     ` Wes Kussmaul
2006-08-30 15:02       ` Francisco J Ballesteros
2006-08-30 16:01         ` Tharaneedharan Vilwanathan
2006-08-30 16:02           ` William Josephson
2006-08-30 16:12             ` LiteStar numnums
2006-08-30 18:23             ` Francisco J Ballesteros
2006-08-30 21:51               ` Robert Raschke [this message]
2006-08-30 20:27           ` Russ Cox
2006-09-01  6:40             ` Tharaneedharan Vilwanathan
2006-09-01 17:55               ` Russ Cox
2006-09-03 12:53                 ` Tharaneedharan Vilwanathan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=37aba9a551767195fc98065cc1a2a428@tombob.com \
    --to=rrplan9@tombob.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).