在不中断 windows 客户端上的负载的情况下重新启动 smbd 守护程序

restart of the smbd daemon without interrupting the load on the windows client

这样的问题,有一台服务器(集群)使用了smb,服务器进入AD域,有时需要重启smbd服务(reload不行),但是在同时在客户端(windows)有一些文件的复制,然后加载中断,点击“重试”按钮后,下载从头开始。是否可以做类似的事情,以便负载从中断的那一刻起继续进行,也许您需要像那样配置客户端。客户端连接为 SMBv3 或 SMBv2

服务器 ubuntu 18.04。 在 zfs

创建的 smb

smb.conf:

[global]
    workgroup = TEST247
    realm = test247.ru
    security = ads
    auth methods = winbind
    interfaces = 172.16.11.170/24 
    bind interfaces only = yes
    netbios name = SERVER
    encrypt passwords = true
    map to guest = Bad User
    max log size = 300
    dns proxy = no
    socket options = TCP_NODELAY
    domain master = no
    local master = no
    preferred master = no
    os level = 0
    domain logons = no
    load printers = no
    show add printer wizard = no
    log level = 0 vfs:2
    max log size = 0
    syslog = 0
    printcap name = /dev/null
    disable spoolss = yes
    name resolve order = lmhosts wins host bcast
    machine password timeout = 604800
    name cache timeout = 660
    idmap config TEST247 : backend = rid
    idmap config TEST247 : base_rid = 0
    idmap config TEST247 : range = 100000 - 200000
    idmap config * : range = 200001-300000
    idmap config * : backend = tdb
    idmap cache time = 604800
    idmap negative cache time = 60
    winbind rpc only = yes
    winbind cache time = 120
    winbind enum groups = yes
    winbind enum users = yes
    winbind max domain connections = 10
    winbind use default domain = yes
    winbind refresh tickets = yes
    winbind reconnect delay = 15
    winbind request timeout = 25
    winbind separator = ^
    private dir = /var/lib/samba/private
    lock directory = /run/samba
    state directory = /var/lib/samba
    cache directory = /var/cache/samba
    pid directory = /run/samba
    log file = /var/log/samba/smb.%m
    include = /etc/samba/smb-res.conf

测试参数:

testparm -s /etc/samba/smb.conf 

Load smb config files from /etc/samba/smb.conf
WARNING: The "auth methods" option is deprecated
WARNING: The "syslog" option is deprecated
Loaded services file OK.
Server role: ROLE_DOMAIN_MEMBER

smb-res.conf:

[test109_smb]
    comment = test109_smb share
    path = /config/pool/test109/smb
    browseable = yes
    writable = yes
    inherit acls = yes
    inherit owner = no
    inherit permissions = yes
    map acl inherit = yes
    nt acl support = yes
    create mask = 0777
    force create mode = 0777
    force directory mode = 0777
    store dos attributes = yes
    public = no
    admin users = 
    valid users =  
    write list = 
    read list = 
    invalid users = 
    vfs objects = acl_xattr    
    full_audit:prefix = %S|%u|%I
    full_audit:facility = local5
    full_audit:priority = notice
    full_audit:success = none
    full_audit:failure = none
    shadow: snapdir = .zfs/snapshot
    shadow: sort = desc
    shadow: localtime = yes
    shadow: format = shadow_%d.%m.%Y-%H:%M:%S
    worm: grace_period = 30
    cryptfile: method = grasshopper

恢复复制操作不依赖于 smb 客户端或服务器,而是依赖于正在进行复制的应用程序。

标准Windows副本不知道恢复

其他(第三方)应用程序(也许 Total Commander?)可以更加智能。您甚至可以编写自己的应用程序来进行智能复制。