Hi,
I am using my TrueNAS (among other stuff) to serve different SMB shares.
I would like to use server-side copy and found this old thread .
When I copy large files in one share or between two shares on the same server, the data is first transferred to the client and then back to the NAS.
The client uses Windows 11. SMB1 is not enabled on TrueNAS’ side.
Any hints as to how I could get this to work?
Server side copy works with Windows without any additional configuration. How are you determining that it’s not working?
I copied a file from one folder in a share to another folder. First try was in the same share, second in another share on the same server.
In both cases I saw massive network activity on the clients NIC and the speed of the copy operation fit the bandwidth used on my NIC
Have you made any unsupported changes to the server configuration (outside of webui)? What is output of the shell command sudo testparm -s
?
I’ve got to admit that I’ve installed a check mk agent for monitoring. That shouldn’t interfere with any system functionality though.
Output of testparm -s
is:
root@truenas1:~# testparm -s
Load smb config files from /etc/smb4.conf
lpcfg_do_global_parameter: WARNING: The "syslog only" option is deprecated
Loaded services file OK.
Weak crypto is allowed by GnuTLS (e.g. NTLM as a compatibility fallback)
Server role: ROLE_STANDALONE
# Global parameters
[global]
bind interfaces only = Yes
disable spoolss = Yes
dns proxy = No
load printers = No
logging = file
max log size = 5120
netbios aliases = truenas
passdb backend = tdbsam:/var/run/samba-cache/private/passdb.tdb
printcap name = /dev/null
registry shares = Yes
restrict anonymous = 2
server multi channel support = No
server string = TrueNAS Server
winbind request timeout = 2
idmap config * : range = 90000001 - 100000000
fruit:nfs_aces = false
fruit:zero_file_id = false
rpc_server:mdssvc = disabled
rpc_daemon:mdssd = disabled
idmap config * : backend = tdb
create mask = 0775
directory mask = 0775
[Diverses]
ea support = No
nt acl support = No
path = /mnt/hdd_raidz1/misc
posix locking = No
read only = No
smbd max xattr size = 2097152
vfs objects = streams_xattr shadow_copy_zfs recycle zfs_core io_uring
tn:vuid =
fruit:time machine max size = 0
fruit:time machine = False
recycle:subdir_mode = 0700
recycle:directory_mode = 0777
recycle:touch = True
recycle:versions = True
recycle:keeptree = True
recycle:repository = .recycle/%U
tn:home = False
tn:path_suffix =
tn:purpose = NO_PRESET
[Medien]
ea support = No
nt acl support = No
path = /mnt/hdd_raidz1/media
posix locking = No
read only = No
smbd max xattr size = 2097152
vfs objects = streams_xattr shadow_copy_zfs zfs_core io_uring
tn:vuid = 1fdce6d4-bcc7-4ee0-99ef-ce2d26c554cc
fruit:time machine max size = 0
fruit:time machine = False
tn:home = False
tn:path_suffix =
tn:purpose = DEFAULT_SHARE
[Scan]
ea support = No
path = /mnt/hdd_raidz1/scan
posix locking = No
read only = No
smbd max xattr size = 2097152
vfs objects = streams_xattr shadow_copy_zfs ixnas recycle zfs_core io_uring
tn:vuid =
fruit:time machine max size = 0
fruit:time machine = False
nfs4:chown = True
recycle:subdir_mode = 0700
recycle:directory_mode = 0777
recycle:touch = True
recycle:versions = True
recycle:keeptree = True
recycle:repository = .recycle/%U
tn:home = False
tn:path_suffix =
tn:purpose = NO_PRESET
[SSD_Misc]
ea support = No
path = /mnt/ssd_mirror/SSD_Misc
posix locking = No
read only = No
smbd max xattr size = 2097152
vfs objects = streams_xattr shadow_copy_zfs acl_xattr recycle zfs_core io_uring
tn:vuid =
fruit:time machine max size = 0
fruit:time machine = False
recycle:subdir_mode = 0700
recycle:directory_mode = 0777
recycle:touch = True
recycle:versions = True
recycle:keeptree = True
recycle:repository = .recycle/%U
tn:home = False
tn:path_suffix =
tn:purpose = NO_PRESET
[Backup]
ea support = No
nt acl support = No
path = /mnt/hdd_raidz1/backup
posix locking = No
read only = No
smbd max xattr size = 2097152
vfs objects = streams_xattr shadow_copy_zfs zfs_core io_uring
tn:vuid =
fruit:time machine max size = 0
fruit:time machine = False
tn:home = False
tn:path_suffix =
tn:purpose = DEFAULT_SHARE
NugentS
September 16, 2024, 7:37am
6
Watching this one - as I seem to have the same symptoms.
Copy a file to another folder, withing the same dataset uses my network card a lot. Doesn’t look server side to me
1 Like
I’d like to bump this… Anyone got an idea?
I’m not seeing CI-related issues I haven’t had time to manually check yet. You can enable auditing for the SMB share and check that the FSCTL is being issued for server-side copy (OFFLOAD_READ, OFFLOAD_WRITE). If client isn’t issuing fsctl then you need to trouble-shoot client-side.
1 Like
You can also look at a pcap to determine whether there are copy chunk requests being made. There may be some client-side software (for example endpoint protection) that is interfering with copy chunk requests.
1 Like
Sorry, forgot this for a few days.
data.txt (15.3 KB)
I enabled audit logging on a share and copied a 1,4GB file in that share.
Here’s a screenshot of the audit log.
I’ve also exported a csv which I will attach as a txt file.
Yeah, it’s pretty clear that your client didn’t even request to perform a server-side copy.
As long as you’re not using transport encryption, it’s pretty trivial to take a pcap and load it in wireshark to confirm. Wireshark has a good SMB protocol dissector.
can’t see such a request in wireshark either
the question is: why?
Are there any prerequisites I should know about?
It’s a normal Windows 11 Pro installation…
Okay, forget everything I said.
I was just plain dumb.
It is a normal Windows installation but I use teracopy.
TeraCopy seems not to even try server side copy.
Sorry for wasting your time.
It was just too obvious.
If, by chance, you or someone else uses TeraCopy too and has a solution to this problem other than just not using it for network stuff, I’d also be very thankful.
1 Like
TheColin21:
I use teracopy
Twelve days later, after 14 posts.
1 Like
If, by chance, you or someone else uses TeraCopy too and has a solution to this problem other than just not using it for network stuff, I’d also be very thankful.
The fact that it’s using the wrong copying APIs does not inspire much confidence in the product. I wonder what other things are missed.
I’ve used it as my default copying tool on Windows for many years now. It’s much faster than the built-in in copy dialogue and has quite a few more features.
That’s for local drives though as it seems😅
I’ve opened a feature request with the developer.