[Ukfreebsd] UFS data recovery

Luke Marsden luke-lists at hybrid-logic.co.uk
Mon Jun 20 17:34:05 BST 2011


On Mon, 2011-06-20 at 14:43 +0100, Andrew Wasilczuk wrote:
> Hi All,
> 
> One of my mates is currently on the way to a data center after one of
> the disks in his server died.  Unfortunately, it holds important data
> and the backup is unusable...
> 
> Can you recommend any good data recovery tools/techniques for FreeBSD
> UFS?  I think the box run FreeBSD-7.1.  Unfortunately I don't have any
> more detail as to how the disk failed other than fsck spitting out lots
> of errors (from what I heard on the phone).
> 
> Any advise is much appreciated.
> 
> Cheers,
> 
> Andrew.

Stop trying to fsck the failing disk immediately.  Don't issue any more
writes to it.

Get an identically sized or larger disk, and ddrescue [2] the contents
of the failing disk onto the new disk.  Since the disk is failing, you
want to minimise the number of reads you issue to it; ddrescue will help
you get as much data as possible off it with as few passes (read the
manpage [1] for more info on how it works).  Once you've got an "as good
as possible" copy of the bytes onto a fresh disk, chances of an fsck
running successfully on that are higher.  If you think you might need to
try multiple different types of data rescue, dd'ing the data off the
fresh disk onto a third disk, so that you can retry, is sensible.

ddrescue can take a long time, personally I recommend taking the disk
out of the data centre so you can attempt the rescue somewhere a bit
calmer and less exhausting.

Good luck to your friend!  (And check out our data replication solution,
link in my sig).

[1] http://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html
[2] http://www.freshports.org/sysutils/ddrescue

-- 
Best Regards,
Luke Marsden
CTO, Hybrid Logic Ltd.

Web: http://www.hybrid-cluster.com/
Hybrid Web Cluster - cloud web hosting

Phone: +447791750420




More information about the Ukfreebsd mailing list