rclone: file corruption when changing SFTP chunk size from 32Ki to 252Ki
The associated forum post URL from https://forum.rclone.org
N/A
What is the problem you are having with rclone?
I was reading this (https://rclone.org/sftp/#sftp-chunk-size) and was testing increasing the SFTP chunk size. I encountered file corruption when changing the SFTP chunk size from 32Ki to 252Ki.
How to reproduce
- Start rclone serve SFTP on one computer
- On another computer, create the config for the sftp server
- Add the line
chunk_size = 252Ki
to the sftp config - use rclone mount to mount the server (I used VFS cache = full)
- Copy some files to the server (I used files from the game Stray)
- Delete the VFS cache
- Use WinMerge or some other software to compare the original folder and the copied folder.
- Many files won’t be corrupt but others will have been changed
Example of corruption from my testing:
I did not notice this problem occurring when using the default chunk size. I’ve only confirmed this issue happening with a chunk size of 252Ki. I haven’t tested any other chunk sizes.
The rclone log does not produce any errors and everything appears to upload successfully.
What is your rclone version (output from rclone version
)
rclone v1.59.1
- os/version: Microsoft Windows 11 Education 21H2 (64 bit)
- os/kernel: 10.0.22000.918 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.18.5
- go/linking: static
- go/tags: cmount
Which OS you are using and how many bits (e.g. Windows 7, 64 bit)
see above
Which cloud storage system are you using? (e.g. Google Drive)
rclone serve sftp
rclone mount
The command you were trying to run (e.g. rclone copy /tmp remote:tmp
)
N/A
A log from the command with the -vv
flag (e.g. output from rclone -vv copy /tmp remote:tmp
)
N/A
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don’t comment if you have no relevant information to add. It’s just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 16 (6 by maintainers)
Commits related to this issue
- docs: document that serve sftp uses chunk size 32 KiB See #6404 — committed to albertony/rclone by albertony 2 years ago
- docs: document that serve sftp uses chunk size 32 KiB See #6404 — committed to albertony/rclone by albertony 2 years ago
- docs: document that serve sftp uses chunk size 32 KiB See #6404 — committed to albertony/rclone by albertony 2 years ago
- docs: document that serve sftp uses chunk size 32 KiB See #6404 — committed to rclone/rclone by albertony 2 years ago
The website gets updated in sync with the release. So it should be all good when 1.60 is released.