mount_smbfs timestamp problem

Riccardo Torrini riccardo at
Mon Sep 13 06:01:57 PDT 2004

Not sure about right ML (tryed with questions@ past week without reply).
This problem happens either on 4.10 than 5.x (tested on 5.3beta2).
Feel free to forward to another ML if needed.  And please Cc: me.

-----[ Forwarded message from questions@ ]-----

- I need to syncronize two dir hosted on win machines based on data
  contained into an Oracle DB (direction of copy may change based on
  owner of file as specified into the DB).  I made an sh script that
  generate a big Makefile with right direction of cp -p but it fail
  copying a lot of identical file (identical means same md5 and with
  date of past, already copied previous night (and previous and...).
  (a lot of fuzzy word, problem is timestamping a remote smb file).

- a freebsd machine (I tested on 4.9-STABLE and 4.10-STABLE)
  (a friend of mine tested on 5.3beta2 both versus WXP (NTFS) and
  W98 (FAT32), same results).
- at least a real win machine with a NTFS exported share (my real
  case has one w2k-server and one wnt4-server).

How to reproduce:
- create a mount point, mount_smb the win share, touch a file

// on the mount point (or at any level deep):
// (you can also change example time but please use even/odd seconds)
# foreach s ( `jot -w%02d 10` )
foreach? touch -t 200401020304.${s} sample${s}
foreach? end

# ls -lnT sample*
-rwxr-xr-x  1 0  0  0 Jan  2 03:04:00 2004 sample01
-rwxr-xr-x  1 0  0  0 Jan  2 03:04:02 2004 sample02
-rwxr-xr-x  1 0  0  0 Jan  2 03:04:02 2004 sample03
-rwxr-xr-x  1 0  0  0 Jan  2 03:04:04 2004 sample04
-rwxr-xr-x  1 0  0  0 Jan  2 03:04:04 2004 sample05
-rwxr-xr-x  1 0  0  0 Jan  2 03:04:06 2004 sample06
-rwxr-xr-x  1 0  0  0 Jan  2 03:04:06 2004 sample07
-rwxr-xr-x  1 0  0  0 Jan  2 03:04:08 2004 sample08
-rwxr-xr-x  1 0  0  0 Jan  2 03:04:08 2004 sample09
-rwxr-xr-x  1 0  0  0 Jan  2 03:04:10 2004 sample10

Any date&time will be rounded up to previous even second  :-(
If you create a file from the win-side (with touch or notepad or
with your favourite tool) you can specify odd seconds, this means
that is not a NTFS struct limitations (maybe  :-).

Who round my time?  I need this for an exotic job: syncronize two
win machine using data from an Oracle DB.  My approach was using
a Makefile but every night it copies hundreds of already copied
files and it use an expensive WAN link.  Yes, I can switch to more
robust check, md5 signatures, extraction of time and manual check
with rounded values, but any other approach leave this problem...


More information about the freebsd-fs mailing list