Discussion:
[unison-users] sshfs from Android leads to repeated checksumming?
Mario Emmenlauer mario@emmenlauer.de [unison-users]
2016-12-14 09:30:11 UTC
Permalink
Dear Unison Developers,

I'm using an ssh server on Android (SSHelper) to mount the SDCard
on Linux. Then I'm using unison 2.48.4 to sync the sshfs-mount with
a directory on the desktop. Things mostly work well, but around every
third time, unison re-reads a significant number of files from the
sshfs mount. Unison seems to think some files changed on the Android
side. But I fail to understand why. They are certainly not changed
by me 'intentionally', and it does not happen always or to all files.

I also performed directory listings with ls, and compared over the
course of a longer time, and at least from the output of ls, nothing
changes in the directories.

I'm a bit at the end of my wit, is there something I can try or do?
I've also read about the 'fastercheckUNSAFE' but I'm a bit scared to
use it, since I do not want to loose any data. How unsafe is it to
use?

Attached is my config in case it helps. I've also tested with debug
set to verbose, but the log is huge and does not mean much to me...
what could I check for?

All the best,

Mario Emmenlauer
Mario Emmenlauer mario@emmenlauer.de [unison-users]
2016-12-14 09:34:58 UTC
Permalink
Ok I could actually make some progress on this topic. It seems that
Android reports the file modification times with a fluctuation of one
second, that randomly changes. I'm currently testing a small hack that
would change the behavior of 'same' in 'src/props.ml' to allow for a
small time difference.
But it would actually be great if there was an option in unison to
set a maximum allowed time difference on the modification times, like:
maxmodificationtimedelta = 1

Would this be a useful idea, and would somebody be willing to implement
this?

Cheers,

Mario

On Wednesday, December 14, 2016 10:30 AM, Mario Emmenlauer <***@emmenlauer.de> wrote:

Dear Unison Developers,

I'm using an ssh server on Android (SSHelper) to mount the SDCard
on Linux. Then I'm using unison 2.48.4 to sync the sshfs-mount with
a directory on the desktop. Things mostly work well, but around every
third time, unison re-reads a significant number of files from the
sshfs mount. Unison seems to think some files changed on the Android
side. But I fail to understand why. They are certainly not changed
by me 'intentionally', and it does not happen always or to all files.

I also performed directory listings with ls, and compared over the
course of a longer time, and at least from the output of ls, nothing
changes in the directories.

I'm a bit at the end of my wit, is there something I can try or do?
I've also read about the 'fastercheckUNSAFE' but I'm a bit scared to
use it, since I do not want to loose any data. How unsafe is it to
use?

Attached is my config in case it helps. I've also tested with debug
set to verbose, but the log is huge and does not mean much to me...
what could I check for?

All the best,

Mario Emmenlauer
Mario Emmenlauer mario@emmenlauer.de [unison-users]
2016-12-14 19:19:15 UTC
Permalink
Dear All,

I could make an implementation of this proposed behaviour, and created
a pull request here: https://github.com/bcpierce00/unison/pull/51
I really can't judge the quality of my coding as I've never written a
line of Ocaml before. But since its only ~7 lines of code, maybe an
admin can take a quick look?

I can say it works for me, though I have not tested it extensively ;-)

Hope it may be useful to others too. PS: I failed to compile the current
trunk with some unrelated error. But the same patch cleanly integrates
into 2.48.4 release, and I could compile and test this a bit.

Cheers,

Mario
+1
IIRC, there is (I don't remember where) a file system that has files
modification dates in encrements of 2 seconds (only even times)
So this could benefit too
Post by Mario Emmenlauer ***@emmenlauer.de [unison-users]
Ok I could actually make some progress on this topic. It seems that
Android reports the file modification times with a fluctuation of one
second, that randomly changes. I'm currently testing a small hack that
would change the behavior of 'same' in 'src/props.ml' to allow for a
small time difference.
But it would actually be great if there was an option in unison to
maxmodificationtimedelta = 1
Would this be a useful idea, and would somebody be willing to implement
this?
Cheers,
Mario
On Wednesday, December 14, 2016 10:30 AM, Mario Emmenlauer
Dear Unison Developers,
I'm using an ssh server on Android (SSHelper) to mount the SDCard
on Linux. Then I'm using unison 2.48.4 to sync the sshfs-mount with
a directory on the desktop. Things mostly work well, but around every
third time, unison re-reads a significant number of files from the
sshfs mount. Unison seems to think some files changed on the Android
side. But I fail to understand why. They are certainly not changed
by me 'intentionally', and it does not happen always or to all files.
I also performed directory listings with ls, and compared over the
course of a longer time, and at least from the output of ls, nothing
changes in the directories.
I'm a bit at the end of my wit, is there something I can try or do?
I've also read about the 'fastercheckUNSAFE' but I'm a bit scared to
use it, since I do not want to loose any data. How unsafe is it to
use?
Attached is my config in case it helps. I've also tested with debug
set to verbose, but the log is huge and does not mean much to me...
what could I check for?
All the best,
Mario Emmenlauer
Viele Gruesse,

Mario Emmenlauer


--
BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203
Balanstr. 43 mailto: memmenlauer * biodataanalysis.de
D-81669 MÃŒnchen http://www.biodataanalysis.de/
Loading...