Subject: Re: HDD-woes on Sparcstation 5
To: None <port-sparc@NetBSD.org>
From: David Laight <david@l8s.co.uk>
List: port-sparc
Date: 11/19/2006 22:18:06
On Mon, Nov 20, 2006 at 06:49:42AM +0900, Henry Nelson wrote:
> > > >  d:    392000    522480     4.2BSD   1024  8192 39200 
> > >                                                   ^^^^^
> > > How do you calculate "cpg/sgs"?  TIA
> > 
> > By taking the bottom 16 bits of number of fragments in a 'cylinder group'.
> 
> I don't know what that means.  Perhaps an example, please?

'cpg' stand for cylinders per group, and is (was) the size of a cylinder
group.  Recent changes to the way newfs works mean that 'cylinder groups'
are no longer aligned on cylinder boundaries! so someone but the cylinder
size into the same field - but measured in file system fragments (typically
1k for moderate size filesystems) - which overflows the 16bit field.
Fortunately nothing need to know the number - unless you are trying to
find the alternate superblock in the 2nd cylinder group after something
overwrote the first part of the file system.

The size of a cylinder group is limited by the fact that the allocation
bitmap for each group must fit inside a filesystem block (typically 8k).
Which limits a cylinder group to under 64MB (because of the inode map).
This is why lage disks have so many cylinder groups.

	David

-- 
David Laight: david@l8s.co.uk