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/[EMAIL PROTECTED] /tank/[EMAIL PROTECTED] | 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/[EMAIL PROTECTED] newsnap
and
#zfs send -i /snap1 /tank/[EMAIL PROTECTED] > 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-
[EMAIL PROTECTED]
100K - 11.7G -
# zfs rollback data/appservers/[EMAIL PROTECTED]
# 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-
[EMAIL PROTECTED]
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-
[EMAIL PROTECTED]
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@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss