Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is zfs receive an atomic operation? Can a process read from or write to the receiving file system during the zfs receive operation? Can a process read any of the files in the incoming snapshot stream before the zfs receive operation completes?

share|improve this question
up vote 6 down vote accepted

zfs receive is atomic indeed. The incoming snapshot is not available until the receive completes successfully.

The receiving file system is unavailable (unmounted) during the reception of an incremental snapshot.

In the case of a full file system snapshot, there is no receiving file system in the first place.

Note that atomic doesn't means instantaneous, just that it is an all or nothing operation.

In particular, if you are unlucky enough for the data to be corrupted during its transport, the operation fails and ends with dataset rollback/destroy operation. That might trigger a significant activity and load if the size of the data already sent is large. Thanks to Nex7 for pointing that out.

share|improve this answer
Do you have a documentation reference or simple example that demonstrates this fact? – Derek Mahar Jan 30 '14 at 19:18
What happens to the incoming file system during the receive operation? Does the operating system disable it until the operation is complete? – Derek Mahar Jan 30 '14 at 19:19
Receive atomicity is a well known fact. Here is a statement by ZFS creator Remaining questions answered in my reply. – jlliagre Jan 30 '14 at 20:25
That statement by Matt should be read carefully. The 'reclaim' is similar to a zfs rollback, thus a zfs destroy. If the sent dataset is 10 TB and completed most of it before failing, the resulting reclaim can be incredibly IOPS intensive. Always keep that in the back of your mind when digging into performance oddities, as well as when performing maintenance tasks that involve pool export/import. – Nex7 Feb 1 '14 at 0:00
@Nex7 Thanks for pointing that, answer updated. – jlliagre Feb 1 '14 at 0:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.