Jump to content

How to install safecopy utility on Unraid?


Go to solution Solved by JonathanM,

Recommended Posts

TLDR in the beginning: I found a CLI utility called safecopy (https://safecopy.sourceforge.net/). I'd love to have it in Unraid. But it needs to be compiled - and that's not how Unraid works. How then?

 

Explanation:

 

I have two big VM images on an SSD cache drive with a btrfs partition. The drive is failing (in some way): more than 1000 errors in scrub, btrfs check and repair do nothing.

 

I need to copy these two big files off of the SSD, but when I just use MC, the process gets interrupted with I/O error. Unraid logs show messages like "Apr 2 19:33:01 SRV kernel: print_req_error: critical medium error, dev nvme0n1, sector 176853640", there is lots of them.

 

Why do I need to copy these VM images? Because they still work! Probably nothing serious damaged or lost inside the images themselves.

 

So I know what I'm doing, I only need these two files in whatever damaged state they are now. The rest has been copied already, only these two files are left.

 

I found a program called safecopy (https://safecopy.sourceforge.net/). Apparently it can do the job. But it needs to be compiled, there is a guide. But apparently Unraid lacks compilers and libraries and in general it's not THAT type of Linux.

 

So, how do I compile and run safecopy on Unraid? (And if it's possible to do in a Docker, then how do I do it?)

 

Thank you.

Link to comment
2 hours ago, JonathanM said:

Why don't you do a backup inside the VM, like you would if they were bare metal machines?

That fails even in sector-by-sector mode (I use Acronis True Image). I guess, the reason is that the software doesn't have direct hardware access and the system just spits out a bunch of errors and stops operation completely, expecting device/IO reset.

Link to comment
10 hours ago, JonathanM said:

ddrescue appears to do the same thing as safecopy, and it's already available for Unraid in nerdtools.

Yes, it did the trick, thank you! The images were succesfully copied, lost about 10 Kb of data in one and 1.3 Mb in another - no difference, they still function as intended. 

(I heard about ddrescue, but I thought it was a part of DD and that thing cannot ignore I/O errors either)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...