From owner-freebsd-fs@FreeBSD.ORG Mon Sep 20 22:40:53 2010 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7E73106566C for ; Mon, 20 Sep 2010 22:40:53 +0000 (UTC) (envelope-from rick@rix.kiwi-computer.com) Received: from rix.kiwi-computer.com (66-191-70-202.static.stcd.mn.charter.com [66.191.70.202]) by mx1.freebsd.org (Postfix) with SMTP id 816438FC0C for ; Mon, 20 Sep 2010 22:40:53 +0000 (UTC) Received: (qmail 88856 invoked by uid 2000); 20 Sep 2010 22:40:52 -0000 Date: Mon, 20 Sep 2010 17:40:52 -0500 From: "Rick C. Petty" To: Jamie Ostrowski Message-ID: <20100920224052.GA88762@rix.kiwi-computer.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-fs@FreeBSD.org Subject: Re: understanding block distribution in UFS2 filesystems X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rick-freebsd2009@kiwi-computer.com List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2010 22:40:54 -0000 On Mon, Sep 20, 2010 at 03:56:41PM -0500, Jamie Ostrowski wrote: > I thought I understood how block distribution in UFS2 filesystems work, > until I tried running dumpfs on one of my filesystems. The output really > confused me, and the man page doesn't get into detail in explaining the > output. Can anyone explain why I am seeing references to the same "free > blocks" in different cylinder groups? > > I thought that the block numbers were unique across the entire > filesystem, but from the output of dumpfs, I see references to free blocks > 0-7 in almost every cylinder group. I suspect the block numbers (which are actually fragment numbers) are relative to each cylinder group. Blocks 0-7 are free in all cylinder groups except the first one, which is used for bootstrap. > So are the blocks that are in each cylinder group numbered start over > with a new block 0 in each cylinder group? > > In other words, which picture below is true, A, or B: > > > Cylinder group 0: Uses blocks 0-4000 > Cylinder group 1: Uses blocks 4001-8000 > Cylinder group 2: Uses blocks 8001-12000 This is correct. Each cylinder group contains its own bitmap of free space, a copy of the super block, and the inodes for that group. -- Rick C. Petty