Hello,
I had some problems with zrep and OpenIndiana. I contacted the author and he said, that zrep was created for Solaris 10 and 11.
The problem with OI is, that OI misses some zfs features, like receive x and receive o and the initialization of volume is not supported for OI and I dont know why!
Here are the error messages what I get when using zrep:
Source-Server (192.168.10.200)
Copying of a directory:
Target-Server (192.168.10.201):
Copying of a volume:
Source-Server (192.168.10.200)
I did some modifications to zrep that it sends also the properties to the destination server:
Zrep-Version 0.8.4:
Line 689:
Are there any problems with the OI zfs version using zfs send p command and why should it only be used together with the recv x flag?
After editing zrep, the properties are copied correctly:
Source-Server (192.168.10.200)
Target-Server (192.168.10.201)
The initial copying of a volume is more complecate!
I commented out the following lines:
and added / edited the following code after line 688:
The u flag should not mount the volume, but the code does not work. I get always the sme error:
Does someone also has these problems and maybe, there is another solution?
The missing receive flags are already a bug / feature report:
https://www.illumos.org/issues/2745
Your sincerely
Ghandalf
I had some problems with zrep and OpenIndiana. I contacted the author and he said, that zrep was created for Solaris 10 and 11.
The problem with OI is, that OI misses some zfs features, like receive x and receive o and the initialization of volume is not supported for OI and I dont know why!
Here are the error messages what I get when using zrep:
Source-Server (192.168.10.200)
Copying of a directory:
Code:
zrep.orig init tank/zrep_test_1 192.168.10.201 tank/zrep_test_1
[I]Setting properties on tank/zrep_test_1
Ancient local version of ZFS detected.
Creating destination filesystem as separate step
Creating snapshot tank/zrep_test_1@zrep_000000
Sending initial replication stream to 192.168.10.201:tank/zrep_test_1
Debug: Because you have old zfs support, setting remote properties by hand
Initialization copy of tank/zrep_test_1 to 192.168.10.201:tank/zrep_test_1 complete[/I]
Code:
zrep.orig list -v tank/zrep_test_1
[I]tank/zrep_test_1:
sharenfs on
compression on
atime off
snapdir hidden
aclmode passthrough
aclinherit passthrough
nbmand on
sharesmb off
sync disabled
zrep:dest-host 192.168.10.201
zrep:master yes
zrep:dest-fs tank/zrep_test_1
zrep:src-fs tank/zrep_test_1
zrep:savecount 5
zrep:src-host oi151a-1[/I]
Target-Server (192.168.10.201):
Code:
zrep list -v tank/zrep_test_1
[I]tank/zrep_test_1:
readonly on
zrep:dest-fs tank/zrep_test_1
zrep:savecount 5
zrep:dest-host tank/zrep_test_1
zrep:src-host oi151a-1
zrep:src-fs tank/zrep_test_1[/I]
Copying of a volume:
Source-Server (192.168.10.200)
Code:
zrep.orig init tank/zrep_vol_test_1 192.168.10.201 tank/zrep_vol_test_1
[I]Sorry, your zfs is too old for zrep to handle volume initialization
Error: Please initialize volume target by hand, if you won't upgrade[/I]
I did some modifications to zrep that it sends also the properties to the destination server:
Zrep-Version 0.8.4:
Line 689:
Code:
zfs send $snap | -> zfs send p $snap |
Are there any problems with the OI zfs version using zfs send p command and why should it only be used together with the recv x flag?
After editing zrep, the properties are copied correctly:
Source-Server (192.168.10.200)
Code:
zrep.orig.mod init tank/zrep_test_2_zrep_modified 192.168.10.201 [I]tank/zrep_test_2_zrep_modified
Setting properties on tank/zrep_test_2_zrep_modified
Ancient local version of ZFS detected.
Creating destination filesystem as separate step
Creating snapshot tank/zrep_test_2_zrep_modified@zrep_000000
Sending initial replication stream to 192.168.10.201:tank/zrep_test_2_zrep_modified
Debug: Because you have old zfs support, setting remote properties by hand
Initialization copy of tank/zrep_test_2_zrep_modified to 192.168.10.201:tank/zrep_test_2_zrep_modified complete[/I]
Code:
zrep.orig.mod list -v tank/zrep_test_2_zrep_modified
[I]tank/zrep_test_2_zrep_modified:
sharenfs on
compression on
atime off
snapdir hidden
aclmode passthrough
aclinherit passthrough
nbmand on
sharesmb off
sync always
zrep:master yes
zrep:src-fs tank/zrep_test_2_zrep_modified
zrep:dest-fs tank/zrep_test_2_zrep_modified
zrep:dest-host 192.168.10.201
zrep:src-host oi151a-1
zrep:savecount 5[/I]
Target-Server (192.168.10.201)
Code:
zrep list -v tank/zrep_test_2_zrep_modified
[I]tank/zrep_test_2_zrep_modified:
sharenfs on
compression on
atime off
readonly on
snapdir hidden
aclmode passthrough
aclinherit passthrough
nbmand on
sharesmb off
sync always
zrep:dest-fs tank/zrep_test_2_zrep_modified
zrep:dest-host tank/zrep_test_2_zrep_modified
zrep:src-host oi151a-1
zrep:savecount 5
zrep:src-fs tank/zrep_test_2_zrep_modified[/I]
The initial copying of a volume is more complecate!
I commented out the following lines:
Code:
638 if ((! Z_HAS_O )) ; then
639 print "Sorry, your zfs is too old for zrep to haandle volume initialization"
640 zrep_errquit "Please initialize volume target byy hand, if you won't upgrade"
641 fi
and added / edited the following code after line 688:
Code:
typeset FLAG
if (( vol )) ; then
FLAG="-u"
else
FLAG=""
fi
zfs send -pv $snap |
zrep_ssh $desthost zfs recv $READONLYPROP $FLAG -vF $destfs
fi
The u flag should not mount the volume, but the code does not work. I get always the sme error:
Code:
zrep.orig.mod init tank/zrep_vol_test_1 192.168.10.201 tank/zrep_vol_test_1
[I]Setting properties on tank/zrep_vol_test_1
Ancient local version of ZFS detected.
Creating destination filesystem as separate step
Creating snapshot tank/zrep_vol_test_1@zrep_000000
Sending initial replication stream to 192.168.10.201:tank/zrep_vol_test_1
[B]cannot mount 'tank/zrep_vol_test_1': Invalid argument[/B]
WARNING: Removing all zrep configs and snapshots from tank/zrep_vol_test_1
Continuing in 10 seconds
Destroying any zrep-related snapshots from tank/zrep_vol_test_1
Removing zrep-related properties from tank/zrep_vol_test_1
Error: Error transferring tank/zrep_vol_test_1@zrep_000000 to 192.168.10.201:tank/zrep_vol_test_1. Resetting[/I]
Does someone also has these problems and maybe, there is another solution?
The missing receive flags are already a bug / feature report:
https://www.illumos.org/issues/2745
Your sincerely
Ghandalf