From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <20110811101127.52627669@wks-ddc.exosec.local> References: <20110810162139.48CF914DBD4@smtp.hushmail.com> <214aedcdaee4b4740271167077cc1660@quintile.net> <20110811101127.52627669@wks-ddc.exosec.local> Date: Thu, 11 Aug 2011 06:46:34 -0700 Message-ID: From: David Leimbach To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=0015174be7c471b0bd04aa3b066c Subject: Re: [9fans] Fossil fs recovery Topicbox-Message-UUID: 0e752f18-ead7-11e9-9d60-3106f5b1d025 --0015174be7c471b0bd04aa3b066c Content-Type: text/plain; charset=ISO-8859-1 Is it obvious enough from the man pages that this wouldn't be too useful to have on the Plan 9 wiki? I'm a big believer in the wiki, but not when it pushes one to avoid reading the authoritative documentation of the man pages. Dave On Thu, Aug 11, 2011 at 1:11 AM, David du Colombier <0intro@gmail.com>wrote: > In fact, it's pretty straightforward. > > In the following example, I consider you have a disk sdE0 > with Fossil, and you want to add a disk sdE1 with Venti. > > Create the Venti partitions: > > disk/fdisk -baw /dev/sdE1/data > disk/prep -bw -a^(isect arenas bloom) /dev/sdE1/plan9 > > Format the Venti file systems: > > venti/fmtisect isect /dev/sdE1/isect > venti/fmtarenas arenas /dev/sdE1/arenas > venti/fmtbloom /dev/sdE1/bloom > > Since the bloom filter requires memory equal to its size > on disk, you could need to pass the parameter -s to fmtbloom > to specify its size or directly adjust the partition size. > Keep in mind that Venti use 20% total memory by default, and > 1/3 of it is allocated to the bloom filter. > For example, with 1 GB of memory, you cannot have a bloom filter > larger than 64 MB (which is sufficient) with the default settings. > Of course, the bloom filter is optional anyway. > > Configure Venti: > > echo 'index main > isect /dev/sdE1/isect > arenas /dev/sdE1/arenas > bloom /dev/sdE1/bloom' | venti/conf -w /dev/sdE1/arenas > > Initialize the index sections: > > venti/fmtindex /dev/sdE1/arenas > > Read your current Fossil configuration: > > fossil/conf /dev/sdE0/fossil > fossil.conf > > Edit fossil.conf, it should look like something like: > > fsys main config /dev/sdE0/fossil > fsys main open -V -c 3000 > > Remove -V to open and srv if needed, then > add the following line to enable automatic > snapshots: > > fsys main snaptime -s 60 -a 0530 -t 2880 > > (snapshot at 05:30, temporary snapshot each > hour and discarded after two days) > > Write your new Fossil configuration: > > fossil/conf -w /dev/sdE0/fossil < fossil.conf > > Mount your 9fat file system, then add the following line > to the file /n/9fat/plan9.ini: > > venti=#S/sdE1/arenas > > After rebooting, the current Fossil content will be dumped > to Venti. > > -- > David du Colombier > > --0015174be7c471b0bd04aa3b066c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Is it obvious enough from the man pages that this wouldn't be too usefu= l to have on the Plan 9 wiki? =A0

I'm a big believer= in the wiki, but not when it pushes one to avoid reading the authoritative= documentation of the man pages.

Dave

On Thu, A= ug 11, 2011 at 1:11 AM, David du Colombier <0intro@gmail.com> wrote:
In fact, it's pretty straightforward.

In the following example, I consider you have a disk sdE0
with Fossil, and you want to add a disk sdE1 with Venti.

Create the Venti partitions:

disk/fdisk -baw /dev/sdE1/data
disk/prep -bw -a^(isect arenas bloom) /dev/sdE1/plan9

Format the Venti file systems:

venti/fmtisect isect /dev/sdE1/isect
venti/fmtarenas arenas /dev/sdE1/arenas
venti/fmtbloom /dev/sdE1/bloom

Since the bloom filter requires memory equal to its size
on disk, you could need to pass the parameter -s to fmtbloom
to specify its size or directly adjust the partition size.
Keep in mind that Venti use 20% total memory by default, and
1/3 of it is allocated to the bloom filter.
For example, with 1 GB of memory, you cannot have a bloom filter
larger than 64 MB (which is sufficient) with the default settings.
Of course, the bloom filter is optional anyway.

Configure Venti:

echo 'index main
isect /dev/sdE1/isect
arenas /dev/sdE1/arenas
bloom /dev/sdE1/bloom' | venti/conf -w /dev/sdE1/arenas

Initialize the index sections:

venti/fmtindex /dev/sdE1/arenas

Read your current Fossil configuration:

fossil/conf /dev/sdE0/fossil > fossil.conf

Edit fossil.conf, it should look like something like:

fsys main config /dev/sdE0/fossil
fsys main open -V -c 3000

Remove -V to open and srv if needed, then
add the following line to enable automatic
snapshots:

fsys main snaptime -s 60 -a 0530 -t 2880

(snapshot at 05:30, temporary snapshot each
=A0hour and discarded after two days)

Write your new Fossil configuration:

fossil/conf -w /dev/sdE0/fossil < fossil.conf

Mount your 9fat file system, then add the following line
to the file /n/9fat/plan9.ini:

venti=3D#S/sdE1/arenas

After rebooting, the current Fossil content will be dumped
to Venti.

--
David du Colombier


--0015174be7c471b0bd04aa3b066c--