Anyone come up with a solution to manage the replication of ZFS snapshots? The send/recv criteria gets tricky with all but the first unless you purge the destination of snapshots, then force a full stream into it. I was hoping to script a daily update but I see that I would have to keep track of what''s been done on both sides when using the -i|I syntax so it would not be reliable in a hands off script. Would AVS be a possible solution in a mixed S10/Osol/SXCE environment? I presume that would make it fairly trivially but right now I am duplicating data from an s10 box to an osol snv118 box based on hardware/application needs forcing the two platforms. Thanks for any ideas! jlc
On Thu, Jul 30, 2009 at 3:54 PM, Joseph L. Casale<JCasale at activenetwerx.com> wrote:> Anyone come up with a solution to manage the replication of ZFS snapshots? > The send/recv criteria gets tricky with all but the first unless you purge > the destination of snapshots, then force a full stream into it. > > I was hoping to script a daily update but I see that I would have to keep track > of what''s been done on both sides when using the -i|I syntax so it would not > be reliable in a hands off script. > > Would AVS be a possible solution in a mixed S10/Osol/SXCE environment? I presume > that would make it fairly trivially but right now I am duplicating data from an > s10 box to an osol snv118 box based on hardware/application needs forcing the > two platforms. > > Thanks for any ideas! > jlc > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >I came up with a somewhat custom script, using some pre-existing scripts I found about the land. http://www.brentrjones.com/?p=45 I schedule some file systems every 5 minutes, hour, and nightly depending on requirements. It has worked quite well for me, and proved to be quite useful in restoring as well (already had to use it). E-mails status reports, handles conflicts in a simple but effective way, and replication can be "reversed" by just starting to run it from the other system. I expanded on it by being able to handle A-B and B-A replication (mirror half of A to B, and half of B to A for paired redundancy). I''ll post that version up in a few weeks when I clean it up a little. Credits go to Constantin Gonzalez for inspiration and source for parts of my script. http://blogs.sun.com/constantin/ -- Brent Jones brent at servuhome.net
>I came up with a somewhat custom script, using some pre-existing >scripts I found about the land. > >http://www.brentrjones.com/?p=45Brent, That was super helpful. I had to make some simple changes to the ssh syntax as I use a specific user and identity file going from Solaris 10 to OpenSolaris 0906 but I am getting this message: The Source snapshot does exist on the Destination, clear to send a new one! Taking snapshot: /sbin/zfs snapshot mypool2/backups at 2009-07-31T16:34:54Z receiving incremental stream of mypool2/backups at 2009-07-31T16:34:54Z into mypool/backups at 2009-07-31T16:34:54Z received 39.7GB stream in 2244 seconds (18.1MB/sec) cannot set property for ''mypool2/backups at 2009-07-31T16:34:54Z'': snapshot properties cannot be modified cannot set property for ''mypool2/backups at 2009-58-30T21:58:15Z'': snapshot properties cannot be modified cannot set property for ''mypool2/backups at 2009-07-31T16:34:54Z'': snapshot properties cannot be modified Is that intended to modify the properties of a snapshot? Does that work in some other version of Solaris other than 10u7? Thanks so much for that pointer! jlc
On Fri, Jul 31, 2009 at 10:25 AM, Joseph L. Casale<JCasale at activenetwerx.com> wrote:>>I came up with a somewhat custom script, using some pre-existing >>scripts I found about the land. >> >>http://www.brentrjones.com/?p=45 > > Brent, > That was super helpful. I had to make some simple changes to the ssh > syntax as I use a specific user and identity file going from Solaris > 10 to OpenSolaris 0906 but I am getting this message: > > The Source snapshot does exist on the Destination, clear to send a new one! > Taking snapshot: /sbin/zfs snapshot mypool2/backups at 2009-07-31T16:34:54Z > receiving incremental stream of mypool2/backups at 2009-07-31T16:34:54Z into mypool/backups at 2009-07-31T16:34:54Z > received 39.7GB stream in 2244 seconds (18.1MB/sec) > cannot set property for ''mypool2/backups at 2009-07-31T16:34:54Z'': snapshot properties cannot be modified > cannot set property for ''mypool2/backups at 2009-58-30T21:58:15Z'': snapshot properties cannot be modified > cannot set property for ''mypool2/backups at 2009-07-31T16:34:54Z'': snapshot properties cannot be modified > > Is that intended to modify the properties of a snapshot? Does that work > in some other version of Solaris other than 10u7? > > Thanks so much for that pointer! > jlc > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >If I recall correctly, modifiable snapshot properties aren''t support in older versions of ZFS :( I wrote the script on Opensolaris 2008.11, which did have modifiable snapshot properties. Can you upgrade your pool versions possibly? -- Brent Jones brent at servuhome.net
>If I recall correctly, modifiable snapshot properties aren''t support >in older versions of ZFS :( >I wrote the script on Opensolaris 2008.11, which did have modifiable >snapshot properties. >Can you upgrade your pool versions possibly?I could, just don''t know of S10 would allow it on that side? I figured looking at the script it was for Solaris and not OpenSolaris, my bad. I can just ignore those errors on the send side, it''s working just fine. Thanks! jlc