Date: Fri, 18 Jan 2002 01:17:51 -0600 (CST) From: Kevin Day <toasty@temphost.dragondata.com> To: bde@zeta.org.au (Bruce Evans) Cc: hardware@FreeBSD.ORG Subject: Re: New disk driver can't label? Message-ID: <200201180717.g0I7HpM28026@temphost.dragondata.com> In-Reply-To: <20020117232652.K1448-100000@gamplex.bde.org> from "Bruce Evans" at Jan 18, 2002 12:02:07 AM
next in thread | previous in thread | raw e-mail | index | archive | help
> > On Wed, 16 Jan 2002, Kevin Day wrote: > > > I just wrote a disk driver for a new disk controller we'll be releasing to > > manufacturing soon. Using the md and ad drivers for an example, I've got it > > MOSTLY working. > > > > This works: > > > > su-2.04# dd if=/dev/zero of=/dev/fabd2 bs=512 count=100 > > 100+0 records in > > 100+0 records out > > 51200 bytes transferred in 0.081392 secs (629055 bytes/sec) > > fabd2: invalid primary partition table: no magic > > This is normal. You have the debug.bootverbose set. > > > su-2.04# disklabel -r -w fabd2 auto > > fabd2s1: type 0xa5, start 63, end = 150136559, size 150136497 : OK > > More output due to bootverbose. There seems to be an unstated fdisk > operation before this. Otherwise there would be no s1 slice. > > > su-2.04# newfs /dev/fabd2c > > fabd2: invalid primary partition table: no magic > > This is not consistent with the above. You must have had the magic to get > the slice and to not get the "no magic" message. > > > ... > > This doesn't, but it works fine on an ad driver: > > ... > > su-2.04# disklabel -r -w fabd2s1 auto > > disklabel: ioctl DIOCGDINFO: Invalid argument > > disklabel: auto: unknown disk type > > fabd2s1: type 0xa5, start 63, end = 150136559, size 150136497 : OK > > /kernel: fabd2: cannot find label (no disk label) > > /kernel: fabd2s1: cannot find label (no disk label) > > /kernel: fabd2: cannot find label (no disk label) > > /kernel: fabd2s1: cannot find label (no disk label) > > > > disklabel and vinum both want to call DIOCGDINFO on fabd2s1, which always > > returns EINVAL, but I can't figure out why my driver appears any differently > > than ad or md. I have to admit I'm really not an expert on the diskslice > > code, so I'm sort of lost. Does anyone have any ideas, or places to point me > > to figure out what I'm doing wrong? > > The error messages are mostly the result of earlier operations failing. > disklabel. DIOCGDVIRGIN on /dev/fabds1 failed for some reason. I can't > see how it could fail in the diskslice code, since it is just as easy > to reach as DIOCGDINFO in the diskslice code and DICOGDINFO was apparently > reached since it failed correctly (EINVAL for it just means that the > previous steps failed to create the label). Maybe the diskslice ioctl > is not actually being reached and another DIOCGDINFO is supplying the > EINVAL. > > Bruce I actually didn't even realize this, until just before I got your e-mail, but... I'm still using FreeBSD 4.2-RELEASE. According to the mailing list archives (which work much better when you spell DIOCGDINFO correctly, which is why I didn't find this the first time I looked), others ran into this before. http://www.freebsd.org/cgi/getmsg.cgi?fetch=831725+834647+/usr/local/www/db/text/2001/freebsd-questions/20010415.freebsd-questions as a reference. Sysinstall was capable of partitioning/disklabeling correctly, after I figured out how to make it recognize a new disk driver device, but fdisk/disklabel alone couldn't. In the morning I'll upgrade to -STABLE and see if this still happens. Thanks for your response, Kevin To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hardware" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200201180717.g0I7HpM28026>