From owner-freebsd-hackers@FreeBSD.ORG Sun Jul 6 10:17:30 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4DAF337B401 for ; Sun, 6 Jul 2003 10:17:30 -0700 (PDT) Received: from phuket.psconsult.nl (ps226.psconsult.nl [213.222.19.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0D0A43FF2 for ; Sun, 6 Jul 2003 10:17:28 -0700 (PDT) (envelope-from paul@phuket.psconsult.nl) Received: from phuket.psconsult.nl (localhost [127.0.0.1]) by phuket.psconsult.nl (8.12.6p2/8.12.6) with ESMTP id h66HHRSP066740 for ; Sun, 6 Jul 2003 19:17:27 +0200 (CEST) (envelope-from paul@phuket.psconsult.nl) Received: (from paul@localhost) by phuket.psconsult.nl (8.12.6p2/8.12.6/Submit) id h66HHRdh066739 for hackers@freebsd.org; Sun, 6 Jul 2003 19:17:27 +0200 (CEST) Date: Sun, 6 Jul 2003 19:17:26 +0200 From: Paul Schenkeveld To: hackers@freebsd.org Message-ID: <20030706171726.GA66532@psconsult.nl> Mail-Followup-To: hackers@freebsd.org References: <20030704015704.Y57224-100000@mail.econolodgetulsa.com> <3F0848FF.A386477C@mindspring.com> <20030706161754.GA30740@webserver.get-linux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030706161754.GA30740@webserver.get-linux.org> User-Agent: Mutt/1.5.4i Subject: Re: recovering data from a truncated vn-file possible? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jul 2003 17:17:30 -0000 On Sun, Jul 06, 2003 at 09:17:54AM -0700, Joshua Oreman wrote: > On Sun, Jul 06, 2003 at 09:06:23AM -0700 or thereabouts, Terry Lambert wrote: > > Josh Brooks wrote: > > > Long story short, I have a 4gig vn-backed filesystem. The file backing it > > > is now missing the last 750megs ... I can vnconfig it, but when I fsck it > > > I see: > > > > Probably the first thing you'll want to do is write a small program > > to open the file and write a zero at the offset of the 750M to make > > the "device" the right size. Most of the recovery tools, including > > fsck, go into convulsions if the device size shrinks on them. So the > > first thing you want to do is change the size back to what it should > > be. > > He said it used to be 4gigs, so one would have to write a zero at 4gigs. > Or do this (slower, but it works): > $ dd if=/dev/zero bs=1m count=750 >> myfile $ truncate -s > -- Josh > > > > > -- Terry Paul Schenkeveld, Consultant PSconsult ICT Services BV