Can we assume that any snapshot listed by either ''zfs list -t snapshot'' or ''ls .zfs/snapshot'' and previously created with ''zfs receive'' is complete and correct? Or is it possible for a ''zfs receive'' command to fail (corrupt/truncated stream, sigpipe, etc...) and a corrupt or incomplete snapshot to exist after the command failed? Thoughts on this would be much appreciated. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20090319/dc2334e4/attachment.html>
Richard Elling
2009-Mar-20 00:24 UTC
[zfs-discuss] is ''zfs receive'' atomic per snapshot?
Jos? Gomes wrote:> Can we assume that any snapshot listed by either ''zfs list -t > snapshot'' or ''ls .zfs/snapshot'' and previously created with ''zfs > receive'' is complete and correct? Or is it possible for a ''zfs > receive'' command to fail (corrupt/truncated stream, sigpipe, etc...) > and a corrupt or incomplete snapshot to exist after the command > failed? Thoughts on this would be much appreciated.receives are all-or-nothing per snapshot. -- richard
Matthew Ahrens
2009-Mar-20 00:43 UTC
[zfs-discuss] is ''zfs receive'' atomic per snapshot?
Jos? Gomes wrote:> Can we assume that any snapshot listed by either ''zfs list -t snapshot'' > or ''ls .zfs/snapshot'' and previously created with ''zfs receive'' is > complete and correct? Or is it possible for a ''zfs receive'' command to > fail (corrupt/truncated stream, sigpipe, etc...) and a corrupt or > incomplete snapshot to exist after the command failed? Thoughts on this > would be much appreciated.If a ''zfs recv'' fails for any reason (bad stream, system crash, etc), its space will be reclaimed. The snapshot won''t appear in the namespace until it has been successfully received. --matt
2009/3/19 Richard Elling <richard.elling at gmail.com>> Jos? Gomes wrote: > >> Can we assume that any snapshot listed by either ''zfs list -t snapshot'' or >> ''ls .zfs/snapshot'' and previously created with ''zfs receive'' is complete and >> correct? Or is it possible for a ''zfs receive'' command to fail >> (corrupt/truncated stream, sigpipe, etc...) and a corrupt or incomplete >> snapshot to exist after the command failed? Thoughts on this would be much >> appreciated. >> > > receives are all-or-nothing per snapshot. > -- richard > >This is good. Thanks a lot, Richard. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20090320/b04445ad/attachment.html>
2009/3/19 Matthew Ahrens <Matthew.Ahrens at sun.com>> Jos? Gomes wrote: > >> Can we assume that any snapshot listed by either ''zfs list -t snapshot'' or >> ''ls .zfs/snapshot'' and previously created with ''zfs receive'' is complete and >> correct? Or is it possible for a ''zfs receive'' command to fail >> (corrupt/truncated stream, sigpipe, etc...) and a corrupt or incomplete >> snapshot to exist after the command failed? Thoughts on this would be much >> appreciated. >> > > If a ''zfs recv'' fails for any reason (bad stream, system crash, etc), its > space will be reclaimed. The snapshot won''t appear in the namespace until > it has been successfully received. > > --matt >Great. Thank you, Matthew. J. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20090320/46b52027/attachment.html>