.Mov files corrupted after moving to NAS drive

JWolfe

Dabbler
Joined
Feb 5, 2021
Messages
16
Hello to all,

I recently started using TrueNAS so I'm still in the heavy part of the learning curve.

I use a Mac as my daily driver and fairly often will screen record (not capture) various items of interest. After I set up my NAS I transferred some files over, which included the screen recordings I mentioned. After transferring I tried to access them and found that they are now corrupt. When I try to open them directly from the NAS drive they don't play and show a green screen with distortion. If I transfer them from NAS drive to another location and then try to open them I experience the same problem.

Has anyone else experienced this problem or understand why they are corrupting when I transfer them to NAS drive.

Thank you!
 

c77dk

Patron
Joined
Nov 27, 2019
Messages
468
Hi,

Please list your hardware and TrueNAS version - otherwise helping will be a lot harder.
 

Kris Moore

SVP of Engineering
Administrator
Moderator
iXsystems
Joined
Nov 12, 2015
Messages
1,471
That is concerning, but we'll need a lot more information to make a determination where the issue may be here. Can you open a ticket on jira.ixsystems.com and attach a debug file (system -> advanced -> save debug).

If you can provide that info, we'll dig into this and see if we can get you an answer, since no, that is not 'normal' behaivor.

P.S. In the meantime, if you can try some basic verification first, that would be good. I.E. get a md5 or sha256 sum of the video in question. Copy it to the NAS and then back again, does the checksum change?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
How are you sharing from the NAS? AFP? SMB?
 

JWolfe

Dabbler
Joined
Feb 5, 2021
Messages
16
That is concerning, but we'll need a lot more information to make a determination where the issue may be here. Can you open a ticket on jira.ixsystems.com and attach a debug file (system -> advanced -> save debug).

If you can provide that info, we'll dig into this and see if we can get you an answer, since no, that is not 'normal' behaivor.

P.S. In the meantime, if you can try some basic verification first, that would be good. I.E. get a md5 or sha256 sum of the video in question. Copy it to the NAS and then back again, does the checksum change?
Hello, I will open ticket and generate the log as requested. Will verify hash as soon as possible.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399

JWolfe

Dabbler
Joined
Feb 5, 2021
Messages
16
Please provide the output of testparm -s
Last login: Tue Feb 2 09:31:19 on pts/0
FreeBSD 12.2-RELEASE-p2 663e6b09467(HEAD) TRUENAS

TrueNAS (c) 2009-2020, iXsystems, Inc.
All rights reserved.
TrueNAS code is released under the modified BSD license with some
files copyrighted by (c) iXsystems, Inc.

For more information, documentation, help or support, go here:
http://truenas.com
Welcome to TrueNAS

Warning: settings changed through the CLI are not written to
the configuration database and will be reset on reboot.

root@truenas[~]# 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
username map = /usr/local/etc/smbusername.map
username map cache time = 60
idmap config *: range = 90000001-100000000
idmap config * : backend = tdb
directory name cache size = 0
dos filemode = Yes


[redacted_files]
ea support = No
kernel share modes
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
In the SMB service, please enable "Enable Apple SMB2/3 Protocol Extensions".
In the share definition, also enable "Enable Alternate Data Streams", and set the share purpose to "Multi-protocol (AFP/SMB) shares".
Restart the SMB service afterwards.

The corruption you're seeing is due to the Mac OS resource fork not being handled correctly.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
If the resource forks were interleaved into the actual video stream, that would manifest as what @JWolfe is experiencing.
 

JWolfe

Dabbler
Joined
Feb 5, 2021
Messages
16
That is concerning, but we'll need a lot more information to make a determination where the issue may be here. Can you open a ticket on jira.ixsystems.com and attach a debug file (system -> advanced -> save debug).

If you can provide that info, we'll dig into this and see if we can get you an answer, since no, that is not 'normal' behaivor.

P.S. In the meantime, if you can try some basic verification first, that would be good. I.E. get a md5 or sha256 sum of the video in question. Copy it to the NAS and then back again, does the checksum change?
I opened a ticket and provided the debug file along with MD5 hash values. Also, hashed values change from before and after move.

In the meantime I am working through the solution @Samuel Tai posted.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
If the resource forks were interleaved into the actual video stream, that would manifest as what @JWolfe is experiencing.
Okay. Resource forks are handled fine as long as alternate datastream support is enabled. None of the other parameters are required. There is an issue of vfs object stacking in 12.0, that will be fixed in U2 (can be worked around by setting "vfs objects = streams_xattr ixnas" as an aux parameter for the share).
 

JWolfe

Dabbler
Joined
Feb 5, 2021
Messages
16
In the SMB service, please enable "Enable Apple SMB2/3 Protocol Extensions".
In the share definition, also enable "Enable Alternate Data Streams", and set the share purpose to "Multi-protocol (AFP/SMB) shares".
Restart the SMB service afterwards.

The corruption you're seeing is due to the Mac OS resource fork not being handled correctly.
Due to my Neophyte status I'm not sure of all of the paths you provided.

I went to Services > SMB > Configure > Advanced Options and enabled the Apple SMB2/3 service.

As far as the share definition goes I went to Sharing > SMB (selected share) > Edit > Advanced Options and enabled Alternate Data Streams.

I don't see anything yet that refers to "Multi-protocol (AFP/SMB) shares"
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
1612550906250.png


Also, as @anodos recommended, add "vfs objects = streams_xattr ixnas" to the share's Auxiliary parameters field. Remember to restart the SMB service after your changes.
 

JWolfe

Dabbler
Joined
Feb 5, 2021
Messages
16
View attachment 44913

Also, as @anodos recommended, add "vfs objects = streams_xattr ixnas" to the share's Auxiliary parameters field. Remember to restart the SMB service after your changes.
Do I need to move my data out of the share before making this change to Multi-protocol?
Screen Shot 2021-02-05 at 11.55.21 AM.png


As far as restarting the SMB is that done by moving the "running" slider or is it done somewhere else.

Thank you
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
So long as you aren't using special characters like é in any of your current files, you won't be affected by the parameter change. However, as all the current files are stored incorrectly, since alternate data streams wasn't enabled, you'll probably need to delete all existing files in the share, and then reload them.

Yes, clicking the slider will change the state of the SMB service.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Did you delete the existing files, and then recopy a .mov to test?
 
Top