ZFS recv doesn't properly skip existing snapshots
lapo at lapo.it
Tue Nov 2 18:28:05 UTC 2010
James R. Van Artsdalen wrote:
> I'm working on a way to keep a remote pool in sync with a local pool
> using zfs send/recv. [...]
> It appears "zfs recv" is supposed to simply skip any snapshot it already
> has [...] But instead "zfs recv" appears to never get in
> sync with the input stream again and simple exits.
I have come to the same conclusions, it seems to me that it follows a
"fail fast" approach and simply closes after the first "ignore", even
though the could be useful data afterwards.
In this thread http://opensolaris.org/jive/thread.jspa?threadID=116790
they're asking the O.P. "why are you sending the wrong initial snap?"
which applies to the case of sending a single filesystem, but as you
correctly pointed out when sending "zfs send -RI" an inconsistent state
can be reached even using the "correct" inizial snapshot, which might
exist on some of the sub-filesystems and not on the others.
I wonder if it might be as simple as removing the "fail fast" exit code
which I thin might be used after the "already exists; ignoring" warning,
but I still have to find the place in the code that is printed.
Oh, on 8-STABLE it is printed in line 1885 of
and the is no "fail fast" at all, so I guess it is failing (without
verbose errors) in recv_skip().
Lapo Luchini - http://lapo.it/
More information about the freebsd-fs