Newfs under SunOS4.1 reports file system sizes incorrectly

nobody at kodak.com nobody at kodak.com
Fri Jul 20 04:27:50 AEST 1990


In article <9843 at brazos.Rice.edu> jms at tardis.tymnet.com (Joe Smith) writes:
>130 cyls / (16 cyls/group) = 8.13 groups, must round up to 9 cyl groups

One handy thing that I learned by taking a one morning tutorial from Dr.
Kirk McKusick on the fast file system was what cylinder groups were and
why they existed.  It was a few years ago, but I did remember that a
cylinder group is an entity that is a reference for certain things such as
the number of inodes/group.  So there is no such thing as a fractional
cylinder group, you may have 8 cylinder groups that are of the size 16
cylinders and 1 cylinder group which has only 2 cylinders in it, but you
do really have 9 cylinder group.  Newfs makes sure of that.  One of the
other things that is done by newfs in each cylinder group is to allocate
the inodes.  

Things may have changed with mkfs (please correct me if I am wrong), but
mkfs didn't used to do fractional inode allocations.  I.E.  It will
allocate 4608 inodes in your 2 cylinder - cylinder group, just the same as
it will in a 16 cylinder cylinder group.  (4608 i/g was contained in the
original posting).  

If you ever have a disk on a new system that you can play with formatting,
try making a cylinder group with just 2 cylinders in it.  You would be
amazed at how much of the file system is occupied by inodes. 

<S> - S curve - go slow.  Personally, I collect up what I would have put
in small cylinder groups, and often shift it into one partition to make at
least a 8 cylinder - cylinder group.  Otherwise I add it to the swap.  I
have tried to vary the number of cylinders per group (I did it a few years
ago on an Ultrix system), and although the option is there in newfs and
mkfs, it had absolutely *no* effect .. they all came out 16 cylinders per
group.  

I have been out of it (system administration) for a while you see. So
please test out some of the things that I have said, or check with someone
with source.  I still layout partitions always on even cylinder boundaries
with the mininmum size of a cylinder group being 8 cylinders.  Most of the
time I layout all partitions so that all cylinder groups have all 16
cylinders in them.  Any "left over" cylinders, I usually add to the swap
(which doesn't have a file system on it) -- if the disk has a partition
used for swap.

Hope this helps.

James H. Moore                            
User Services Coordinator
Eastman Kodak Company   
Rochester, NY 14653-5403    Email: jmoore at ssd.kodak.com



More information about the Comp.sys.sun mailing list