-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
LZ4F_decompress failed with code ERROR_blockChecksum_invalid #134
Comments
Hi, This Looks Like a corrupt Block in the data file. If compression was enabled during backup the lz4 layer also stores an checksum alongside the compressed block and it appears this checksum doesnt Match anymore. Any notable issues on the filesystem the data is stored on? Is it reproducible with other backups? |
I had 2 vms which had this error. I made a fresh backup of both and got the same error with one remaining vm (the biggest one). Target is a NFS-Server with TrueNAS Scale. Message-file from Server and NAS seem to be clean. Lessons learnt: I think I will do regular restore test. |
Is it reproducible it you Backup/ restore to local storage on the hypervisor host? Granted i dont use compression all that often .. at least not with vm this big. The checksum is calculated by the lz4 Module automatically. One reason could be that the complete frame read during restore is wrong But that would end in a different error.. restore log with verbose log might show more details, but its more likely the data beeing corrupted somehow. Maybe there is a way to disable the Check during decompress, to See if its able to accomplish decompression even if the checksum is wrong, Need to Check the lz4 modules docs on that |
i just attempted to reproduce this with a backup i did. After backup i replaced one byte within the backup file and attempted restore:
but there seems to be no way to ignore the checksum check (which is obviously OK) Also in my case, just before the decompression the frame information for the lz4 block is shown:
which means the data read from the backup file is a correct frame, but its data contents dont match the checksum anymore. From the lz4 docs:
both options are enabled by default during backup. No messages in dmesg or alike where transfer issues via nfs might be the reason? |
I made a backup to different NFS-Server and I could restore it. Two different servers had the same problem... Network errors? FS-errors? |
ive commited a new feature into the "checksum" branch: if backup to regular directory is attempted it now computes an adler32 checksum for the complete data file contents and reports them via logfile:
then there is a verify option that allows for verifying that checksum:
so altered files can be identified more easily no matter if compression is used or not. |
In this case it seems to be a problem with the storage. Truenas found some failures in zpool. |
thanks for the update! Closing this one .. |
@sbrunsch2024 latest master now contains this feature, see: https://github.com/abbbi/virtnbdbackup#verifying-created-backups of course only works with new backups. Could you test? Thanks. |
I already cloned master.
I have to restore my main vm now. I will try it later this day.
… Am 05.09.2023 um 12:57 schrieb Michael Ablassmeier ***@***.***>:
thanks for the update! Closing this one ..
—
Reply to this email directly, view it on GitHub <#134 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BAYRS2CDHGDYWGK7YXKYBKTXY4AQ5ANCNFSM6AAAAAA4KXQG5Y>.
You are receiving this because you authored the thread.
|

Backup is running. Checksums are saved.
——————————————————————————
Stephan Brunsch
Töpchiner Weg 180
12309 Berlin
… Am 05.09.2023 um 12:57 schrieb Michael Ablassmeier ***@***.***>:
thanks for the update! Closing this one ..
—
Reply to this email directly, view it on GitHub <#134 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BAYRS2CDHGDYWGK7YXKYBKTXY4AQ5ANCNFSM6AAAAAA4KXQG5Y>.
You are receiving this because you authored the thread.
|
Any chance to implement checksum verify in backup process?
… Am 05.09.2023 um 12:57 schrieb Michael Ablassmeier ***@***.***>:
thanks for the update! Closing this one ..
—
Reply to this email directly, view it on GitHub <#134 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BAYRS2CDHGDYWGK7YXKYBKTXY4AQ5ANCNFSM6AAAAAA4KXQG5Y>.
You are receiving this because you authored the thread.
|
Last questions before waiting for reaction….
How to modify a bit of a backup file? dd ?
Is there a way to speed up checksum creation?
It takes about 3 minutes for 30 GB on rotating disks.
… Am 05.09.2023 um 12:57 schrieb Michael Ablassmeier ***@***.***>:
thanks for the update! Closing this one ..
—
Reply to this email directly, view it on GitHub <#134 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/BAYRS2CDHGDYWGK7YXKYBKTXY4AQ5ANCNFSM6AAAAAA4KXQG5Y>.
You are receiving this because you authored the thread.
|
hexeditor or dd
you mean verify? Its using 4k blocks to compute the checksum during verify, that might be a bottleneck.
|
or simply append something to the backup file:
|
Version used
Provide output of
virtnbdbackup -V
1.9.38
Describe the bug
restore Error
Expected behavior
successful restore
Hypervisor information:
libvirt kvm@ debian
virtnbdrestore -i /vmbackup/routervm/202309 -o /kvm/storage -N routervm
ERROR root virtnbdrestore - restoreData [MainThread]: LZ4F_decompress failed with code: ERROR_blockChecksum_invalid
Traceback (most recent call last):
File "/usr/bin/virtnbdrestore", line 142, in restoreData
written = chunk.read(
^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/libvirtnbdbackup/chunk.py", line 83, in read
data = lz4.decompressFrame(reader.read(blocklen))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/libvirtnbdbackup/lz4.py", line 27, in decompressFrame
return lz4.frame.decompress(data)
No workaround
The text was updated successfully, but these errors were encountered: