From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 11 Aug 2011 10:11:27 +0200 From: David du Colombier <0intro@gmail.com> To: 9fans@9fans.net Message-ID: <20110811101127.52627669@wks-ddc.exosec.local> In-Reply-To: References: <20110810162139.48CF914DBD4@smtp.hushmail.com> <214aedcdaee4b4740271167077cc1660@quintile.net> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Fossil fs recovery Topicbox-Message-UUID: 0e43a4fc-ead7-11e9-9d60-3106f5b1d025 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