maharmstone / btrfs

WinBtrfs - an open-source btrfs driver for Windows
GNU Lesser General Public License v3.0
5.93k stars 225 forks source link

Sync with RClone fails #551

Open alensiljak opened 1 year ago

alensiljak commented 1 year ago

I'm trying to synchronize a folder between pCloud and an external drive in USB enclosure, formatted with BTRFS, using RClone.

D:\>rclone sync pcloud:/Applications "e:\pCloud-backup\Applications" -P

The results are:

2023-01-27 16:55:16 ERROR : Cashier/backup-journal-2023-01-26-083819.ledger: corrupted on transfer: sizes differ 386 vs 4096
2023-01-27 16:55:17 ERROR : Keepass2Android/alenskeys.kdbx: corrupted on transfer: sizes differ 815709 vs 819200
2023-01-27 16:55:17 ERROR : Local file system at //?/e:/pCloud-backup/Applications: not deleting files as there were IO errors
2023-01-27 16:55:17 ERROR : Local file system at //?/e:/pCloud-backup/Applications: not deleting directories as there were IO errors
2023-01-27 16:55:17 ERROR : Attempt 1/3 failed with 2 errors and: corrupted on transfer: sizes differ 815709 vs 819200
2023-01-27 16:55:18 ERROR : Cashier/backup-journal-2023-01-26-083819.ledger: corrupted on transfer: sizes differ 386 vs 4096
2023-01-27 16:55:19 ERROR : Keepass2Android/alenskeys.kdbx: corrupted on transfer: sizes differ 815709 vs 819200
2023-01-27 16:55:19 ERROR : Local file system at //?/e:/pCloud-backup/Applications: not deleting files as there were IO errors
2023-01-27 16:55:19 ERROR : Local file system at //?/e:/pCloud-backup/Applications: not deleting directories as there were IO errors
2023-01-27 16:55:19 ERROR : Attempt 2/3 failed with 2 errors and: corrupted on transfer: sizes differ 815709 vs 819200
2023-01-27 16:55:20 ERROR : Cashier/backup-journal-2023-01-26-083819.ledger: corrupted on transfer: sizes differ 386 vs 4096
2023-01-27 16:55:21 ERROR : Keepass2Android/alenskeys.kdbx: corrupted on transfer: sizes differ 815709 vs 819200
2023-01-27 16:55:21 ERROR : Local file system at //?/e:/pCloud-backup/Applications: not deleting files as there were IO errors
2023-01-27 16:55:21 ERROR : Local file system at //?/e:/pCloud-backup/Applications: not deleting directories as there were IO errors
2023-01-27 16:55:21 ERROR : Attempt 3/3 failed with 2 errors and: corrupted on transfer: sizes differ 815709 vs 819200
Transferred:        2.335 MiB / 2.335 MiB, 100%, 366.508 KiB/s, ETA 0s
Errors:                 2 (retrying may help)
Checks:                22 / 22, 100%
Elapsed time:         6.5s
2023/01/27 16:55:21 Failed to sync with 2 errors: last error was: corrupted on transfer: sizes differ 815709 vs 819200

If I use a local NTFS drive (D:\tmp\Applications) as the destination, the synchronization completes ok. I was using the same external drive to synchronize on a Linux box and that was working fine. Using the external drive through Windows Explorer seems to be working ok. The files and folders can be read, edited, and written.

Let me know please if I can provide additional information.

WinBtrfs v1.8.2 rclone v1.61.1 Windows 11

maharmstone commented 1 year ago

Thanks, I'll try to reproduce. It looks like it's rounding some of the files to nearest sector size.

alensiljak commented 1 year ago

Thanks for the work on this driver! I tried it a few years ago but couldn't get it to work for whatever reason. Now it seems quite usable. With Rclone support I'd be able to do cloud backups irrespective of which machine I happen to be using. The idea of using BTRFS on external drives now seems quite realistic thanks to you.

diefesson commented 8 months ago

Seens related to #597

maharmstone commented 8 months ago

Yes, it is - I'll leave them both open until it's fixed. The problem is due to a difference in the way that Linux and Windows handle the sizes of preallocated files.