From owner-freebsd-questions Fri Aug 24 8:13:52 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.hiwaay.net (fly.HiWAAY.net [208.147.154.56]) by hub.freebsd.org (Postfix) with ESMTP id F146D37B403 for ; Fri, 24 Aug 2001 08:13:47 -0700 (PDT) (envelope-from steve@havk.org) Received: from bsd.havk.org (user-24-214-56-224.knology.net [24.214.56.224]) by mail.hiwaay.net (8.11.6/8.11.6) with ESMTP id f7OFDkS12534 for ; Fri, 24 Aug 2001 10:13:46 -0500 (CDT) Received: by bsd.havk.org (Postfix, from userid 1001) id 302B31A85D; Fri, 24 Aug 2001 10:13:45 -0500 (CDT) Date: Fri, 24 Aug 2001 10:13:45 -0500 From: Steve Price To: questions@freebsd.org Subject: determining blocks used by a file Message-ID: <20010824101345.M70621@bsd.havk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Operating-System: FreeBSD 4.3-STABLE i386 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I'm trying to resurrect the some of the contents of a drive that crashed. It was suggested that I get acquainted with fsdb so I'm digging in and realize most of what I'm looking at doesn't make a lot of sense. root@max(~)# fsdb /dev/vinum/mirror ** /dev/vinum/mirror Editing file system `/dev/vinum/mirror' Last Mounted on /a current inode: directory I=2 MODE=40755 SIZE=512 MTIME=Aug 11 20:41:59 2001 [0 nsec] CTIME=Aug 11 20:41:59 2001 [0 nsec] ATIME=Aug 21 03:01:03 2001 [0 nsec] OWNER=root GRP=wheel LINKCNT=8 FLAGS=0 BLKCNT=2 GEN=54e262d0 fsdb (inum: 2)> cd mysql/db.err component `mysql': current inode: directory I=4317304 MODE=40700 SIZE=512 MTIME=May 9 00:03:42 2001 [0 nsec] CTIME=May 9 00:03:42 2001 [0 nsec] ATIME=May 23 03:01:06 2001 [0 nsec] OWNER=mysql GRP=mysql LINKCNT=14 FLAGS=0 BLKCNT=2 GEN=7b332725 component `db.err': current inode: regular file I=4317399 MODE=100644 SIZE=2281 MTIME=Apr 12 01:06:28 2001 [0 nsec] CTIME=Apr 12 11:52:43 2001 [0 nsec] ATIME=Apr 12 11:52:43 2001 [0 nsec] OWNER=mysql GRP=mysql LINKCNT=1 FLAGS=0 BLKCNT=6 GEN=71eb0825 fsdb (inum: 4317399)> So the file mysql/db.err uses inode 4317399 and there are 6 blocks associated with this file. How do I determine which blocks those are and what their contents are? Thanks. -steve To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message