Issue with "Modified" timestamps on Windows file copy

mxk

Cadet
Joined
Sep 17, 2020
Messages
4
Just did a clean 12.0-BETA2.1 install, minimal config to create a pool and enable SMB sharing, and ran into this issue with robocopy. Does not appear to be fixed.

Original file:
Created: ‎November ‎23, ‎2017, ‏‎2:16:27 PM
Modified: June ‎9, ‎2017, ‏‎1:14:26 PM
Accessed: September ‎12, ‎2020, ‏‎5:27:05 PM

Copied file:
Created: January ‎1, ‎1980, ‏‎7:00:00 PM
Modified: June ‎9, ‎2017, ‏‎1:14:26 PM
Accessed: September ‎12, ‎2020, ‏‎5:27:05 PM

Each run of robocopy considers this and about 2,000 other files "Tweaked" because of this.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Just did a clean 12.0-BETA2.1 install, minimal config to create a pool and enable SMB sharing, and ran into this issue with robocopy. Does not appear to be fixed.

Original file:
Created: ‎November ‎23, ‎2017, ‏‎2:16:27 PM
Modified: June ‎9, ‎2017, ‏‎1:14:26 PM
Accessed: September ‎12, ‎2020, ‏‎5:27:05 PM

Copied file:
Created: January ‎1, ‎1980, ‏‎7:00:00 PM
Modified: June ‎9, ‎2017, ‏‎1:14:26 PM
Accessed: September ‎12, ‎2020, ‏‎5:27:05 PM

Each run of robocopy considers this and about 2,000 other files "Tweaked" because of this.
Can you post output of testparm -s?
 

mxk

Cadet
Joined
Sep 17, 2020
Messages
4
Can you post output of testparm -s?

Code:
# testparm -s
Load smb config files from /usr/local/etc/smb4.conf
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
        aio max threads = 2
        bind interfaces only = Yes
        disable spoolss = Yes
        dns proxy = No
        enable web service discovery = Yes
        kernel change notify = No
        load printers = No
        logging = file
        max log size = 51200
        nsupdate command = /usr/local/bin/samba-nsupdate -g
        registry shares = Yes
        restrict anonymous = 2
        server role = standalone server
        server string = TrueNAS Server
        unix extensions = No
        workgroup = WORKGROUP
        idmap config *: range = 90000001-100000000
        idmap config * : backend = tdb
        directory name cache size = 0
        dos filemode = Yes


[test]
        access based share enum = Yes
        ea support = No
        kernel share modes = No
        path = /mnt/poolname/test
        posix locking = No
        read only = No
        vfs objects = aio_fbsd shadow_copy_zfs ixnas
        nfs4:chown = true
 

bb182

Cadet
Joined
Mar 22, 2020
Messages
6
Just did a clean 12.0-BETA2.1 install, minimal config to create a pool and enable SMB sharing, and ran into this issue with robocopy. Does not appear to be fixed.

Original file:
Created: ‎November ‎23, ‎2017, ‏‎2:16:27 PM
Modified: June ‎9, ‎2017, ‏‎1:14:26 PM
Accessed: September ‎12, ‎2020, ‏‎5:27:05 PM

Copied file:
Created: January ‎1, ‎1980, ‏‎7:00:00 PM
Modified: June ‎9, ‎2017, ‏‎1:14:26 PM
Accessed: September ‎12, ‎2020, ‏‎5:27:05 PM

Each run of robocopy considers this and about 2,000 other files "Tweaked" because of this.
I reported the 1980 robocopy issue in 12.0-BETA2. It's supposed to be fixed in 12.0-RC1. What version of Windows are you using? It was only a problem for me on Windows 7. Sometime between there and the latest version of Windows 10 it appears that robocopy stopped using the temporary 1980 date. That particular creation date is still going to get pushed back to match the modification date. Apparently FreeBSD doesn't have a way to set a creation date that is later than the other dates.
 

mxk

Cadet
Joined
Sep 17, 2020
Messages
4
I reported the 1980 robocopy issue in 12.0-BETA2. It's supposed to be fixed in 12.0-RC1. What version of Windows are you using? It was only a problem for me on Windows 7. Sometime between there and the latest version of Windows 10 it appears that robocopy stopped using the temporary 1980 date. That particular creation date is still going to get pushed back to match the modification date. Apparently FreeBSD doesn't have a way to set a creation date that is later than the other dates.

I'm running Windows 10 v1803. Didn't realize RC1 is now out. I upgraded my TrueNAS, but still seeing the same behavior. Started another robocopy operation and the tweaked files still have the same 1980 creation date.

My robocopy version is 10.0.17134.1, which is two versions behind, so I can try using a more recent one.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I'm running Windows 10 v1803. Didn't realize RC1 is now out. I upgraded my TrueNAS, but still seeing the same behavior. Started another robocopy operation and the tweaked files still have the same 1980 creation date.

My robocopy version is 10.0.17134.1, which is two versions behind, so I can try using a more recent one.
Once files have 1980 creation date it stays. Remove files and retry. Fix didn't make it until RC1.
 

mxk

Cadet
Joined
Sep 17, 2020
Messages
4
Once files have 1980 creation date it stays. Remove files and retry. Fix didn't make it until RC1.

Ok, did that. The creation date now matches modification date instead of being 1980, but that also triggers the same robocopy behavior where it considers the file to be tweaked since the creation date still doesn't match the source.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Ok, did that. The creation date now matches modification date instead of being 1980, but that also triggers the same robocopy behavior where it considers the file to be tweaked since the creation date still doesn't match the source.
Yup. That's not possible without basically adding a new syscall to FreeBSD. Code is being reviewed.
 

amp88

Explorer
Joined
May 23, 2019
Messages
56
Hi @anodos , could you please confirm whether this bug is still present or fixed in TrueNAS 12.0-RELEASE? I can't test it myself because I need a stable and working environment at the moment, so I can't risk a change which is going to cause significant hassle and downtime. If I could upgrade with confidence it's going to work that would be appreciated. Thanks.
 

FindingFilene

Dabbler
Joined
Nov 25, 2020
Messages
20
So, I migrated to a newer TrueNAS (TrueNAS Scale) and I'm having this issue right now in my TrueNAS Scale 13 Stable. I'm not sure if whatever was there would transfer between installs like this. T_T

I'm using a mobile file sharing app that works with SMB.
 
Top