From owner-freebsd-questions Tue Jan 7 4: 7:18 2003 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 1E6F337B401 for ; Tue, 7 Jan 2003 04:07:17 -0800 (PST) Received: from dire.bris.ac.uk (dire.bris.ac.uk [137.222.10.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 39CAC43EA9 for ; Tue, 7 Jan 2003 04:07:16 -0800 (PST) (envelope-from Jan.Grant@bristol.ac.uk) Received: from mail.ilrt.bris.ac.uk by dire.bris.ac.uk with SMTP-PRIV with ESMTP; Tue, 7 Jan 2003 12:06:55 +0000 Received: from cmjg (helo=localhost) by mail.ilrt.bris.ac.uk with local-esmtp (Exim 3.16 #1) id 18VsSd-0006FV-00; Tue, 07 Jan 2003 12:03:59 +0000 Date: Tue, 7 Jan 2003 12:03:59 +0000 (GMT) From: Jan Grant X-X-Sender: cmjg@mail.ilrt.bris.ac.uk To: Goedeke Michels Cc: freebsd-questions@FreeBSD.ORG Subject: Re: undelete or ffsrecover In-Reply-To: <3E0764E2.5000702@nebelschwaden.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Mon, 23 Dec 2002, Goedeke Michels wrote: > Hello, > > First of all, if this is the wrong group, please redirect me to a more > appropiate place. > > I am trying to recover some files I have accidentally deleted. However, > ffsrecov continuously complains about a corrupt super block and misssing > magic. The filesystems are ok, however (as long as you trust fsck) and > mount without problems. > I've also come across undelete(2), but since I have no clue about C, I > did not get very far with this (just put a main() { ... } around the > example. Compiled, but did not do anything). > I am running 4.7 stable (~week old) with soft-updates enabled > filesystems on an intel box. > > Most info I found on the web said "no chance", but have been quite old > and the appearance of an undelete function raised some hope. > > Is there any way of getting those files back ? There has been no write > activity on that partition since and now its mounted read-only. I do > have the inode of the parent folder (which contents I am missing) and > the names of the top level files and directories. > > Thanks for any help You might try using the fsdb command "ln" to create a new link to the missing inode; then copy the file contents to a separate filesystem before fixing everything with fsck. Note that if disk blocks from the original file have been reallocated then you're close to being out of luck. jan -- jan grant, ILRT, University of Bristol. http://www.ilrt.bris.ac.uk/ Tel +44(0)117 9287088 Fax +44 (0)117 9287112 http://ioctl.org/jan/ Bolstered by my success with vi, I proceeded to learn C with 'learn c'. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message