Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Jul 2003 09:17:54 -0700
From:      Joshua Oreman <oremanj@webserver.get-linux.org>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        hackers@freebsd.org
Subject:   Re: recovering data from a truncated vn-file possible?
Message-ID:  <20030706161754.GA30740@webserver.get-linux.org>
In-Reply-To: <3F0848FF.A386477C@mindspring.com>
References:  <20030704015704.Y57224-100000@mail.econolodgetulsa.com> <3F0848FF.A386477C@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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

-- Josh

> 
> -- Terry
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030706161754.GA30740>