nharrington
Dabbler
- Joined
- Feb 26, 2020
- Messages
- 10
Thanks for the quick response, anodos. I'm afraid I'm not having the same luck as LarryG. I followed your instructions, but I'm still seeing the modified dates on copied files being set to the date/time that the copy occurred:If you feel enterprising, you can extract the attached zipped file, clone your boot environment, and replace /usr/local/lib/shared-modules/vfs/zfsacl.so with it. Once you do this run the command "service smbd onerestart".
Code:
Cloned boot environment from 11.3-U1 then restarted FreeNAS: root@nas01:/ # mount | grep boot freenas-boot/ROOT/11.3-U1-ModifiedDateFix on / (zfs, local, noatime, nfsv4acls) Copied replacement file into position: root@nas01:/usr/local/lib/shared-modules/vfs # ll zfsacl* -rwxr-xr-x 1 root wheel 107149 Mar 1 20:02 zfsacl.so* Restarted SMBD: root@nas01:/usr/local/lib/shared-modules/vfs # service smbd onerestart Stopping smbd. Waiting for PIDS: 2198. Starting smbd. Created temporary directory on SMB share (O:\0) Created directories on O:\0 for COPY, XCOPY, ROBOCOPY, and Windows Explorer Used each method to copy a file from C: to O:\0\... Source: Directory of C:\Utility 02/25/2020 11:43 AM 2,236 MapDrives.cmd Destinations: Directory of O:\0\copy 03/01/2020 08:40 PM 2,236 MapDrives.cmd Directory of O:\0\explorer 03/01/2020 08:41 PM 2,236 MapDrives.cmd Directory of O:\0\robocopy 02/25/2020 11:43 AM 2,236 MapDrives.cmd Directory of O:\0\xcopy 03/01/2020 08:40 PM 2,236 MapDrives.cmd
As you can see, ROBOCOPY is still the only method that is preserving the modified timestamp.
Out of curiousity, I also tried restarting FreeNAS after the test above, but the results were the same.
I noticed that the file that was modified was zfsacl.so, however I'm just using the default 11.3-RELEASE vfs objects plus fruit (i.e., fruit, ixnas, streams_xattr ) on my SMB shares, which does not appear to include zfsacl. I ran testparm to confirm and all of my SMB shares are showing this:
vfs objects = shadow_copy_zfs ixnas fruit streams_xattr
ixnas, fruit, and streams_xattr show up as selected in the Web UI for the shares, and I'm assuming that shadow_copy_zfs is included because I checked the Enable Shadow Copies box.
Any suggestions?