From owner-freebsd-questions@FreeBSD.ORG Wed Nov 5 05:39:07 2003 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 3463416A4CE for ; Wed, 5 Nov 2003 05:39:07 -0800 (PST) Received: from be-well.no-ip.com (lowellg.ne.client2.attbi.com [66.30.200.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id 665B543F75 for ; Wed, 5 Nov 2003 05:39:06 -0800 (PST) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: by be-well.no-ip.com (Postfix, from userid 1147) id E69883B0B; Wed, 5 Nov 2003 08:39:05 -0500 (EST) Sender: lowell@be-well.ilk.org To: Mark References: <200311041017.HA4AHEC4013488@asarian-host.net> From: Lowell Gilbert Date: 05 Nov 2003 08:39:05 -0500 In-Reply-To: <200311041017.HA4AHEC4013488@asarian-host.net> Message-ID: <44ptg7aq9y.fsf@be-well.ilk.org> Lines: 56 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii cc: freebsd-questions@freebsd.org Subject: Re: I need help restoring my /usr partition! X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Nov 2003 13:39:07 -0000 Mark writes: > I need some urgent help! Trying to restore my /usr partition (FreeBSD 4.7R), > I get the following errors: > > % restore -N -rf ./usr.back > expected next file 1125, got 7 > expected next file 1125, got 8 > expected next file 1125, got 529 > expected next file 1125, got 530 > expected next file 6995, got 6872 > expected next file 6995, got 6873 > expected next file 8502, got 8483 > expected next file 8502, got 8484 > expected next file 8828, got 8736 > expected next file 8828, got 8737 > expected next file 22844, got 9619 Sounds like problems with the backup, not the disk you're restoring to. > Etc. This is the result of the fsck: > > % fsck /usr > ** /dev/ad0s1g (NO WRITE) > ** Last Mounted on /usr > ** Phase 1 - Check Blocks and Sizes > ** Phase 2 - Check Pathnames > ** Phase 3 - Check Connectivity > ** Phase 4 - Check Reference Counts > UNREF FILE I=7 OWNER=nobody MODE=100644 > SIZE=1744 MTIME=Nov 3 14:33 2003 > CLEAR? no > > UNREF FILE I=8 OWNER=nobody MODE=100644 > SIZE=6952 MTIME=Nov 4 10:52 2003 > CLEAR? no > > UNREF FILE I=529 OWNER=root MODE=100660 > SIZE=0 MTIME=Nov 3 00:08 2003 > CLEAR? no > > UNREF FILE I=530 OWNER=root MODE=100660 > SIZE=1521 MTIME=Nov 3 09:13 2003 > CLEAR? no > > > I have no idea what these file are, or how to get rid of them. Somebody, > please help! Looks like you're doing your fsck while the filesystem is mounted read-write. Don't do that. Unmount it first (single-user mode is good for this), and *then* fsck it. You probably won't find any problems at that time, though -- the unreferenced file handles may just be normal open handles that will be cleaned up when the filesystem is umounted and flushed to disk.