From owner-freebsd-questions Fri Mar 12 17:24:42 1999 Delivered-To: freebsd-questions@freebsd.org Received: from allegro.lemis.com (allegro.lemis.com [192.109.197.134]) by hub.freebsd.org (Postfix) with ESMTP id EE8EF14C82 for ; Fri, 12 Mar 1999 17:24:36 -0800 (PST) (envelope-from grog@freebie.lemis.com) Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by allegro.lemis.com (8.9.1/8.9.0) with ESMTP id LAA27292; Sat, 13 Mar 1999 11:54:17 +1030 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id LAA06483; Sat, 13 Mar 1999 11:53:12 +1030 (CST) Message-ID: <19990313115312.T429@lemis.com> Date: Sat, 13 Mar 1999 11:53:12 +1030 From: Greg Lehey To: Nik Clayton , questions@FreeBSD.ORG Subject: Re: disklabel: no space left on device ? References: <19990312233856.A270@catkin.nothing-going-on.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <19990312233856.A270@catkin.nothing-going-on.org>; from Nik Clayton on Fri, Mar 12, 1999 at 11:38:56PM +0000 WWW-Home-Page: http://www.lemis.com/~grog Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Friday, 12 March 1999 at 23:38:56 +0000, Nik Clayton wrote: > Hi, > > I'm attaching a new SCSI disk to my FreeBSD 2.2.8-stable box. There's > already one SCSI disk in there, which works fine. > > This should be simple. > > The disk is attached. It's terminated properly (I've *triple checked* > this). It's recognised at boot time as > > (ncr0:1:0): "SEAGATE ST34520W 1444" type 0 fixed SCSI 2 > sd1(ncr0:1:0): Direct-Access > sd1(ncr0:1:0): WIDE SCSI (16 bit) enabled > sd1(ncr0:1:0): 40.0 MB/s (50 ns, offset 15) > > The SCSI ID doesn't clash (the other disk is ID 0, the adapter is ID 7). No, if there were a clash you wouldn't get that message. > All that remains is to label it and add a filesystem. > > # sh /dev/MAKEDEV/sd1 > [...] > # disklabel -w sd1 auto > disklabel: No space left on device > > Uh, what? Bug. > # disklabel -w -r sd1 auto > disklabel: /dev/rsd1c: Undefined error: 0 > > That's not supposed to happen. Bug. > On the off chance, I tried reading; > # disklabel sd1 > disklabel: ioctl DIOCGDINFO: Invalid argument It's trying to read a disk label, but it can't find one. > And I can't dd(1) to it either. . . > > # dd if=/dev/zero of=/dev/rsd1c > dd: /dev/rsd1c: end of device > 1+0 records in > 0+0 records out > > Reading the label on the other SCSI disk works without a problem. Yes, the other one has a label. > Anyone got any ideas? Do you have the "Complete FreeBSD"? There are some suggestions in there, but I can't guarantee that they'll work. For example, see if 'disklabel sd1' or 'disklabel -r sd1' gives you useful output. If it does, you can edit it and use it as input for 'disklabel -R -r sd1'. If that doesn't work, try rebooting and then try again: it's possible that the driver got confused by what you did before. You could also try finding out the real size of this disk and hand-building a disk label text (for 'disklabel -R -r sd1'). I've forgotten whether this will work on 2.2.8, but there is also a kernel option options SCSI_REPORT_GEOMETRY which will print out the information you need when you boot; possibly the -v option will also do this. On 3.1-STABLE, I get: da1 at ahc0 bus 0 target 2 lun 0 da1: Fixed Direct Access SCSI-CCS device da1: 3.300MB/s transfers da1: 573MB (1173930 512 byte sectors: 64H 32S/T 573C) > Or is this disk DOA and I should get a replacement? There's nothing to suggest that something is wrong with the disk here. Greg -- When replying to this message, please copy the original recipients. For more information, see http://www.lemis.com/questions.html See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message