-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zrep init doesn't work in FreeBSD 12.1 if ZREP_R=-R is used #153
Comments
Hi Maurizio, |
zrep works without problems on already initialized fs on these systems. This is the VirtualBox VM filesytem that I have just synchronized:
|
I need to know how the commands zrep is using, differ from what you are using successfully at the low level. after initialization, it doesnt matter |
I have written a little script for testing zfs send/recv: #!/bin/sh
set -x
ssh root@clover-nas2 'zfs destroy -r pool2tb/test'
zfs destroy -r zdata/test
zfs create zdata/test
zfs create zdata/test/test
zfs snapshot -r zdata/test@snap
zfs send -R zdata/test@snap | ssh clover-nas2 'zfs recv -F pool2tb/test'
set +x It works:
|
Thank you for providing that information, and showing that the simple case works. I'd certainly like to update zrep with what works for your system. So you'll need to set some debugging in the zrep script to find out what specific arguments its trying to use. Keep in mind that you will need to add "set -x" in the appropriate function. |
I resolved the issue by commenting out the line that creates the readonly filesystem on the destination server and know I have to change the destination filesystem to readonly after the sync has completed. I only used the "special" version of the script when running the initial recursive sync. # diff -u /tmp/zrep-1.8.0 /tmp/zrep-1.8.0-special --- /tmp/zrep-1.8.0 2020-04-22 14:32:19.206398000 -0400 +++ /tmp/zrep-1.8.0-special 2020-04-22 15:12:14.389547000 -0400 @@ -1231,7 +1231,7 @@ READONLYPROP="" print Warning: zfs recv lacking -o readonly print Creating readonly destination filesystem as separate step - zrep_ssh $desthost zfs create $ZREP_CREATE_FLAGS -o readonly=on $vflags $destfs || zrep_errquit "Cannot create $desthost:$destfs" + # zrep_ssh $desthost zfs create $ZREP_CREATE_FLAGS -o readonly=on $vflags $destfs || zrep_errquit "Cannot create $desthost:$destfs" fi |
I hit exactly the same problem. Disabling the line, recommended by @jbreitman solved the issue - the initial sync is OK. I checked the 'readonly' attribute of all datasets synced - is is already 'on', so I don't need to put them to 'readonly' manually. |
Hmm... ...oh. Thanks for the feedback guys. I've updated the github code to hopefully handle it automatically now. |
So... I tested it configuring another servers for replication.
I have some sub-datasets, for example
Is it normal? I supposed to have |
yeah thats normal. thanks for the followup. i appreciate it. |
Regards
Maurizio
The text was updated successfully, but these errors were encountered: