Hi everyone, I have a very strange problem. I''ve written a simple script that uses zfs send/recv to send a filesystem between two hosts using ssh. Works like a charm - most of the time. As you know we need a two snapshots when we do a incremental send. But the problem is something is touching my filesystems on the receiving side so they are no longer identical. I''m doing a rollback and a couple of seconds later they are different again. This has happened on a number of machines but not always. Real example # zfs list -r data/appservers/appsvr2-zone NAME USED AVAIL REFER MOUNTPOINT data/appservers/appsvr2-zone 11.7G 77.1G 11.7G /data/appservers/appsvr2-zonedata/appservers/appsvr2-zone at transport_20061017085447 100K - 11.7G - # zfs rollback data/appservers/appsvr2-zone at transport_20061017085447 # zfs list -r data/appservers/appsvr2-zone NAME USED AVAIL REFER MOUNTPOINT data/appservers/appsvr2-zone 11.7G 77.1G 11.7G /data/appservers/appsvr2-zonedata/appservers/appsvr2-zone at transport_20061017085447 0 - 11.7G - ... then wait a couple of seconds # zfs list -r data/appservers/appsvr2-zone NAME USED AVAIL REFER MOUNTPOINT data/appservers/appsvr2-zone 11.7G 77.1G 11.7G /data/appservers/appsvr2-zonedata/appservers/appsvr2-zone at transport_20061017085447 100K - 11.7G - As you can see the snapshot is no longer identical to the filesystem and I can''t see anything touching the filesystem. My workaround for this problem right now is to do a zfs umount before I do the rollback and then I do zfs send/recv. The only problem is once the changes are received zfs is mounting the filesystem again (I assume this is a bug). I''m running this on Solaris 10u2 sparc but I''ve seen this on x86 as well. Does anyone have any pointers, ideas, suggestions? Regards, Nickus
On 10/17/06, Niclas Sodergard <nickus at gmail.com> wrote:> Hi everyone, > > I have a very strange problem. I''ve written a simple script that uses > zfs send/recv to send a filesystem between two hosts using ssh. Works > like a charm - most of the time. As you know we need a two snapshots > when we do a incremental send. But the problem is something is > touching my filesystems on the receiving side so they are no longer > identical.Do you have atime updates on the recv side turned off? If you want to do incrementals, and you also want to be able to look at the data on the receive side, you''ll need to do so. Chad Mynhier
On October 17, 2006 1:10:11 PM +0300 Niclas Sodergard <nickus at gmail.com> wrote:> Hi everyone, > > I have a very strange problem. I''ve written a simple script that uses > zfs send/recv to send a filesystem between two hosts using ssh. Works > like a charm - most of the time. As you know we need a two snapshots > when we do a incremental send. But the problem is something is > touching my filesystems on the receiving side so they are no longer > identical. I''m doing a rollback and a couple of seconds later they are > different again. This has happened on a number of machines but not > always.You''re probably hitting the same bug I am, which was discussed here only 2 weeks ago. Search google for [zfs-discuss recv incremental]. The short answer is, set mountpoint=none. -frank
On 10/17/06, Frank Cusack <fcusack at fcusack.com> wrote:> You''re probably hitting the same bug I am, which was discussed here > only 2 weeks ago. Search google for [zfs-discuss recv incremental]. > > The short answer is, set mountpoint=none.I was discussing that option with a colleague today and that looks like a viable option. Thanks a lot. cheers, Nickus
On 10/17/06, Chad Mynhier <cmynhier at gmail.com> wrote:> > Do you have atime updates on the recv side turned off? If you want to > do incrementals, and you also want to be able to look at the data on > the receive side, you''ll need to do so.Yes, I tried with atime switched off as well and the same thing happend. Frank''s solution with nomount seems to be an idea that could work and I will try that tomorrow. cheers, Nickus
It''s also worth it to note that I recently added a ''-F'' flag to zfs receive for precisely this sort of annoying problem :) I meant to send a heads up to everyone about it but had not gotten to it yet. Basically, when you specify ''-F'' flag to receive, a zfs rollback and a receive are done at one time, without mounting the filesystem in between, so you shouldn''t have any trouble receiving if you use the ''- F''. #zfs send -i /tank/fs at snap1 /tank/fs at snap2 | ssh host2 zfs receive -F / newtank/recvfs This was putback into build snv_48 so if you''re running(or can run) Opensolaris bits then you''ll have this new feature. The man pages and sysadmin guide should be updated to reflect this and if they aren''t yet, they should be quite soon. Note also that along with that flag I added the capability (for those of us that are lazy and hate to type) to abbreviate the first argument in zfs send and also the second argument to a zfs rename. So you only need to specify the snapshot name (i.e. the part after the ''@''). A la: #zfs rename /tank/fs at oldsnap newsnap and #zfs send -i /snap1 /tank/fs at snap2 > backup.out As always, backward compatibility has been maintained for your snapshoting convenience so fear not if you have scripts set up already to do that sort of thing. happy snapshoting, Noel On Oct 17, 2006, at 3:10 AM, Niclas Sodergard wrote:> Hi everyone, > > I have a very strange problem. I''ve written a simple script that uses > zfs send/recv to send a filesystem between two hosts using ssh. Works > like a charm - most of the time. As you know we need a two snapshots > when we do a incremental send. But the problem is something is > touching my filesystems on the receiving side so they are no longer > identical. I''m doing a rollback and a couple of seconds later they are > different again. This has happened on a number of machines but not > always. > > Real example > > # zfs list -r data/appservers/appsvr2-zone > NAME USED AVAIL REFER MOUNTPOINT > data/appservers/appsvr2-zone 11.7G 77.1G 11.7G > /data/appservers/appsvr2-zonedata/appservers/appsvr2- > zone at transport_20061017085447 > 100K - 11.7G - > # zfs rollback data/appservers/appsvr2-zone at transport_20061017085447 > # zfs list -r data/appservers/appsvr2-zone > NAME USED AVAIL REFER MOUNTPOINT > data/appservers/appsvr2-zone 11.7G 77.1G 11.7G > /data/appservers/appsvr2-zonedata/appservers/appsvr2- > zone at transport_20061017085447 > 0 - 11.7G - > > ... then wait a couple of seconds > > # zfs list -r data/appservers/appsvr2-zone > NAME USED AVAIL REFER MOUNTPOINT > data/appservers/appsvr2-zone 11.7G 77.1G 11.7G > /data/appservers/appsvr2-zonedata/appservers/appsvr2- > zone at transport_20061017085447 > 100K - 11.7G - > > As you can see the snapshot is no longer identical to the filesystem > and I can''t see anything touching the filesystem. > > My workaround for this problem right now is to do a zfs umount before > I do the rollback and then I do zfs send/recv. The only problem is > once the changes are received zfs is mounting the filesystem again (I > assume this is a bug). > > I''m running this on Solaris 10u2 sparc but I''ve seen this on x86 as > well. > > Does anyone have any pointers, ideas, suggestions? > > Regards, > Nickus > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
typo: there shouldn''t be a leading ''/'' before snap1 in the example below. apologies. Noel On Oct 23, 2006, at 2:10 PM, No?l Dellofano wrote:> #zfs send -i /snap1 /tank/fs at snap2 > backup.out-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20061023/e270c552/attachment.html>
Hello No?l, I''ve just had to ask this - your email address is @apple.com and looks like you are actively developing ZFS - does that mean Apple is looking into porting/using ZFS for real? -- Best regards, Robert mailto:rmilkowski at task.gda.pl http://milek.blogspot.com
Hey Robert, No, all the code fixes and features I mentioned before I developed and putback before I left Sun, so no active development is happening or anything. I still like to hang out on the zfs alias though just because I still luv ZFS and want to keep tabs on it even if I''m not at Sun :) Noel On Oct 23, 2006, at 2:46 PM, Robert Milkowski wrote:> Hello No?l, > > I''ve just had to ask this - your email address is @apple.com and looks > like you are actively developing ZFS - does that mean Apple is looking > into porting/using ZFS for real? > > > -- > Best regards, > Robert mailto:rmilkowski at task.gda.pl > http://milek.blogspot.com >
Hello No?l, Tuesday, October 24, 2006, 1:37:20 AM, you wrote: ND> Hey Robert, ND> No, all the code fixes and features I mentioned before I developed and ND> putback before I left Sun, so no active development is happening or ND> anything. I still like to hang out on the zfs alias though just ND> because I still luv ZFS and want to keep tabs on it even if I''m not at ND> Sun :) ok, thanks for info! -- Best regards, Robert mailto:rmilkowski at task.gda.pl http://milek.blogspot.com