From owner-freebsd-fs@FreeBSD.ORG Fri May 25 04:50:59 2007 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F99616A421 for ; Fri, 25 May 2007 04:50:59 +0000 (UTC) (envelope-from arne_woerner@yahoo.com) Received: from web30301.mail.mud.yahoo.com (web30301.mail.mud.yahoo.com [209.191.69.63]) by mx1.freebsd.org (Postfix) with SMTP id 7763F13C487 for ; Fri, 25 May 2007 04:50:59 +0000 (UTC) (envelope-from arne_woerner@yahoo.com) Received: (qmail 7897 invoked by uid 60001); 25 May 2007 04:50:58 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=xIu/dlemaS1eppUQW8bj6VVAs0wadecWORo6P7/zsAFDw4LfSa+8J8i88pkZ3MbPikHn8Uv7C4YT+EJ98D3cUCvIojMVNXSfCyX2pCzLMxBtEBizClsp819/eXUC1VYPR0cWo6QYQRoFLor870Ii3eS3t9/mNJq8Akok6Y8COzg=; X-YMail-OSG: xVrb..8VM1nIVXFDEgYfqcTLl5S5G15jhS3IVKt66NczWxRl3efK7fmQ_6d3qjqYWO1PBrHtheCs1ScIuYhUGOZ9rbu6WrQQezpdPAwHHLCBv47oXG0- Received: from [85.212.48.7] by web30301.mail.mud.yahoo.com via HTTP; Thu, 24 May 2007 21:50:58 PDT Date: Thu, 24 May 2007 21:50:58 -0700 (PDT) From: Arne "Wörner" To: Nick Gustas , Richard Noorlandt , freebsd-fs@freebsd.org In-Reply-To: <4656264D.8010505@tychl.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <888834.6894.qm@web30301.mail.mud.yahoo.com> Cc: Subject: Re: Growing UFS beyond 2 TB X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 May 2007 04:50:59 -0000 --- Nick Gustas wrote: > Richard Noorlandt wrote: > > I have been on this list for only a few days now, so I don't know > > anything > > about these growfs patches. But I'll guess I can find them somewhere. > > Unless > > they're scattered all over the place ;-) > > > > I run 6.2-RELEASE by the way. What's the easiest way to get the right > > growfs > > version with the necessary patches? > > > > > > Meddling with a FS that has data on it is always scary, no matter what > > tools > > you use. But your detailed description helps a lot. So once I updated > > growfs > > I'll try this approach myself. > > > > Best regards, > > > > Richard > > > > I did a diff between the growfs.c from a 6.2-STABLE machine and what I > have now from list patches and GCC error fixing. *WARNING* it appears > to work, and compiles clean, but doesn't actually make a correct > filesystem! I don't know enough C to get past this, though I suspect > it's close and some study might get me there. > > http://masq.tychl.net/growfs.patch > Where have u found this: @@ -425,8 +425,8 @@ acg.cg_nextfreeoff = acg.cg_freeoff + howmany(sblock.fs_fpg, CHAR_BIT); if (sblock.fs_contigsumsize > 0) { acg.cg_clustersumoff = - roundup(acg.cg_nextfreeoff, sizeof(u_int32_t)); - acg.cg_clustersumoff -= sizeof(u_int32_t); + roundup(acg.cg_nextfreeoff, sizeof(u_int64_t)); + acg.cg_clustersumoff -= sizeof(u_int64_t); acg.cg_clusteroff = acg.cg_clustersumoff + (sblock.fs_contigsumsize + 1) * sizeof(u_int32_t); acg.cg_nextfreeoff = acg.cg_clusteroff + ??? That looks wrong... And this looks unnecessary, because there will never be a struct, that has a size of more than 2^31: :-) @@ -2109,7 +2108,7 @@ (osblock.fs_magic == FS_UFS2_MAGIC && osblock.fs_sblockloc == sblock_try[i])) && osblock.fs_bsize <= MAXBSIZE && - osblock.fs_bsize >= (int32_t) sizeof(struct fs)) + osblock.fs_bsize >= (int64_t) sizeof(struct fs)) break; } if (sblock_try[i] == -1) { I softly recommend, that u correct the patch accordingly (both changes r not necessary or even wrong) asap, so that nobody can try that... > ** /dev/md0p1 > ** Last Mounted on /mnt > ** Phase 1 - Check Blocks and Sizes > 322311525761044 BAD I=62663420 > 77308202712 BAD I=62663420 > 322414604976148 BAD I=62663420 > 77308202720 BAD I=62663420 > 322517684191252 BAD I=62663420 > 77308202728 BAD I=62663420 > 322620763406356 BAD I=62663420 > 77308202736 BAD I=62663420 > 322723842621460 BAD I=62663420 > 17178660600 BAD I=62663420 > 77308202704 BAD I=62663420 > EXCESSIVE BAD BLKS I=62663420 > CONTINUE? yes > Hmm... That might be a "normal" bug in growfs... Did u try the unpatched version with a smaller fs? -Arne ____________________________________________________________________________________Be a better Heartthrob. Get better relationship answers from someone who knows. Yahoo! Answers - Check it out. http://answers.yahoo.com/dir/?link=list&sid=396545433