diff --git a/HISTORY b/HISTORY index b618d9ee..de2db307 100644 --- a/HISTORY +++ b/HISTORY @@ -15,6 +15,10 @@ SnapRAID HISTORY verified all the hashes. This allows recovering of moved files in case a silent error is found during the hash verification check. * In the configuration file 'data' is now a synonymous of 'disk'. + * Adds the 'nano' command intended to arbitrarely set all the zero + subsecond timestamps. This improves the SnapRAID capabilities to + identify files. The 'status' command recommend to run 'nano' if + required. 9.2 2016/01 =========== diff --git a/Makefile.am b/Makefile.am index 11c15a83..1d0f748a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -377,7 +377,7 @@ endif $(MSG) Nano touch -t 200102011234.56 bench/disk1/a/a* $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) sync - $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) test-nano + $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) -c $(CONF) nano $(MSG) Check the --gen-conf command $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --gen-conf bench/content $(MSG) Filter diff --git a/cmdline/snapraid.c b/cmdline/snapraid.c index ba4d00fd..7ceeb4f1 100644 --- a/cmdline/snapraid.c +++ b/cmdline/snapraid.c @@ -828,7 +828,7 @@ int main(int argc, char* argv[]) operation = OPERATION_REWRITE; } else if (strcmp(argv[optind], "test-read") == 0) { operation = OPERATION_READ; - } else if (strcmp(argv[optind], "test-nano") == 0) { + } else if (strcmp(argv[optind], "nano") == 0) { operation = OPERATION_NANO; } else if (strcmp(argv[optind], "up") == 0) { operation = OPERATION_SPINUP; diff --git a/snapraid.1 b/snapraid.1 index 2b316bba..f382ebbb 100644 --- a/snapraid.1 +++ b/snapraid.1 @@ -54,7 +54,7 @@ snapraid [\-c, \-\-conf CONFIG] .PD 0 .PP .PD - |up|down|pool|devices|rehash + |up|down|pool|devices|nano|rehash .PD 0 .PP .PD @@ -913,6 +913,22 @@ array, but in some more complex configurations, you may have multiple low level devices used by a single disk in the array. .PP Nothing is modified. +.SS nano +Sets arbitrarely the sub\-second timestamp of all the files +that have it at zero. +.PP +This improves the SnapRAID capability to recognize moved +and copied files as it makes the timestamp almost unique, +removing possible duplicates. +.PP +More specifically, if the sub\-second timestamp is not zero, +a moved or copied file is identified as such if it matches +the name, size and timestamp. If instead the sub\-second timestamp +is zero, it\'s cosidered a copy only if it matches the full path, +size and timestamp. +.PP +Note that the second precision timestamp is not modified, +and all the dates and times of your files will be maintained. .SS rehash Schedules a rehash of the whole array. .PP diff --git a/snapraid.d b/snapraid.d index 0365be77..0b4161a9 100644 --- a/snapraid.d +++ b/snapraid.d @@ -15,7 +15,7 @@ Synopsis : [-L, --error-limit NUMBER] : [-v, --verbose] [-q, --quiet] : status|smart|up|down|diff|sync|scrub|fix|check|list|dup - : |up|down|pool|devices|rehash + : |up|down|pool|devices|nano|rehash :snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT] @@ -630,6 +630,23 @@ Commands Nothing is modified. + nano + Sets arbitrarely the sub-second timestamp of all the files + that have it at zero. + + This improves the SnapRAID capability to recognize moved + and copied files as it makes the timestamp almost unique, + removing possible duplicates. + + More specifically, if the sub-second timestamp is not zero, + a moved or copied file is identified as such if it matches + the name, size and timestamp. If instead the sub-second timestamp + is zero, it's cosidered a copy only if it matches the full path, + size and timestamp. + + Note that the second precision timestamp is not modified, + and all the dates and times of your files will be maintained. + rehash Schedules a rehash of the whole array. diff --git a/snapraid.txt b/snapraid.txt index fe9ff295..0a685687 100644 --- a/snapraid.txt +++ b/snapraid.txt @@ -19,7 +19,7 @@ snapraid [-c, --conf CONFIG] [-L, --error-limit NUMBER] [-v, --verbose] [-q, --quiet] status|smart|up|down|diff|sync|scrub|fix|check|list|dup - |up|down|pool|devices|rehash + |up|down|pool|devices|nano|rehash snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT] @@ -684,7 +684,26 @@ low level devices used by a single disk in the array. Nothing is modified. -5.16 rehash +5.16 nano +--------- + +Sets arbitrarely the sub-second timestamp of all the files +that have it at zero. + +This improves the SnapRAID capability to recognize moved +and copied files as it makes the timestamp almost unique, +removing possible duplicates. + +More specifically, if the sub-second timestamp is not zero, +a moved or copied file is identified as such if it matches +the name, size and timestamp. If instead the sub-second timestamp +is zero, it's cosidered a copy only if it matches the full path, +size and timestamp. + +Note that the second precision timestamp is not modified, +and all the dates and times of your files will be maintained. + +5.17 rehash ----------- Schedules a rehash of the whole array.