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
borg create throws os.fsync error on cifs mounted repo #1287
Comments
Looks like smbfs does not like a flush on a directory fd (this is new in 1.0.4/1.0.5 to make sure the directory is really on-disk to be more robust, e.g. in case of crashes or power failures). Workaround: go back to 1.0.3 until a fix is available. Can you test a sourcecode patch for 1.0.5? |
Maybe we just use the diaper pattern here. |
(Previous comment deleted, since not accurate). Ignoring EINVAL should be ok. sshfs issue isn't related, just tested. I have no traceback for that one, just an error code, so ... |
@enkore can we be sure that EINVAL is all we get to see from this? And not some other fs throwing another error and it blows up again? |
btw, we need more beta testers. |
fsync has EBADF¹, EINTR², EINVAL, EIO³ (and those of read/write with the same meanings). Anything else means the FS/Kernel is severely broken. ¹ can't happen - open succeeded |
Yes. Also a checklist when we touch IO code. Works on proper FS. Works on NTFS. Works on non-compliant FS (sshfs, cifs/smb, nfs, ...). |
Ok, just ran a few tests with the patch; the patched version appears to work normally now on cifs repositories. Thanks much for jumping right on this! Let me know if I can do any additional testing or provide any more info. |
Thanks for the report and the patch test :) |
Observed both on Arch linux systems running the binary package and Debian GNU/Linux systems compiling from pip. With borg 1.05, any attempt to create a new archive in a repository that is accessible via cifs begins to run the create and then errors as soon as it reaches the first new file that needs to be written. Backups to purely local filesystems or remote backups via ssh with the same repositories appear to work perfectly.
The systems in question had no similar problem with any prior versions of borg, and a repository check on the relevant repositories comes back clean.
An example of the errors thrown:
The error on the Arch systems is substantially similar. Let me know if I can provide any additional information or testing.
The text was updated successfully, but these errors were encountered: