ZFS Anyone attmpted data recovery?

mefizto

Aspiring Daemon

Reaction score: 12
Messages: 511

Greetings all,

due to several unfortunate events (a.k.a. stupidity), one filesystem was accidentally left out of backup. I was, therefore, wondering if anybody has some experience with any of the recovery tools, e.g., https://github.com/Stefan311/ZfsSpy, Klennet ZFS Recovery software, and the like?

As I do not want to attempt the recovery on the active system, I would first like to replicate the affected filesystem onto a different drive. How do I do that so that I save all (even the missing) data? Use dd?

If worst comes to worst, I can attempt to regenerate the data, but it will be a long and arduous process. So even if I could restore only some of the data, it would be a great help.

Kindest regards,

M
 

ralphbsz

Daemon

Reaction score: 1,486
Messages: 2,437

Copy: Use dd. Probably best to do it one partition at a time, unless the disk is unpartitioned. I would copy onto a blank disk; in theory, you could copy into a file in a different file system, but getting ZFS to mount that later might be gnarly.

Recovery tools for ZFS: I have no idea. In general, doing file system recovery is REALLY hard, and the only good solutions come from the actual developers of the file system, since they tend to be the only ones who actually know what the metadata really means.
 
OP
M

mefizto

Aspiring Daemon

Reaction score: 12
Messages: 511

Hi ralphbsz,

I know that it is close to impossible, I have read a lot about it. But, what do I have to lose, a few hours to try.

Thank you for confirming the use of dd.

Kindest regards,

M
 

wolffnx

Well-Known Member

Reaction score: 62
Messages: 354

Greetings all,

due to several unfortunate events (a.k.a. stupidity), one filesystem was accidentally left out of backup. I was, therefore, wondering if anybody has some experience with any of the recovery tools, e.g., https://github.com/Stefan311/ZfsSpy, Klennet ZFS Recovery software, and the like?

As I do not want to attempt the recovery on the active system, I would first like to replicate the affected filesystem onto a different drive. How do I do that so that I save all (even the missing) data? Use dd?

If worst comes to worst, I can attempt to regenerate the data, but it will be a long and arduous process. So even if I could restore only some of the data, it would be a great help.

Kindest regards,

M
Hi mefizto, at the point I know ZFS dont have a recovery tool
I lost a lot of personal data (for mistake) and try every tool I find
even the comercials on Windows
and nothing...
If you find a solution please post it
good luck
 

sko

Well-Known Member

Reaction score: 248
Messages: 456

Hi mefizto, at the point I know ZFS dont have a recovery tool
I lost a lot of personal data (for mistake) and try every tool I find
even the comercials on Windows
and nothing...
If you find a solution please post it
good luck
How should any windows software help in recovering ZFS data? This toy-OS doesn't even support any proper filesystem, let alone ZFS (yes, there is a OpenZFS port, but it is still highly experimental...)

The ZFS debugger zdb has some diagnostics and recovery capabilities. E.g. it can roll back transactions, which usually is _the_ way to go when trying to recover a pool that has gone sideways and lost data. (of course, if you completely lost the data e.g. by some drives failing, even zdb can't get back data from thin air...)
Lots of functions and options are said to be undocumented and the best way to go when every documented feature has been exhausted are the developer mailing lists.
Most - if not all - functionality ZfsSpy claims to be able to perform should be already covered by zdb and then some. For diagnostics there are also a ton of probes available (way over 6000...) to observe each and any aspect of ZFS to figure out what went wrong and why. Again, the best source of information for debugging ZFS with dtrace is also the ZFS dev mailing list.


Edit: I just remembered; regarding zdb there was a nice post on the delphix blog on some basic recovery functions it can perform:
This post was written at a very early state of zdb, so I don't know how much of it applies today and what has changed or improved since....
 

wolffnx

Well-Known Member

Reaction score: 62
Messages: 354

How should any windows software help in recovering ZFS data? This toy-OS doesn't even support any proper filesystem, let alone ZFS (yes, there is a OpenZFS port, but it is still highly experimental...)

The ZFS debugger zdb has some diagnostics and recovery capabilities. E.g. it can roll back transactions, which usually is _the_ way to go when trying to recover a pool that has gone sideways and lost data. (of course, if you completely lost the data e.g. by some drives failing, even zdb can't get back data from thin air...)
Lots of functions and options are said to be undocumented and the best way to go when every documented feature has been exhausted are the developer mailing lists.
Most - if not all - functionality ZfsSpy claims to be able to perform should be already covered by zdb and then some. For diagnostics there are also a ton of probes available (way over 6000...) to observe each and any aspect of ZFS to figure out what went wrong and why. Again, the best source of information for debugging ZFS with dtrace is also the ZFS dev mailing list.


Edit: I just remembered; regarding zdb there was a nice post on the delphix blog on some basic recovery functions it can perform:
This post was written at a very early state of zdb, so I don't know how much of it applies today and what has changed or improved since....
for my too,is a toy OS but in emergency i look anywere,and aee paid tools
 
OP
M

mefizto

Aspiring Daemon

Reaction score: 12
Messages: 511

Greetings all,

thank you for all the suggestions. I will try the zdb based on sko's recommendation.

Kindest regards,

M
 

achanler

New Member


Messages: 3

mefizto
+1 for making copies of the raw drives or partitions with dd first.

Then attempt to debug and recover on the copies so the original is safe. You can read about recovery I did recently in this post:

 
OP
M

mefizto

Aspiring Daemon

Reaction score: 12
Messages: 511

Hi achanler,

thank you very much for the link, I will study it.

I have been actually stuck on the dd. My (single) pool is raidz comprising three drives, and it has two datasets: music and backup. The one from which data was lost is music, but if I understand correctly, I need to image the entire pool. As I understand, dd works on hard drive, and I read that some people had problems restoring the pool after doing dd on the separate drives.

So, what I decided to do is add a second (separate) pool, take snapshot of the original pool and restore the snapshot on the second pool. I can then work on the first pool. If I am unsuccessful, well, I will have to restore from the original sources, but it will be a lot of effort.

Kindest regards,

M
 
Top