At 02:39 PM 7/30/2005, Gary W. Swearingen wrote:
Glenn Dawson <[EMAIL PROTECTED]> 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 "[EMAIL PROTECTED]"
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"