Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 May 2007 21:50:58 -0700 (PDT)
From:      Arne "Wörner" <arne_woerner@yahoo.com>
To:        Nick Gustas <freebsd-fs@tychl.net>, Richard Noorlandt <lists.freebsd@gmail.com>, freebsd-fs@freebsd.org
Subject:   Re: Growing UFS beyond 2 TB
Message-ID:  <888834.6894.qm@web30301.mail.mud.yahoo.com>
In-Reply-To: <4656264D.8010505@tychl.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--- Nick Gustas <freebsd-fs@tychl.net> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?888834.6894.qm>