Issue with "Modified" timestamps on Windows file copy

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,545
We are a couple of weeks out from U2 going live. I am attaching replacement VFS modules for 11.3-U1 to this post. It should contain ixnas.so and zfsacl.so. This files apply to samba 4.10.12 (you can first validate the samba version by running the command "smbd -V").

How to apply:
1) extract the zipped files
2) clone your boot environment (so that you have a backup)
3) copy the extracted files (ixnas.so and zfsacl.so) to /usr/local/lib/shared-modules/vfs
4) restart SMB service service smbd onerestart
 

Attachments

  • replacement_vfs_modules_for_11.3-U1.zip
    111.2 KB · Views: 432

cmdrwgls

Cadet
Joined
Mar 9, 2020
Messages
6
We are a couple of weeks out from U2 going live. I am attaching replacement VFS modules for 11.3-U1 to this post. It should contain ixnas.so and zfsacl.so. This files apply to samba 4.10.12 (you can first validate the samba version by running the command "smbd -V").

How to apply:
1) extract the zipped files
2) clone your boot environment (so that you have a backup)
3) copy the extracted files (ixnas.so and zfsacl.so) to /usr/local/lib/shared-modules/vfs
4) restart SMB service service smbd onerestart
I'll apply the patch, I'm happy it exists, but once again I don't understand. You've got an official update mechanism, you've got a fix, and ... you distribute it through a forum post requiring manual steps.

Here's a timeline of my FreeNAS experience:
  • Fall last year, test FreeNAS in-house, decide that the ZFS and management features are lovely
  • End-of-fall last year, clone client process onto FreeNAS for testing
  • Just before 11.3 release, move client production onto FreeNAS
  • 11.3-U1 release, completely hoses client backup process and renders existing point-in-time snapshots worthless since every one of them is now a complete copy
  • move client production back to a Debian server, which NEVER, NOT ONCE IN 20 YEARS pushed a STABLE update that broke one of my countless production machines
Nice management features and ZFS were enough to get me curious, but what do you think the odds are of my selling this client on FreeNAS in future?
 

Calleng

Cadet
Joined
Mar 17, 2020
Messages
7
I am currently using FreeNAS to store photo file on a server for our photography. When I updated to 11.3 U1 the files get the dates changed to the copy time that they are copied to the server from the camera card. This is unacceptable for us. I have abou the the patch for the zfsacl.so file. My question is : how do I copy it to the boot drive? Can someone point me to a description of how to do this? I have read all the posts on this thread and have downloaded the zfsacl.so file. How do I proceed from here?
 

cmdrwgls

Cadet
Joined
Mar 9, 2020
Messages
6
[...] How do I proceed from here?

The instructions are in this post:

We are a couple of weeks out from U2 going live. I am attaching replacement VFS modules for 11.3-U1 to this post. It should contain ixnas.so and zfsacl.so. This files apply to samba 4.10.12 (you can first validate the samba version by running the command "smbd -V").

How to apply:
1) extract the zipped files
2) clone your boot environment (so that you have a backup)
3) copy the extracted files (ixnas.so and zfsacl.so) to /usr/local/lib/shared-modules/vfs
4) restart SMB service service smbd onerestart

A bit more detail:
  • download the files from the linked post
  • extract them (ixnas.so and zfsacl.so)
  • clone your boot environment
    • from your FreeNAS web interface, go to System/Boot, click the three dots beside your current config, click clone
    • this step is NOT NECESSARY, just a precaution so you can revert if something goes wrong
  • check to see if SSH is running
    • from your FreeNAS web interface, go to Services, make sure the SSH "running" toggle is enabled
  • SCP the files (ixnas.so and zfsacl.so) to the correct directory on your FreeNAS server (/usr/local/lib/shared-modules/vfs)
    • scp /location/of/extracted/files/ixnas.so user@server:/usr/local/lib/shared-modules/vfs
    • scp /location/of/extracted/files/zfsacl.so user@server:/usr/local/lib/shared-modules/vfs
  • restart SMB service
    • service smbd onerestart
  • if SSH was NOT running before you started this process, go back to Services and disable it again
 

turment

Dabbler
Joined
Feb 3, 2020
Messages
46
Like Debian?
Every free product I know is based on best effort model, some ones sorting problems faster and better than others.

*nix and *bsd are not immune from bugs, such as any other even commercial product.

The big difference is when you pay you can ask for fast solutions, when a product is free, well, nobody has the duty to help you.
 

cmdrwgls

Cadet
Joined
Mar 9, 2020
Messages
6
Every free product I know is based on best effort model, some ones sorting problems faster and better than others.

*nix and *bsd are not immune from bugs, such as any other even commercial product.

The big difference is when you pay you can ask for fast solutions, when a product is free, well, nobody has the duty to help you.

Did you read my timeline? I trialled a new product and it failed spectacularly. The update that hosed it was pushed from the company you're suggesting I pay for support. Your solution is ... that I pay the company that pushed the broken update. And left it up. It's still up.

Is TrueNAS not affected by this? Is FreeNAS their unstable testbed? Did they push this update to TrueNAS and immediately revoke it? Did they push this update to TrueNAS and fix it promptly? Again, not asking rhetorical questions, the whole point of trying FreeNAS was to see if it was worth using.

The way IXSystems responds to bugs is more important than the product itself. Which is why my FreeNAS experiment is over, for now at least.
 

Calleng

Cadet
Joined
Mar 17, 2020
Messages
7
I tried copying the files from my computer with filezilla and renamed the originals, then copied the new files to the correct folder. When I look at the files in the filezilla screen the size is correct for the updated files. Ran the "service smbd onerestart " from the shell. No help. Did I miss something?
Files are still copied with the changed timestamps. I rebooted the machine and still no correct file timestamps.
 

Calleng

Cadet
Joined
Mar 17, 2020
Messages
7
Note: I had to change the permission for user root to log in to get permissions to copy the files from filezilla to a folder on the freenas server and to rename the originals. Is this the correct way to transfer the files. Am I doing something wrong?
 

TimoJ

Dabbler
Joined
Jul 28, 2018
Messages
39
I used WinSCP with root user. Just copied and replaced the files, works fine.
 

Calleng

Cadet
Joined
Mar 17, 2020
Messages
7
I just solved my problem. I copied and replaced the originals with the two updated files using WinSCP as root user. Ran
"service smbd onerestart". It was still not copying files with the correct timestamps. I looked at the VFS Objects and I had removed ixnas yesterday. I put it back and now the timestamps are correct upon copying files.
VFS Objects:
ixnas,streams_xattr,zfs_space,zfsacl with the new files.
Thanks everyone for the help.
Another question. I have 18 10tb drives to set up in Freenas. I was considering a ZFSRaid2 with hot spare, zfsraid3 or zraid3 with hot spare.
I then read not to put that many drives in one vdev. What would be best. I am only going to use the server for storage of our camera RAW Files to read and work on in Lightroom and Photoshop. Nothing else.
Machine stats:
intel i7 6850k cpu with 128 gb RAM
18 10tb WS Red drives with an LSI 9300-8i Controller into an intel port expander.
Suggestions and comments?
 

Calleng

Cadet
Joined
Mar 17, 2020
Messages
7
One other issue I have noticed with timestamps. If I copy a folder from my computer to the freeNAS server the folder date is changed to the copy time. It does not change the folder time when when I copy to a local drive. Is there any way to preserve the folder time and date when copying to the FreeNAS Server? Any thoughts on this. At least now the timestamps on the individual files are perserved.
 

bb182

Cadet
Joined
Mar 22, 2020
Messages
6
One other issue I have noticed with timestamps. If I copy a folder from my computer to the freeNAS server the folder date is changed to the copy time. It does not change the folder time when when I copy to a local drive. Is there any way to preserve the folder time and date when copying to the FreeNAS Server? Any thoughts on this. At least now the timestamps on the individual files are perserved.
It's normal to lose the modification date on non-empty directories when using Windows File Explorer to copy/move files to any location that isn't on the same volume. It initially creates directories with their modification dates preserved (or tries to anyway), but the directories are later modified when their contents are copied over. Robocopy is a bit smarter and doesn't seem to have this problem, at least when doing local cross-volume copies. I'm not sure how exactly it interacts with FreeNAS in particular.
 

FrankCA

Cadet
Joined
May 24, 2018
Messages
2
I just solved my problem. I copied and replaced the originals with the two updated files using WinSCP as root user. Ran
"service smbd onerestart". It was still not copying files with the correct timestamps. I looked at the VFS Objects and I had removed ixnas yesterday. I put it back and now the timestamps are correct upon copying files.
VFS Objects:
ixnas,streams_xattr,zfs_space,zfsacl with the new files.
Thanks everyone for the help.
Another question. I have 18 10tb drives to set up in Freenas. I was considering a ZFSRaid2 with hot spare, zfsraid3 or zraid3 with hot spare.
I then read not to put that many drives in one vdev. What would be best. I am only going to use the server for storage of our camera RAW Files to read and work on in Lightroom and Photoshop. Nothing else.
Machine stats:
intel i7 6850k cpu with 128 gb RAM
18 10tb WS Red drives with an LSI 9300-8i Controller into an intel port expander.
Suggestions and comments?
I can confirm Calleng's experience. There was no change after updating the two files, I added ixnas VFS object and voila we're back in business.
As a note for those not versed in the ways of FreeBSD (like me), its real easy to update the files from a Windows platform using WinSCP.
 

FrankCA

Cadet
Joined
May 24, 2018
Messages
2
I can confirm Calleng's experience. There was no change after updating the two files, I added ixnas VFS object and voila we're back in business.
As a note for those not versed in the ways of FreeBSD (like me), its real easy to update the files from a Windows platform using WinSCP.
PS: a reboot was needed after adding ixnas, I also rebooted after updating the files but that made no difference.
 

Jeff Faber

Cadet
Joined
Apr 1, 2020
Messages
2
Chiming in in case it's helpful - I was having an issue with touch from an Ubuntu box where it was failing to set date in the past, which worked in 11.2. Applied the 2 patched files and nothing changed, then I added ixnas to my vfs (so it now says zfs_space ixnas zfsacl streams_xattr) and touch now works again. Thanks for all the guidance here and for the patch.
 
Top