在macOS下挂载SMB共享的两块硬盘,发现硬盘间拷贝文件时是先下载到本地,然后在做上传的。
查询资料后得知,需要开启额外参数,但是我添加后始终不生效,无法实现server-side copy的效果。
有没有朋友有过相关经验?
参考Wiki:
https://wiki.samba.org/index.php/Server-Side_Copy
参考帖子:
Unraid SMB额外参数(在GUI【设置】-【SMB】-【SMB额外】):
#unassigned_devices_start
#Unassigned devices share includes
#include = /tmp/unassigned.devices/smb-settings.conf
#unassigned_devices_end
[global]
vfs objects = catia fruit streams_xattr
fruit:copyfile = Yes
fruit:nfs_aces = No
fruit:zero_file_id = Yes
fruit:metadata = stream
fruit:encoding = native
spotlight backend = tracker
[disk1]
path = /mnt/disk1
veto files = /._*/.DS_Store/
delete veto files = yes
spotlight = yes
fruit:copyfile = yes
[disk3]
path = /mnt/disk3
veto files = /._*/.DS_Store/
delete veto files = yes
spotlight = yes
fruit:copyfile = yes
Unraid SMB参数输出:
root@AurStation:~# testparm -s
Load smb config files from /etc/samba/smb.conf
lpcfg_do_global_parameter: WARNING: The "null passwords" 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
host msdfs = No
interfaces = 192.168.31.220 127.0.0.1
load printers = No
logging = syslog@0
map to guest = Bad User
max open files = 40960
multicast dns register = No
ntlm auth = ntlmv1-permitted
null passwords = Yes
os level = 100
passdb backend = smbpasswd
printcap name = /dev/null
security = USER
server min protocol = NT1
server multi channel support = No
server string = My home nas
show add printer wizard = No
smb1 unix extensions = No
fruit:encoding = native
fruit:metadata = stream
fruit:zero_file_id = Yes
fruit:copyfile = Yes
fruit:nfs_aces = No
idmap config * : range = 3000-7999
idmap config * : backend = tdb
acl allow execute always = Yes
aio read size = 0
aio write size = 0
create mask = 0777
directory mask = 0777
hide dot files = No
include = /etc/samba/smb-shares.conf
invalid users = root
spotlight backend = tracker
use sendfile = Yes
vfs objects = catia fruit streams_xattr
wide links = Yes
[disk1]
delete veto files = Yes
path = /mnt/disk1
spotlight = Yes
valid users = admin
veto files = /._*/.DS_Store/
write list = admin
fruit:encoding = native
[disk3]
delete veto files = Yes
path = /mnt/disk3
spotlight = Yes
valid users = admin
veto files = /._*/.DS_Store/
write list = admin
fruit:encoding = native
Unraid SMBSTATUS输出(4501为我的mac客户端,SMB协议为SMB3):
# smbstatus
Samba version 4.17.12
PID Username Group Machine Protocol Version Encryption Signing
----------------------------------------------------------------------------------------------------------------------------------------
4501 admin users 192.168.31.142 (ipv4:192.168.31.142:61252) SMB3_11 - partial(AES-128-GMAC)
2696 admin users 192.168.31.250 (ipv4:192.168.31.250:15335) SMB3_11 - partial(AES-128-GMAC)