From owner-freebsd-questions@FreeBSD.ORG Wed Feb 9 18:06:22 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8092616A4CE for ; Wed, 9 Feb 2005 18:06:22 +0000 (GMT) Received: from matrix.teledomenet.gr (dns1.teledomenet.gr [213.142.128.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id C552643D41 for ; Wed, 9 Feb 2005 18:06:20 +0000 (GMT) (envelope-from nvass@teledome.gr) Received: from [192.168.1.71] ([192.168.1.71])j19HrIqG016850; Wed, 9 Feb 2005 19:53:19 +0200 From: Nikos Vassiliadis To: freebsd-questions@freebsd.org, Nathan Kinkade Date: Wed, 9 Feb 2005 20:09:37 +0200 User-Agent: KMail/1.6.2 References: <20050209163433.GW8365@gentoo-npk.bmp.ub> <20050209171039.GD37205@xor.obsecurity.org> <20050209173057.GX8365@gentoo-npk.bmp.ub> In-Reply-To: <20050209173057.GX8365@gentoo-npk.bmp.ub> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: 7bit Message-Id: <200502092009.37655.nvass@teledome.gr> Subject: Re: determine ufs2 %fragmentation on mounted filesystem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Feb 2005 18:06:22 -0000 On Wednesday 09 February 2005 19:30, Nathan Kinkade wrote: [snip] > > I had already tried dumpfs, but couldn't find any information about > actual filesystem fragmentation in the output. Erik's suggestion of > running `# fsck -t ufs2 /usr` seemed to work, though I felt a little > skittish about running it on a live filesystem. You can(must) use mksnap_ffs to take a snapshot and fsck that. Note that snapshots are meant to be read-only, so fsck -n, mount -r etc... > It found numerous > errors and auto-answered "no" for all of them, though I never specified > that it should do that. Does fsck just do this by default on a mounted > filesystem? Also, I had tried running fsck manually earlier and the > only difference between what I did and Erik's suggestion was the -t > option, which I wouldn't think should have been necessary. Shouldn't > fsck be able to determine the fs type by looking at the superblock? > > By the way, the fragmentation was as 5.1%. Quite high, and I'm > wondering how it got that way? Squid? > > Thanks, > Nathan