Subject: Re: Disklabel: "cpg/sgs"
To: None <netbsd-users@NetBSD.org>
From: Ignatios Souvatzis <ignatios@cs.uni-bonn.de>
List: netbsd-users
Date: 12/13/2004 15:26:30
--hHWLQfXTYDoKhP50
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Dec 13, 2004 at 02:45:51PM +0100, Florian Stoehr wrote:
> Hi,
>=20
> just wondering what the cpg/sgs means in disklabel?
>=20
> I split a 6 GB slice into two slices with disklabel -e and then
>=20
> newfs -b 8192 -f 1024 /dev/rsd0a (and 0f)
>=20
> the cpg/sgs changed from "29" to "46xxx".

=46rom "man 5 disklabel":
	(which describes the disk label data structure, as opposed to=20
	the "man 8 disklabel", which describes the disklabel command)

    union {
	u_int16_t cpg;  /* UFS: FS cylinders per group */
	_int16_t sgs;  /* LFS: FS segment shift */
    } __partition_u1;
    #define p_cpg   __partition_u1.cpg
    #define p_sgs   __partition_u1.sgs

Further information of the cpg parameter can be found in man newfs, of the
sgs parameter in man newfs_lfs.=20

newfs consults thedisk label to find out what values to use, if you don't=
=20
give it explicit values, then writes the used values back to the label.

Regards,
	-is

--hHWLQfXTYDoKhP50
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: 2.6.i

iQEVAgUBQb2mlDCn4om+4LhpAQHOJggAkI4WDWbPOCrd/FmWdfWslulx3LG28Egi
SOAftuu+EWh0Dv7Wu3yKlg173dKRQXWdCTopmp4WgS15BdNHsu3IGMOdvtrm5TgV
29+uU8j5lpc8AYhnzTFRmav7hm175e8hSGispLVYsGDVEe/5nznW74HkmIVeCxkX
64hXM0sCRYshp9sRfP4aGaRDZ5cTSH2TRetJVZxhZdLibWZb44oLT/u5dEKW04CZ
DT5KXc3Nip7EHDW+YP540yLrhQcB4ARqnMcm7TQTwfwFWcKjKrRk8O/FOtopmeS8
76ObFducTEI+eNxhIGcGR/rdw8WU3bqPLvlUG5a+3TyT+XsOX4bYMw==
=cQYu
-----END PGP SIGNATURE-----

--hHWLQfXTYDoKhP50--