Date: Tue, 30 Mar 1999 08:47:27 +0930 From: Greg Lehey <grog@lemis.com> To: Matt of the Long Red Hair <mattp@conundrum.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: newfs of ccd0 crashes Message-ID: <19990330084727.L413@lemis.com> In-Reply-To: <Pine.BSF.4.10.9903290112081.5267-100000@aeon.conundrum.com>; from Matt of the Long Red Hair on Mon, Mar 29, 1999 at 01:16:25AM -0500 References: <19990329103342.M413@lemis.com> <Pine.BSF.4.10.9903290112081.5267-100000@aeon.conundrum.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, 29 March 1999 at 1:16:25 -0500, Matt of the Long Red Hair wrote:
> On Mon, 29 Mar 1999, Greg Lehey wrote:
>
>> 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:
>
> 1.37.2.1, actually... the patch failed (hunks 2 and 3 don't match).
>
> /* $Id: ccd.c,v 1.37.2.1 1999/02/18 22:06:00 ken Exp $ */
You said your system was from the end of January. OK, try this:
--- ccd.c 1999/02/18 22:06:00 1.37.2.1
+++ ccd.c 1999/03/11 19:21:31 1.37.2.2
@@ -1,4 +1,4 @@
-/* $Id: ccd.c,v 1.37.2.1 1999/02/18 22:06:00 ken 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 $ */
@@ -825,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)
@@ -903,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;
> I'm not sure of the right cvs commands to generate the diff, but if
> you want to let me know, I can just grab my own.
It's described in the handbook and in "The Complete FreeBSD", second
edition. It's a bit too involved to describe here.
>>>> 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.
>
> This might be worth looking at. I hear it's a lot like Veritas, but my
> experiences with Veritas (on Sun storage arrays, and mostly second-hand) are
> less than positive.
That's not quite typical. Veritas is (or was) a pig to administer,
but I've always found it pretty reliable.
> Is Vinum much more reliable?
No, but also not less reliable :-) I've gone to a lot of trouble to
make it easy to administer, but not everybody agrees that I've
succeeded. It's certainly a lot easier than ccd.
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990330084727.L413>
