Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Jul 2005 19:21:56 -0700
From:      Glenn Dawson <glenn@antimatter.net>
To:        garys@opusnet.com (Gary W. Swearingen)
Cc:        freebsd-questions@freebsd.org, "J.D. Bronson" <jbronson@wixb.com>
Subject:   Re: bsdlabel question..
Message-ID:  <6.1.0.6.2.20050730191103.066f1240@cobalt.antimatter.net>
In-Reply-To: <t0pst07z49.st0@mail.opusnet.com>
References:  <6.2.5.1.2.20050730073623.00c12950@wixb.com> <6.1.0.6.2.20050730100508.13b4b060@cobalt.antimatter.net> <t0pst07z49.st0@mail.opusnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 02:39 PM 7/30/2005, Gary W. Swearingen wrote:
>Glenn Dawson <glenn@antimatter.net> writes:
>
> >                  pp->p_fstype = FS_BSDFFS;
> >                  pp->p_fsize = sblock.fs_fsize;
> >                  pp->p_frag = sblock.fs_frag;
> >                  pp->p_cpg = sblock.fs_fpg;
> >          }
> > The last line is the one that inserts that number.  sblock.fs_fpg is 
> the number of frags per cylinder grounp.
>
>Glenn, can you tell me which of those numbers, if any, can be changed
>after a newfs has been done and the file system well occupied with
>data?
>
>(The lousy sysinstall disk labeler wiped out several of my disk labels
>and I restored them with zeroes in those fields of the disk label.  It
>worked OK, but I'm guessing it only worked because the "bsdlabel"
>defaults were the same as they were when I first did "bsdlabel...;
>newfs...".  If defaults had changed or I used non-default values the
>first time, I'd have been SOL, right?  Or do those values just serve
>as optimization/tuning values for the kernel?)

As far as I am aware, the values listed in the label (see my sample below) 
for fsize (frag size), bsize (block size) and bps/cpg (used to be cylinders 
per group in 4.x, but 5.x writes frags per group in that space now) are 
there only for reference.  The numbers that the kernel cares about are the 
ones in the superblock.

# /dev/ad0s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
   a:   524288        0    4.2BSD     2048 16384 32776
   b:  2042752   524288      swap
   c: 390716802        0    unused        0     0         # "raw" part, 
don't edit
   d:   524288  2567040    4.2BSD     2048 16384 32776
   e:   524288  3091328    4.2BSD     2048 16384 32776
   f: 387101186  3615616    4.2BSD     2048 16384 28552


Another thing that's interesting to note, is that when you create a file 
system using newfs from 5.x, it always creates cylinder groups with only 
one cylinder.  That one cylinder has the same amount of blocks as multiple 
cylinders would have had using older versions of newfs.  I'm not really 
sure why that was done, but it seems to have happened when ufs2 support was 
added to newfs.  I posted to one of the lists a while back to try and find 
out why, but I never got a response.

-Glenn

>_______________________________________________
>freebsd-questions@freebsd.org mailing list
>http://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"




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