From owner-freebsd-fs@FreeBSD.ORG Mon Jul 11 05:08:33 2005 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7450F16A41C for ; Mon, 11 Jul 2005 05:08:33 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from cobalt.antimatter.net (cobalt.antimatter.net [69.55.224.239]) by mx1.FreeBSD.org (Postfix) with ESMTP id 428A943D46 for ; Mon, 11 Jul 2005 05:08:33 +0000 (GMT) (envelope-from glenn@antimatter.net) Received: from glenn-mobile.antimatter.net (cpe-66-27-86-22.san.res.rr.com [66.27.86.22]) (authenticated bits=0) by cobalt.antimatter.net (8.13.4/8.13.4) with ESMTP id j6B58UKN019717 (version=TLSv1/SSLv3 cipher=DES-CBC3-SHA bits=168 verify=NO); Sun, 10 Jul 2005 22:08:32 -0700 Message-Id: <6.1.0.6.2.20050710210126.1ff55cc0@cobalt.antimatter.net> X-Sender: glenn@cobalt.antimatter.net X-Mailer: QUALCOMM Windows Eudora Version 6.1.0.6 Date: Sun, 10 Jul 2005 22:02:47 -0700 To: freebsd-fs@freebsd.org From: Glenn Dawson Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: newfs, cylinder groups, and a few other things X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2005 05:08:33 -0000 Recently while looking into a particular problem, I found some things in the code for newfs(8) that don't make sense to me. Hopefully someone here can shed some light on things. The maxblkspercg variable which can be set using the -c option is actually treated as if it were the max frags per cylinder group. Slightly confusing when you specify max blocks and you end up with something a lot less. The second thing I noticed is that fs_old_cpg in struct fs, is always set to 1 when creating a ufs1 file system. The whole idea of cylinders and cylinder groups seems to have been rearranged so that what was previously a cylinder group, is now the same as a cylinder. So instead of having a cylinder group with 16 cylinders and 8 blocks per cylinder for a total of 128 blocks, you end up with 1 cylinder with 128 blocks. Probably not a big deal in most cases, but a ufs1 file system created with newfs in 4.x has very different geometry than one created in 5.x. It was that difference that brought my attention to this in the first place. Lastly, I also noticed that the value written to the disk label which used to be the number of cylinders per group, is now fragments per group (or cylinder since the groups never have more than 1 cylinder). The documentation for disklabel(8) doesn't mention this at all. -Glenn