From owner-freebsd-questions@FreeBSD.ORG Wed Feb 9 17:31:01 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 C163A16A4CE for ; Wed, 9 Feb 2005 17:31:01 +0000 (GMT) Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com [66.111.4.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EBC043D45 for ; Wed, 9 Feb 2005 17:31:01 +0000 (GMT) (envelope-from nkinkade@fastmail.fm) Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 419A9C562AB for ; Wed, 9 Feb 2005 12:31:00 -0500 (EST) X-Sasl-enc: 8ediuUtsY7pJa0xqX8gu8Q 1107970260 Received: from gentoo-npk.bmp.ub (unknown [206.27.244.136]) by www.fastmail.fm (Postfix) with ESMTP id 10DD825535 for ; Wed, 9 Feb 2005 12:31:00 -0500 (EST) Received: from nkinkade by gentoo-npk.bmp.ub with local (Exim 4.21) id 1Cyvg1-00008r-5D for freebsd-questions@freebsd.org; Wed, 09 Feb 2005 11:30:57 -0600 Date: Wed, 9 Feb 2005 11:30:57 -0600 From: Nathan Kinkade To: freebsd-questions@freebsd.org Message-ID: <20050209173057.GX8365@gentoo-npk.bmp.ub> Mail-Followup-To: freebsd-questions@freebsd.org References: <20050209163433.GW8365@gentoo-npk.bmp.ub> <20050209171039.GD37205@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tYlHSoJ8Aop8eNG2" Content-Disposition: inline In-Reply-To: <20050209171039.GD37205@xor.obsecurity.org> X-PGP-Fingerprint: 3FDF A406 B149 3959 A8CB C5A9 3B46 4812 D852 7E49 User-Agent: Mutt/1.5.6i Sender: Subject: Re: determine ufs2 %fragmentation on mounted filesystem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Nathan Kinkade List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Feb 2005 17:31:01 -0000 --tYlHSoJ8Aop8eNG2 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 09, 2005 at 09:10:39AM -0800, Kris Kennaway wrote: > On Wed, Feb 09, 2005 at 10:34:33AM -0600, Nathan Kinkade wrote: > > Does anyone know of a way to determine the %fragmentation on a mounted > > UFS2 filesystem? An entry showed up in messages yesterday stating that > > /usr has moved from time to space optimization yet the filesystem is > > only at about 25% of it's capacity. From what I can read it seems that > > the kernel might also make this switch if fragmentation becomes > > excessive. However, this is a busy production machine running Squid, so > > I can't conveniently umount /usr. >=20 > Try dumpfs(8). >=20 > Kris 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. 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 --tYlHSoJ8Aop8eNG2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFCCkjRO0ZIEthSfkkRApWVAKDA/5Z7zGyHDFt4DQuHPIZEtuGEOwCfaifR NMOa1gkMnKnCc3laanliuqk= =8dCv -----END PGP SIGNATURE----- --tYlHSoJ8Aop8eNG2--