From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 26 06:39:47 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A3D61065673 for ; Fri, 26 Dec 2008 06:39:47 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (adsl-63-193-123-122.dsl.snfc21.pacbell.net [63.193.123.122]) by mx1.freebsd.org (Postfix) with ESMTP id 48CA78FC08 for ; Fri, 26 Dec 2008 06:39:47 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.3/8.14.3) with ESMTP id mBQ6dkwB073122; Thu, 25 Dec 2008 22:39:46 -0800 (PST) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.3/8.14.3/Submit) id mBQ6dkYe073121; Thu, 25 Dec 2008 22:39:46 -0800 (PST) (envelope-from david) Date: Thu, 25 Dec 2008 22:39:46 -0800 From: David Wolfskill To: Sergey Zaharchenko Message-ID: <20081226063946.GX4100@albert.catwhisker.org> References: <20081226011402.GP4100@albert.catwhisker.org> <20081226012224.2fbd579a@gluon> <20081226014956.GR4100@albert.catwhisker.org> <20081226063542.GA20518@shark.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zAIN9dnKNiFxaW1E" Content-Disposition: inline In-Reply-To: <20081226063542.GA20518@shark.localdomain> User-Agent: Mutt/1.4.2.3i Cc: hackers@freebsd.org Subject: Re: How to quickly determine if UFS2 FS is "clean" from command line? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Dec 2008 06:39:47 -0000 --zAIN9dnKNiFxaW1E Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 26, 2008 at 09:35:42AM +0300, Sergey Zaharchenko wrote: > ... > Some of the stuff you want can be found here: >=20 > root@shark:~# file -s /dev/ufs/home=20 > /dev/ufs/home: Unix Fast File system [v2] (little-endian) last mounted on= /home, volume name home, last written at Fri Dec 26 06:33:07 2008, clean f= lag 0, readonly flag 0, number of blocks 13631488, number of data blocks 13= 202246, number of cylinder groups 145, block size 16384, fragment size 2048= , average file size 16384, average number of files in dir 64, pending block= s to free 4, pending inodes to free 0, system-wide uuid 0, minimum percenta= ge of free blocks 8, TIME optimization >=20 > You probably want the clean flag (which is 0 for me because that device > node is mounted). Very nice; thanks! Seems that both ffsinfo(8) & file(1) can do the job quickly; dumpfs(8) can do it, but takes around 33 seconds for a 400 GB file system (because it also dumps the cylinder groups). Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --zAIN9dnKNiFxaW1E Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAklUfDEACgkQmprOCmdXAD0q/gCeOz76APKw3QUUjzLYh3bJGor+ 9FQAn2FjfR60O4Wqf7CEZfOjETFf4Js5 =UDBA -----END PGP SIGNATURE----- --zAIN9dnKNiFxaW1E--