-
Notifications
You must be signed in to change notification settings - Fork 5
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
System backup fails with error E_COPY_DATA #38
Comments
Would using the much simpler script at https://github.com/hunleyd/btrfs-auto-snapshot as a base make it any easier to debug? |
I vaguely remember the problem, but it was more with backuphome at the time. That was about two and a half years ago, I still have a test procedure for it. Anyway you can try to bring the following change in xbian-storager and test it again
If this works for you without errors, i will apply the patch |
No luck with that change. :( |
Strange
Something like this:
This should make no difference, as it runs in the background in both cases |
So that confirms it: the progress display procedure isn't the cause. Without that change, no progress display is shown but still the same error:
I tried a sudo btrfs scrub start / just in case, but it reported no error. So I guess the error comes from the function copy_volume. |
Here is my next patch:
Reverted the previous patch. Now, in case of error the pipe return values are in the error message (ps=X X X) And, for debugging btrfs send and btrfs receive prints output into file /tmp/btrfs.send.log resp /tmp/btrfs.receive.log But I can't say if there are reasonable error messages in case of an error. I never had any errors there before |
Nice! xbiancopy.log:
btrfs.send.log:
btrfs.receive.log:
Here's the result of df -h:
|
That is not yet obvious to me How big is the image file? Should have at least 2.3GB (minus used space by snapshots) |
Here's what df- h returns just before the error:
And the usage of /dev/mapper/loop0p2 increases until the error. |
Here's the full xbiancopy.log As I understand it, /dev/mapper/loop0p2 is the snapshot, so it's normal that it gets full.
or
|
Yes, /dev/mapper/loop0p2 is the container for the image. btrfs receive writes this error message because this command writes into the container. That's correct |
Since it seems to need just a little more space, I tried enabling zlib compression, and it worked. Here's the df -h just before the end:
And the xbiancopy.log |
The only question is how much, I checked today at noon, currently there is 20% more space than actually needed You could add a startvalue for variable size in bytes as shown below
this is how it looks with a backup on one of my Pi's
|
With size=51200000, I get
and it works. |
I have now made a kind of dynamic adjustment of the correction size. works here so far quite well
Since it is nearly impossible to determine the exact size of the |
I'm having a hard time merging those changes on Windows (I did it manually for the other ones). Could you attach the modified file? |
This should be much easier:
Oh I forgot, of course restore the original state with |
Thanks, the patching works fine with that command, even on Windows (at least with the patch tool from Git, not the one from GnuWin32). It works here too, with 77M (300M) remaining. |
Great, so it seems that 300M start value will be a good choice. |
It works fine too on an other rpi4, with 62M remaining there. |
After a longer test and some corrections, this should now be fixed with this commit: 97e54ab |
An adaptive size change, it should be future proof! |
The btrfs-auto-snapshot.sh script (https://github.com/xbianonpi/xbian-package-config-shell/blob/master/content/usr/local/sbin/xbian-storager) stops with error E_COPY_DATA
Version:
5.10.82+ #1 SMP PREEMPT Wed Dec 1 19:48:08 CET 2021 armv7l
XBian 20210911-0 - Bleeding Edge
This seems to be a known problem: http://forum.xbian.org/thread-4106-post-36879.html
Home backup works fine on the same NFS network share.
Log excerpt:
I can see the backup file being created on the network share before the error.
Would any other log help?
The text was updated successfully, but these errors were encountered: