From owner-freebsd-questions Sun Mar 28 17: 4:18 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 C26C914E58 for ; Sun, 28 Mar 1999 17:04:06 -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 KAA21650; Mon, 29 Mar 1999 10:33:46 +0930 (CST) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id KAA06553; Mon, 29 Mar 1999 10:33:42 +0930 (CST) Message-ID: <19990329103342.M413@lemis.com> Date: Mon, 29 Mar 1999 10:33:42 +0930 From: Greg Lehey To: Matt of the Long Red Hair Cc: freebsd-questions@FreeBSD.ORG Subject: Re: newfs of ccd0 crashes References: <19990328103355.O53452@lemis.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: ; from Matt of the Long Red Hair on Sat, Mar 27, 1999 at 08:42:44PM -0500 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 Saturday, 27 March 1999 at 20:42:44 -0500, Matt of the Long Red Hair wrote: > On Sun, 28 Mar 1999, Greg Lehey wrote: > >> On Friday, 26 March 1999 at 13:58:27 -0500, Matt of the Long Red Hair wrote: >>> >>> I've trying to get ccd set up on my home box with a pair of large drives, but >>> every time I try to newfs the ccd the machine crashes. I've gone through my >> >> Well, there's a lot more I'd like to see: >> >> 1. Which version of FreeBSD are you running? > > 3.1-stable (February 28th). Can't believe I forgot to include this in the > first place... :) OK. That should be revision 1.37. They brought in a fix for a certain overflow problem on 11 March. It fixes a bug that happens on ccds over 2 GB in size. You can try the following patch to /usr/src/sys/dev/ccd/ccd.c and see if it works: retrieving revision 1.37 retrieving revision 1.37.2.2 diff -w -u -r1.37 -r1.37.2.2 --- ccd.c 1998/09/15 08:15:26 1.37 +++ ccd.c 1999/03/11 19:21:31 1.37.2.2 @@ -1,4 +1,4 @@ -/* $Id: ccd.c,v 1.37 1998/09/15 08:15:26 gibbs Exp $ */ +/* $Id: ccd.c,v 1.37.2.2 1999/03/11 19:21:31 dg Exp $ */ /* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */ @@ -824,6 +825,7 @@ register struct ccdcinfo *ci, *ci2 = NULL; /* XXX */ register struct ccdbuf *cbp; register daddr_t cbn, cboff; + register off_t cbc; #ifdef DEBUG if (ccddebug & CCDB_IO) @@ -902,11 +904,10 @@ LIST_INIT(&cbp->cb_buf.b_dep); cbp->cb_buf.b_resid = 0; if (cs->sc_ileave == 0) - cbp->cb_buf.b_bcount = dbtob(ci->ci_size - cbn); + cbc = dbtob((off_t)(ci->ci_size - cbn)); else - cbp->cb_buf.b_bcount = dbtob(cs->sc_ileave - cboff); - if (cbp->cb_buf.b_bcount > bcount) - cbp->cb_buf.b_bcount = bcount; + cbc = dbtob((off_t)(cs->sc_ileave - cboff)); + cbp->cb_buf.b_bcount = (cbc < bcount) ? cbc : bcount; cbp->cb_buf.b_bufsize = cbp->cb_buf.b_bcount; >> 2. What do you mean by "crash"? Is it a panic, a spontaneous reboot >> or a hang? > > It's a hang. The machine locks up so that I have to hard-reset it. Bad news. If the patch doesn't work, see if you can create a smaller (< 2GB) ccd and newfs that. Of course, the alternative is Vinum, which is much more powerful. See http://www.lemis.com/vinum.html for more details. 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