On Dec 4, 2009, at 4:11 PM, Edward Ned Harvey wrote:

Depending of your version of OS, I think the following post from Richard
Elling
will be of great interest to you:
-
http://richardelling.blogspot.com/2009/10/check-integrity-of-zfs-send-streams .
html

Thanks!  :-)
No, wait! ....

According to that page, if you "zfs receive -n" then you should get a 0 exit
status for success, and 1 for error.

Unfortunately, I've been sitting here and testing just now ... I created a "zfs send" datastream, then I made a copy of it and toggled a bit in the
middle to make it corrupt ...

I found that the "zfs receive -n" always returns 0 exit status, even if the data stream is corrupt. In order to get the "1" exit status, you have to
get rid of the "-n" which unfortunately means writing the completely
restored filesystem to disk.

I believe it will depend on the nature of the corruption.  Regardless,
the answer is to use zstreamdump.
 -- richard

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to