freenas/freenas — pull request #23 by noprobs (2013-08-05 21:06:02+00:00)
Title: Repl enhance

Now that 9.1 has been released (great job) I would like to submit this significant change for consideration (which build on an earlier pull request). NOTE I am aware of a merge conflict in storage/migrations (my 0041 was created before master 0040) but though this easiest to address after code merge and using schemmigration tool

If you need more docs then please advise.

- freenas:state values extended to show 'Replicated', 'Replica', 'Queued', 'In_Progress' and 'Latest_Replica'. This is shown as replication status on main snapshots template (part ticket #778)
- Show progress of individual replication as % complete - again on status screen. NOTE: Have to refresh screen to watch increment
- Added option to not preserve filesystem path on replication (zfs receive -e) ie enable Local/Data/Subdata to replication to Remote/Repl/Subdata (#1851, #2062)
- Change in method of determining which snapshots need to be sent, now build list based on difference between local and remote file system. Numerous improvements:
- Replication not fail if some snaps removed from remote or LATEST flag removed/changed
- Can now replicate to multiple remote servers (#1455)
- Improvements to replication viability checking before starting replication
- Support multiple different snapshot schedules on same filesystem eg every 5 mins for 1 hour, every 1 hour for 24 hours etc (NOTE this was primarily a result of sorting change in 9.1 rather then my code) (ticket #1646)
- Fix bug if replication fails for a sustained period (eg network issue) then in some circumstance all replica snapshots can be expired causing replication fail/full re-send needed (ticket #2115)
- Added a new recursion option on replication which performs recursion via loop. This forces a check that all child replications work, correctly sets freenas:state and also allows for additional non recursed child snap task (#1999, #2360)
- Fix bug (#2359) by changing initialise once routine to destroy all snaps (vs delete remote dataset) unless there is a clone (previously clones were deleted)

As always feedback welcome. Whilst this has been working in my test lab I am sure there are still some errros.

Jon