bcpierce00 / unison

Unison file synchronizer
GNU General Public License v3.0
3.9k stars 225 forks source link

Input/output error rename with fuse jmtpfs #947

Closed michimussato closed 11 months ago

michimussato commented 1 year ago

Hello

I'm having an issue with unison sync between local ext4 and jmtpfs fuse mount - mounting as follows:

/usr/bin/jmtpfs  -d -s -o allow_other ~/obsidian_unison
$ /usr/bin/unison -version
unison version 2.53.3 (ocaml 5.0.0)
$ /usr/bin/unison -ignorearchives '/home/michael/Documents/Obsidian/' '/home/michael/obsidian_unison/SanDisk SD card/Obsidian/'
Unison 2.53.3 (ocaml 5.0.0): Contacting server...
Looking for changes
Reconciling changes

Documents...   SanDisk S...       
file     ====> file       Default Obsidian Vault/Blender/Referencing System.md  [] >

1 items will be synced, 0 skipped
824 B to be synced from Documents/Obsidian to SanDisk SD card/Obsidian
0 B to be synced from SanDisk SD card/Obsidian to Documents/Obsidian

Proceed with propagating updates? [] y
Propagating updates

Unison 2.53.3 (ocaml 5.0.0) started propagating changes at 15:46:58.37 on 11 Jul 2023
[BGN] Updating file Default Obsidian Vault/Blender/Referencing System.md from /home/michael/Documents/Obsidian to /home/michael/obsidian_unison/SanDisk SD card/Obsidian
Failed [Default Obsidian Vault/Blender/Referencing System.md]: Error in renaming /home/michael/obsidian_unison/SanDisk SD card/Obsidian/Default Obsidian Vault/Blender/.unison.Referencing System.md.fe3ef188cfa11ac9d54260d66b45d36a.unison.tmp to /home/michael/obsidian_unison/SanDisk SD card/Obsidian/Default Obsidian Vault/Blender/Referencing System.md:
Input/output error [rename(/home/michael/obsidian_unison/SanDisk SD card/Obsidian/Default Obsidian Vault/Blender/.unison.Referencing System.md.fe3ef188cfa11ac9d54260d66b45d36a.unison.tmp)]
Unison 2.53.3 (ocaml 5.0.0) finished propagating changes at 15:46:58.95 on 11 Jul 2023, 0.574 s

Saving synchronizer state
Synchronization incomplete at 15:46:58  (0 items transferred, 0 skipped, 1 failed)
  failed: Default Obsidian Vault/Blender/Referencing System.md

At the same time, jmtpfs is giving me the following:

unique: 11914, opcode: RENAME (12), nodeid: 318, insize: 144, pid: 23504
rename /SanDisk SD card/Obsidian/Default Obsidian Vault/Blender/.unison.Referencing System.md.fe3ef188cfa11ac9d54260d66b45d36a.unison.tmp /SanDisk SD card/Obsidian/Default Obsidian Vault/Blender/Referencing System.md
   unique: 11914, error: -5 (Input/output error), outsize: 16

Renaming the file manually works as expected so I'm wondering what unison does differently. That leads to the assumption that unison wants to overwrite (by renaming .tmp) an existing file which it can't. Any ideas?

gdt commented 1 year ago

First, a serious question: Did you come across an exhortation to read https://github.com/bcpierce00/unison/wiki/Reporting-Bugs-and-Feature-Requests before creating an issue?

Please use the mailing list for questions. This issue does not articulate that there is a bug in unison and is really a question/request for help.