* [9fans] plan9port venti FreeBSD @ 2005-12-21 4:07 Serge Gagnon 2005-12-21 4:43 ` Russ Cox 0 siblings, 1 reply; 11+ messages in thread From: Serge Gagnon @ 2005-12-21 4:07 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs Hello, i have installed plan9port on FreeBSD 6 and i would like to setup venti on it. I'm not a plan9 user, then i'll make a lot of tests. First of all, I would like to know how can I create a venti partition with the FreeBSD fdisk (the number of the partition like 165 for FreeBSD) ? Thanks regards, -- GAGNON serge <serge.gagnon@b2b2c.ca> PGP KEY-ID: 0xBBC1478F PGP Fingerprint: B48B 4633 28F5 28F6 7A62 5650 69C8 E293 BBC1 478F PPG Key: http://quenix2.dyndns.org:7777 | telnet quenix2.dyndns.org 7777 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] plan9port venti FreeBSD 2005-12-21 4:07 [9fans] plan9port venti FreeBSD Serge Gagnon @ 2005-12-21 4:43 ` Russ Cox 2005-12-21 4:44 ` Russ Cox 2005-12-27 19:41 ` Serge Gagnon 0 siblings, 2 replies; 11+ messages in thread From: Russ Cox @ 2005-12-21 4:43 UTC (permalink / raw) To: serge.gagnon, Fans of the OS Plan 9 from Bell Labs > First of all, I would like to know how can I create a venti partition with the > FreeBSD fdisk (the number of the partition like 165 for FreeBSD) ? You can use whatever partition number you like. You will need more than one partition, since arenas and data are kept separate. Alternately, because disk partitioning is such a pain, the Unix venti supports an alternate syntax filename:lo-hi, which selects a subpartition of the named file. So /dev/hda:0-10G is the first 10 gigabytes of /dev/hda. Russ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] plan9port venti FreeBSD 2005-12-21 4:43 ` Russ Cox @ 2005-12-21 4:44 ` Russ Cox 2005-12-27 19:41 ` Serge Gagnon 1 sibling, 0 replies; 11+ messages in thread From: Russ Cox @ 2005-12-21 4:44 UTC (permalink / raw) To: serge.gagnon, Fans of the OS Plan 9 from Bell Labs > You will need more than one partition, since arenas > and data are kept separate. Alternately, because This should be arenas and index. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] plan9port venti FreeBSD 2005-12-21 4:43 ` Russ Cox 2005-12-21 4:44 ` Russ Cox @ 2005-12-27 19:41 ` Serge Gagnon 2005-12-30 19:40 ` Russ Cox 1 sibling, 1 reply; 11+ messages in thread From: Serge Gagnon @ 2005-12-27 19:41 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On Tue, 20 Dec 2005 23:43:47 -0500 Russ Cox <rsc@swtch.com> wrote: > > First of all, I would like to know how can I create a venti > > partition with the FreeBSD fdisk (the number of the partition like > > 165 for FreeBSD) ? > > You can use whatever partition number you like. > You will need more than one partition, since arenas > and data are kept separate. Alternately, because > disk partitioning is such a pain, the Unix venti > supports an alternate syntax filename:lo-hi, > which selects a subpartition of the named file. > So /dev/hda:0-10G is the first 10 gigabytes of /dev/hda. > I can't run fmtisect or fmtarenas directly on partition without this error: ; sudo /usr/local/plan9/bin/venti/fmtarenas -b 8192 arenas0. /dev/ad2:0-10G err 0: can't determine size of partition /dev/ad2 /usr/local/plan9/bin/venti/fmtarenas: can't open partition /dev/ad2:0-10G: can't determine size of partition /dev/ad2 [status 1] ; I also tried to make a partition (/dev/as2s1d) and fmtarenas exit with the same error. I thought that there was probably an incompatibility with my hard drive, then i tried it with another brand new HD with the same result. I'm running plan9port-20051222 on FreeBSD 5.4-STABLE . Another question (the last): Is there a built-in mechanism to feed the vnfs's config file or should i handle this with script? Thanks -- GAGNON serge <serge.gagnon@b2b2c.ca> PGP KEY-ID: 0xBBC1478F PGP Fingerprint: B48B 4633 28F5 28F6 7A62 5650 69C8 E293 BBC1 478F PPG Key: http://quenix2.dyndns.org:7777 | telnet quenix2.dyndns.org 7777 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] plan9port venti FreeBSD 2005-12-27 19:41 ` Serge Gagnon @ 2005-12-30 19:40 ` Russ Cox 2005-12-31 4:22 ` Serge Gagnon 0 siblings, 1 reply; 11+ messages in thread From: Russ Cox @ 2005-12-30 19:40 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs > I can't run fmtisect or fmtarenas directly on partition without this > error: > > ; sudo /usr/local/plan9/bin/venti/fmtarenas -b 8192 > arenas0. /dev/ad2:0-10G > err 0: can't determine size of > partition /dev/ad2 /usr/local/plan9/bin/venti/fmtarenas: can't open > partition /dev/ad2:0-10G: can't determine size of partition /dev/ad2 > [status 1] ; ls -l /dev/ad2 and look at the major device number. There is a list in src/lib9/_p9dir.c and maybe it is missing. > Another question (the last): > Is there a built-in mechanism to feed the vnfs's config file or should > i handle this with script? Not sure what you're asking here. Vnfs will reload the config file if you cat /dump/+refreshconfig. Russ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] plan9port venti FreeBSD 2005-12-30 19:40 ` Russ Cox @ 2005-12-31 4:22 ` Serge Gagnon 2005-12-31 10:36 ` C H Forsyth 0 siblings, 1 reply; 11+ messages in thread From: Serge Gagnon @ 2005-12-31 4:22 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs On Fri, 30 Dec 2005 14:40:53 -0500 Russ Cox <rsc@swtch.com> wrote: > > I can't run fmtisect or fmtarenas directly on partition without this > > error: > > > > ; sudo /usr/local/plan9/bin/venti/fmtarenas -b 8192 > > arenas0. /dev/ad2:0-10G > > err 0: can't determine size of > > partition /dev/ad2 /usr/local/plan9/bin/venti/fmtarenas: can't open > > partition /dev/ad2:0-10G: can't determine size of partition /dev/ad2 > > [status 1] ; > > ls -l /dev/ad2 and look at the major device number. > There is a list in src/lib9/_p9dir.c and maybe it is missing. It seems that the major device number have change from FreeBSD 4.X to 5.X and from 5.X to 6.X . read devfs(5) and mknod(8) in the FreeBSD man. I tried it on FreeBSD 5.4 with this modification: #if defined(__FreeBSD__) || defined(__OpenBSD__) #include <sys/disklabel.h> #include <sys/ioctl.h> #if (__FreeBSD_version < 500000) || defined(__OpenBSD__) static int diskdev[] = { 151, /* aacd */ 116, /* ad */ 157, /* ar */ 118, /* afd */ 133, /* amrd */ 13, /* da */ 102, /* fla */ 109, /* idad */ 95, /* md */ 131, /* mlxd */ 168, /* pst */ 147, /* twed */ 43, /* vn */ 3, /* wd */ 87, /* wfd */ }; #endif #if (__FreeBSD_version >= 500000) && (__FreeBSD_version < 600000) static int diskdev[] = { 151, /* aacd */ 4, /* ad */ 157, /* ar */ 118, /* afd */ 133, /* amrd */ 13, /* da */ 102, /* fla */ 109, /* idad */ 95, /* md */ 131, /* mlxd */ 168, /* pst */ 147, /* twed */ 43, /* vn */ 3, /* wd */ 87, /* wfd */ }; #endif #if (__FreeBSD_version >= 600000) static int diskdev[] = { 151, /* aacd */ 0, /* ad */ 157, /* ar */ 118, /* afd */ 133, /* amrd */ 13, /* da */ 102, /* fla */ 109, /* idad */ 95, /* md */ 131, /* mlxd */ 168, /* pst */ 147, /* twed */ 43, /* vn */ 3, /* wd */ 87, /* wfd */ }; #endif I also made a little modification of isdisk(struct stat *st) just to see what happened: ; - sudo /usr/local/plan9/bin/venti/fmtarenas -b 8192 arenas0. /dev/ad2:0-10 diskdev[0] = 151 dev = 4 No Match: diskdev[0] != dev diskdev[1] = 4 dev = 4 Match: diskdev[1] == dev Return 1 err 0: can't determine size of partition /dev/ad2 /usr/local/plan9/bin/venti/fmtarenas: can't open partition /dev/ad2:0-10: can't determine size of partition /dev/ad2 [status 1] ; I have just change the value of "ad" for FreeBSD 5 and 6 because i don't know where i should find these value for the other device. -- GAGNON serge <serge.gagnon@b2b2c.ca> PGP KEY-ID: 0xBBC1478F PGP Fingerprint: B48B 4633 28F5 28F6 7A62 5650 69C8 E293 BBC1 478F PPG Key: http://quenix2.dyndns.org:7777 | telnet quenix2.dyndns.org 7777 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] plan9port venti FreeBSD 2005-12-31 4:22 ` Serge Gagnon @ 2005-12-31 10:36 ` C H Forsyth 2005-12-31 13:50 ` Russ Cox 0 siblings, 1 reply; 11+ messages in thread From: C H Forsyth @ 2005-12-31 10:36 UTC (permalink / raw) To: 9fans >>It seems that the major device number have change from FreeBSD 4.X to i wonder how many years it will be before the unix clones undo that aspect of the original design that could do with a change? you might have thought that devfs would fix it, but no, and furthermore, there's still mknod, `to recover deleted device entries'. ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] plan9port venti FreeBSD 2005-12-31 10:36 ` C H Forsyth @ 2005-12-31 13:50 ` Russ Cox 0 siblings, 0 replies; 11+ messages in thread From: Russ Cox @ 2005-12-31 13:50 UTC (permalink / raw) To: Fans of the OS Plan 9 from Bell Labs > i wonder how many years it will be before the unix clones undo that > aspect of the original design that could do with a change? > you might have thought that devfs would fix it, but no, > and furthermore, there's still mknod, `to recover deleted device entries'. I had hopes for Linux, but they seem to have implemented devfs poorly and then from that experience decided it wasn't the right way to go after all. Of course, then there's the fact that plain stat /dev/ad0 doesn't give you a reasonable size to begin with. I was partitioning some disks yesterday, and it was much less frustrating to port Plan 9's fdisk than to use FreeBSD's. As for the actual topic of this message, I added 4 to the list of major device numbers but that didn't completely solve the problem. Some disks still showed up as having zero size, presumably because they were unlabeled, and the code uses the FreeBSD disk label info to determine partition sizes. If anyone knows how to get the raw disk size out some other way, I'd be interested to hear about it. Russ ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <200512210421.jBL4LmZv058701@gate.bitblocks.com>]
* Re: [9fans] plan9port venti FreeBSD [not found] <200512210421.jBL4LmZv058701@gate.bitblocks.com> @ 2005-12-22 18:22 ` Serge Gagnon 2005-12-22 19:04 ` Russ Cox 0 siblings, 1 reply; 11+ messages in thread From: Serge Gagnon @ 2005-12-22 18:22 UTC (permalink / raw) To: 9fans Le 20 Décembre 2005 23:21, Bakul Shah a écrit : > There is no special magic number for venti. Just give it a > normal file or a freebsd partition (/dev/ad0s1e etc) or a > slice (/dev/ad0s2 etc.) I suggest you use normal files > while playing with venti. Hello, i tried it with normal files and it begins to work. I got this error with yesterday ; yesterday -d /COPYRIGHT diff -c /dump/quenix1/2005/1222/COPYRIGHT /COPYRIGHT diff: /dump/quenix1/2005/1222/COPYRIGHT: Input/output error [status 1] ; with this message on the terminal where i start venti and vnfs: % err 0: read too small: asked for 128 need at least 300 cannot open venti disk b8ab9f305bd8b1b7b5e7c18186e7336a94107e2c: read too small: asked for 128 need at least 300 I don't know what exactly it means. For information, i made my setup like this: create arenas and index: $ dd if=/dev/zero of=arenas0 seek=$((1024 * 1024 * 512 - 1)) bs=1 count=1 1+0 records in 1+0 records out 1 bytes transferred in 0.000109 secs (9178 bytes/sec) $ dd if=/dev/zero of=isect0 seek=$((1024 * 1024 * 24 - 1)) bs=1 count=1 1+0 records in 1+0 records out 1 bytes transferred in 0.000095 secs (10538 bytes/sec) ; 9 rc % venti/fmtisect -b 32k isect0. isect0 part isect0: file isect0 offset 0 size 25,165,824 fmtisect isect0: 743 buckets of 862 entries, 524,288 bytes for index map % venti/fmtarenas -b 32k arenas0. arenas0 part arenas0: file arenas0 offset 0 size 536,870,912 fmtarenas arenas0: 1 arenas, 536,051,712 bytes storage, 524,288 bytes for index map (I tried it with -b 16k the first time. It was just to see the difference) % cat venti.conf index main isect /home/serge/isect0 arenas /home/serge/arenas0 % venti/fmtindex venti.conf part venti.conf: file venti.conf offset 0 size 92 part /home/serge/isect0: file /home/serge/isect0 offset 0 size 25,165,824 part /home/serge/arenas0: file /home/serge/arenas0 offset 0 size 536,870,912 fmtindex: 1 arenas, 743 index buckets, 535,986,176 bytes storage And start venti: % venti/venti -c venti.conf -h tcp!localhost!8888 venti: conf...part venti.conf: file venti.conf offset 0 size 92 part /home/serge/isect0: file /home/serge/isect0 offset 0 size 25,165,824 part /home/serge/arenas0: file /home/serge/arenas0 offset 0 size 536,870,912 httpd tcp!localhost!8888...init...sync...announce tcp!*!venti...serving. (it is very fun to play with this ;) Ok, now i have backuped something: ; sudo vbackup /dev/ad1s2a Password: offset of magic: 1372 ffs magic 0x12253e51 offset of magic: 1372 ffs magic 0x19540119 mount /quenix1/2005/1222 ffs:b8ab9f305bd8b1b7b5e7c18186e7336a94107e2c 2005/1222/1222 # 2005/1222 12:22:23.491 /dev/ad1s2a ffs:b8ab9f305bd8b1b7b5e7c18186e7336a94107e2c It is my / partition And now I started vnfs: cat config mount /quenix1/2005/1222 ffs:b8ab9f305bd8b1b7b5e7c18186e7336a94107e2c 2005/1222/1222 % sudo vnfs -b 32k -c 1k config Password: handle da39a3ee5e6b4b0d and mount it: ; - vmount sudo vmount localhost /dump This is where i got a little problem: ; yesterday /COPYRIGHT /dump/quenix1/2005/1222/COPYRIGHT ; yesterday -d /COPYRIGHT diff -c /dump/quenix1/2005/1222/COPYRIGHT /COPYRIGHT diff: /dump/quenix1/2005/1222/COPYRIGHT: Input/output error [status 1] ; Sorry for my very beginner question... regards, -- GAGNON serge <serge.gagnon@b2b2c.ca> PGP KEY-ID: 0xBBC1478F PGP Fingerprint: B48B 4633 28F5 28F6 7A62 5650 69C8 E293 BBC1 478F PPG Key: http://quenix2.dyndns.org:7777 | telnet quenix2.dyndns.org 7777 ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] plan9port venti FreeBSD 2005-12-22 18:22 ` Serge Gagnon @ 2005-12-22 19:04 ` Russ Cox 2005-12-22 20:06 ` Serge Gagnon 0 siblings, 1 reply; 11+ messages in thread From: Russ Cox @ 2005-12-22 19:04 UTC (permalink / raw) To: serge.gagnon, Fans of the OS Plan 9 from Bell Labs Try running vnfs with -b 32768 instead of -b32k. I think there was a bug at one point, perhaps not yet fixed, where it didn't parse the -b suffixes. Russ ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] plan9port venti FreeBSD 2005-12-22 19:04 ` Russ Cox @ 2005-12-22 20:06 ` Serge Gagnon 0 siblings, 0 replies; 11+ messages in thread From: Serge Gagnon @ 2005-12-22 20:06 UTC (permalink / raw) To: 9fans Le 22 Décembre 2005 14:04, Russ Cox a écrit : > Try running vnfs with -b 32768 instead of -b32k. > I think there was a bug at one point, perhaps not yet > fixed, where it didn't parse the -b suffixes. It works!!! Its magic ;) I had to change -c 1k to -c 1024 because i got an error like 'no cache...' before xorg begun to be completely frozen and reboot. So i thought that 'no cache' and the -c was the same. Now it works and i'm very happy. ; yesterday -d /COPYRIGHT diff -c /dump/quenix1/2005/1222/COPYRIGHT /COPYRIGHT *** /dump/quenix1/2005/1222/COPYRIGHT Wed Dec 21 23:17:18 2005 --- /COPYRIGHT Thu Dec 22 14:57:05 2005 *************** *** 1,6 **** # $FreeBSD: src/COPYRIGHT,v 1.6 2005/01/01 07:29:19 sobomax Exp $ # @(#)COPYRIGHT 8.2 (Berkeley) 3/21/94 - # it is a test The compilation of software known as FreeBSD is distributed under the following terms: --- 1,5 ---- I have one or two other questions about venti, but i'll re-read the man page again and familiarize with venti before to ask these questions. Thanks a lot. -- GAGNON serge <serge.gagnon@b2b2c.ca> PGP KEY-ID: 0xBBC1478F PGP Fingerprint: B48B 4633 28F5 28F6 7A62 5650 69C8 E293 BBC1 478F PPG Key: http://quenix2.dyndns.org:7777 | telnet quenix2.dyndns.org 7777 ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-12-31 13:50 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-12-21 4:07 [9fans] plan9port venti FreeBSD Serge Gagnon 2005-12-21 4:43 ` Russ Cox 2005-12-21 4:44 ` Russ Cox 2005-12-27 19:41 ` Serge Gagnon 2005-12-30 19:40 ` Russ Cox 2005-12-31 4:22 ` Serge Gagnon 2005-12-31 10:36 ` C H Forsyth 2005-12-31 13:50 ` Russ Cox [not found] <200512210421.jBL4LmZv058701@gate.bitblocks.com> 2005-12-22 18:22 ` Serge Gagnon 2005-12-22 19:04 ` Russ Cox 2005-12-22 20:06 ` Serge Gagnon
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).