macOS: mv to SMB share truncates files

fillg1

Dabbler
Joined
Dec 14, 2014
Messages
34
Hi folks
I just discovered a strange problem with some of my SMB shares on a TrueNAS-13.0-U6.1 from macOS 14.4

eg.

Code:
# create a testfile
dd if=/dev/zero of=testfile count=1024000
1024000+0 records in
1024000+0 records out
524288000 bytes transferred in 2.363704 secs (221807807 bytes/sec)

# create a copy
cp testfile testfile2

# check checksums
shasum -a 256 testfile*
a08a92258f621b55d08ad1e84c90c2ea6286fc6b6c9a4dfa7156afb16c190170  testfile
a08a92258f621b55d08ad1e84c90c2ea6286fc6b6c9a4dfa7156afb16c190170  testfile2

# mv testfile2 to SMB share
mv testfile2 /Volumes/iTunes
# checksum on remote share
shasum -a 256 /Volumes/iTunes/testfile2
0a68fce4a842460a8c5a8979843eedd5f6314c7d2462ee33897ee501dafa67b9  /Volumes/iTunes/testfile2
# wrong!! lets check file sizes
ls -s testfile /Volumes/iTunes/testfile2
 901120 /Volumes/iTunes/testfile2 1032200 testfile
# try to copy the original
cp testfile /Volumes/iTunes/testfile2
# and check again
shasum -a 256 /Volumes/iTunes/testfile2
a08a92258f621b55d08ad1e84c90c2ea6286fc6b6c9a4dfa7156afb16c190170  /Volumes/iTunes/testfile2
# thats better, lets check for file size again
ls -s testfile /Volumes/iTunes/testfile2
1024000 /Volumes/iTunes/testfile2 1032200 testfile


This happens only on some of my SMB shares.
Any idea what's going on here?
Where should I start investigating, the SMB share configuration?
 
Top