Skip to content
Valentin Hilbig edited this page Dec 3, 2016 · 5 revisions

This is not ready today,but it hopefully is a pointer in the right direction.

Sadly I have not yet found a way to support ddrescue. However there is a way to pull the image and then use ddrescue-verify to verify the result.

Note that I will improve this as soon as I need it.

This is not a complete solution yet. Best would be to integrate some generic remote dev access driver into ddrescue and ddrescue-verify, such that you can provide your own remote driver for ssh and others.

Working with remotes

Here is the situation:

  • You have a local machine with plenty of storage.
  • You have a remote machine which is somewhat broken.
  • The link to the remote is not exactly stable, so there may be interruptions any time
  • The filesystem on the remote is so broken, that it no more mounts, so using rsync and similar does not work
  • You want to take an image of the remote drives, before you try to repair.

Here is how it works:

  • Boot the remote machine into some rescue system which offers root ssh access
  • That's enough to pull the image

Step 1

Pull the image using sshcopydev, see https://github.com/hilbix/sshcopydev

Step 2 (missing for now)

Create a dummy ddrescue compatible logfile (sorry, this step is missing)

Following is untested, but it should work:

Instead, with Linux, you can create dummy device using the

IMAGE=image dmsetup.sh DEVNAME

script of sshcopydev to create a clone of the remote drive, which also will keep the unreadable parts unreadable

Now you can use ddrescue to create an ddrescue compatible log like with

ddrescue /dev/mapper/DEVNAME /dev/null image.ddrescue.log

(And yes, outch, this hurts, to write all data to /dev/null)

Step 3

Use ddrescue-verify to verify the image on the remote.

You probably need a statically compiled ddrescue-verify version to run it on the remote.

Note that, at the time of writing, sshcopydev provides it's own verification hint in the file TODO.md

Step 4 (missing)

Pull the differences, somehow

Well, no, sorry, I have no easy to follow recipe for this yet

Note

I have nothing to do with ddrescue. I am only the author of ddrescue-verify.

Clone this wiki locally