From: Serge Gagnon <serge.gagnon@b2b2c.ca>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: Re: [9fans] plan9port venti FreeBSD
Date: Fri, 30 Dec 2005 23:22:27 -0500 [thread overview]
Message-ID: <E1EsYGB-0001AI-E9@quenix1.dyndns.org> (raw)
In-Reply-To: <ee9e417a0512301140u67ec937cjacc1c700149e4d3c@mail.gmail.com>
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
next prev parent reply other threads:[~2005-12-31 4:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-21 4:07 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 [this message]
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
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=E1EsYGB-0001AI-E9@quenix1.dyndns.org \
--to=serge.gagnon@b2b2c.ca \
--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).