'creation date' metadata lost when copying files to FreeNAS SMB share

seanm

Guru
Joined
Jun 11, 2018
Messages
570
When I copy files from my Mac to a FreeNAS SMB share, almost all the file metadata is preserved, but one exception seems to be the file creation date. See screenshot.

Is this deliberate? A bug? A limitation?

Before I move several terabytes from my old Mac file server to my FreeNAS, is there anyway to preserve all my file creation dates?

Thanks.
 

Attachments

  • CreationDateLost.png
    CreationDateLost.png
    66.9 KB · Views: 385

seanm

Guru
Joined
Jun 11, 2018
Messages
570
Current (11.2-U5).

I've since been working my way down the rabbit hole...

First, the behaviour is the same from a Windows client as from a Mac client. In either case, the modification date is preserved, but the creation date is set to the modification date.

Then I tried copying Mac to Mac, Mac to Windows, Windows to Mac, and Windows to Windows. In all cases the creation date was preserved.

Next, I've been looking at FreeBSD's behaviour. Creation dates seem poorly supported in general. 'stat' can show the creation date, but so far I can't find any built-in tool that can modify it. 'touch' can't. 'fsdb' doesn't support ZFS. 'cp -p' and 'cp -a' and 'tar' don't preserve it. Even the futimens system call (and C API) provide only for 2 timestamps at once, though it is possible to use it to change the creation date with trickery.

Basically, given FreeBSD's poor support, I'm not surprised by FreeNAS' behaviour.

Still, as FreeNAS behaves contrary to both Windows and Mac behaviour, I consider it a bug and created: https://jira.ixsystems.com/browse/NAS-102985
 

AndresNAS

Cadet
Joined
Nov 11, 2020
Messages
1
Anyone has any update on how to solve the date issue? I have installed the latest version (TrueNAS CORE 12.0-RELEASE) and the files won’t keep their creation date at all. I have teied windows and Mac transfers using SMB, by laptop and by phone, same issue everywhere. Thanks in advance
 

q66

Cadet
Joined
Oct 13, 2020
Messages
9
I created a support request for this a while back with steps to reproduce and packet captures of it working on other ZFS based and Windows servers, case RCJ-443-51230

Last I heard they were going to look at it but that I shouldn't hold my breath.
 

q66

Cadet
Joined
Oct 13, 2020
Messages
9
I held my breath and can now confirm it's working on TrueNAS-12.0-U2.1
Thank you TrueNAS support!
 
Top