Subject: Re: newfs: determining file system parameters
To: David Laight <david@l8s.co.uk>
From: Bill Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 10/20/2003 15:42:57
--s5/bjXLgkIwAv6Hi
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sat, Oct 18, 2003 at 10:58:00AM +0100, David Laight wrote:
> On Sat, Oct 18, 2003 at 05:27:23AM -0400, der Mouse wrote:
> > That's a reason to stop paying attention to the disklabel value, not a
> > reason to break -c.
>=20
> Ah - someone changed it to "max. blocks per group".
> It is currently ignored (for compatibility).

Compat with what?

> -C <count> could be used for the minimum number of cylinder groups.

I think we should have something that retains the old usage.

Mainly since in addition to creating a file system (when it makes most=20
sense to crank cpg up as far as it will go), newfs is also useful (with=20
-N) for printing out alternative superblock numbers. In _that_ usage, we=20
want a specific c/g number.

> > > Why do you want to set cpg?
> >=20
> > Personally, I like to set it to as large a value as it will let me, so
> > that as little space as possible is wasted on per-cg guff.  (In my
> > experience, yes, "wasted" is an appropriate term.
>=20
> That is the default - except that it tries to put 4 cgs in a small
> filesystems (and a hack to ensure there is only 1 cg in the memfs
> filesystem created by init).
>=20
> > I can't remember the last time I actually used any alternative[%]
> > superblock aside from the one in cg 0.)
>=20
> Yes, it would actually be nice if fsck checked that all the alternat{iv}e
> superblocks were present and correct before destroying the world when
> the system has found an old disklabel (and a pile of crap it assumed
> was a disklabel).

That's a different issue. I don't disagree that that'd be a nice thing to=
=20
do. :-)

> (actually checking 'first few' and 'last' might be good enough, and would
> allow the others to be used for files)
>=20
> I did also wonder whether mfs needs any of the alternates at all!

Probably not, but that to not have them creates more ffs issues than does=
=20
leaving them in.

Take care,

Bill

--s5/bjXLgkIwAv6Hi
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQE/lGTxWz+3JHUci9cRAtLWAJ9XZ3vr4bDNURo3d9cDIKozfDP0MgCfaCwI
cqnhFRLOd4B3/Ujj36wS98Q=
=1MeN
-----END PGP SIGNATURE-----

--s5/bjXLgkIwAv6Hi--