You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to disable snapshot creation on pools that have an in progress zfs receive running.
This was a headache when trying to migrate data to new disks in a home NAS setup with zfs-auto-snapshot scripts installed. Part way into the zfs send | zfs receive I would get a failure and the process would end after a few hours of runtime. After a few wasted days, I finally disabled the auto snapshots and everything migrated without a hitch.
To prevent future frustration, it would be great if ZFS could handle this in a better way; perhaps by returning an error to the snapshot creation process (e.g. EBUSY) instead of the data set receive process.
The text was updated successfully, but these errors were encountered:
The bug (user-observed bad behavior) here is that an incremental "zfs receive" will fail if a snapshot was created while the receive is in progress. The receive will also fail if a snapshot exists before the receive starts.
I think the suggested fix (to disable snapshots while zfs receive is in progress) is prone to a race condition: a snapshot may be created just before the receive starts. If the -F flag is not used, then the receive will fail in this case as well.
I have fixed this in DelphixOS by making "zfs receive -F" remove snapshots after the incremental source snapshot. These snapshots may be been created while the receive was in progress, or before it started. We are working on getting this fix integrated into Illumos.
If I'm understanding correctly, I think that solution will cover my use case. Glad to hear there's already efforts being done to address it! If that work makes into Illumos and then trickles down into this port, I'll be happy with that.
It would be nice to disable snapshot creation on pools that have an in progress
zfs receive
running.This was a headache when trying to migrate data to new disks in a home NAS setup with zfs-auto-snapshot scripts installed. Part way into the
zfs send | zfs receive
I would get a failure and the process would end after a few hours of runtime. After a few wasted days, I finally disabled the auto snapshots and everything migrated without a hitch.To prevent future frustration, it would be great if ZFS could handle this in a better way; perhaps by returning an error to the snapshot creation process (e.g. EBUSY) instead of the data set receive process.
The text was updated successfully, but these errors were encountered: