On Sun, Apr 12, 2009 at 08:15:04AM +1000, Alex Samad (a...@samad.com.au) wrote:

> > recovery of a partially lost lv is rather painful.
> 
> somebody else suggested a process on how to fix a missing pv (using
> /dev/zero) and then fsck'ing thus giving you a mountable partition, but
> how do you tell which files are valid and which are not !

Quite often you can do that by examining the files themselves,
although admittedly not always.

> Can you outline a process that allow you to find out which pv a file
> exists on ?

Sure: Use debugfs to determine which blocks the file uses,
apply a little math to get from blocks to extents,
then lvdisplay --maps to find out which pv they're on.

Of course, if the lost pv contains the inode(s) of the file
you want, it gets harder - even the fsck trick isn't likely
to work. I have once rescued a file under such circumstances
by searching for known pieces of the file content - not fun.
With a binary file it would've been all but impossible.

-- 
Tapani Tarvainen


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to