From owner-freebsd-current@FreeBSD.ORG Tue Apr 20 06:47:43 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 726D116A4CE for ; Tue, 20 Apr 2004 06:47:43 -0700 (PDT) Received: from mail.delit.net (delit.net [194.67.27.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31EF443D4C for ; Tue, 20 Apr 2004 06:47:43 -0700 (PDT) (envelope-from smir@delit.net) Received: by mail.delit.net (Postfix, from userid 426) id 42B69350D6; Tue, 20 Apr 2004 17:47:42 +0400 (MSD) Received: from delit.net (ppp0-27.pppoe.mtu-net.ru [81.195.0.27]) by mail.delit.net (Postfix) with ESMTP id E7B04350D4; Tue, 20 Apr 2004 17:47:41 +0400 (MSD) Message-ID: <408529FD.5000306@delit.net> Date: Tue, 20 Apr 2004 17:47:41 +0400 From: Andrey Smirnov User-Agent: Mozilla Thunderbird 0.5 (X11/20040324) X-Accept-Language: ru, en-us, en MIME-Version: 1.0 To: Steve Ames , current@freebsd.org References: <4084F85B.5070909@delit.net> <20040420102632.GA36668@e-Gitt.NET> <20040420121423.GA1154@frontfree.net> <20040420125025.GA30066@energistic.com> <4085229C.2000303@delit.net> <20040420133928.GA30973@energistic.com> In-Reply-To: <20040420133928.GA30973@energistic.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: A way to recover deleted files (just contents) from USF2 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2004 13:47:43 -0000 Steve Ames wrote: > On Tue, Apr 20, 2004 at 05:16:12PM +0400, Andrey Smirnov wrote: > >>I've got ffsrecov to work in several hours of fixing it up to work with >>UFS2. But actually it can do nothing with deleted files - their inodes >>are all zeroes, excluding uid/gid, which is less important to me.... >>Seems like everything is lost... ;-(((( > > > Do you trust your patches enough to submit them to the ffsrecov developers > or to the port-maintainer? Some good should come out of your misfortune :) They were ugly hacks... Not patches ;-( It seemed like working, but I can't be 100% sure, and I suppose I don't have enough knowledge to make it really correct. Some of them are fixes like 32bit->64bit and most of them are substitutions, when structure names changed with UFS1->UFS2. Also stat(/dev/ad0s1a) doesn't return valid size (it returns zero), after that ffsrecov tries mmaping zero bytes, succeeds and crashes afterwards. I changed behaviour to fallback on read(2). That's all, but I suppose there are more deep problems.