Özkan Göksu
2018-Feb-23 11:24 UTC
[Samba] smbcontrol reload & close-share not working like previous version
Hello. I just upgrade my kernel, smbd and changed my smb.conf. (4.14.12-1-Arch" to "4.14.19-1-lts") "samba 4.7.4-1" But now, "reload smbd" and "close-share" can not drop connected users to share. Because of that I have to restart smbd service for destroy a share right now. But it was working previous version and I don't know what is wrong right now. As you know, restarting SMBD affects other shares. This is dirty way to an easy job. When I try to destroy a share I follow these steps: 1- Edit smb.conf "delete include line" 2- Delete samba share conf (what is included) 3- smbcontrol smbd close-share 4- smbcontrol all reload-config or "systemctl reload smbd" 5- zfs destroy dataset This steps not working anymore because user still won't disconnect share until service restart. When I close a share I need to take out users from the share because when they still use the share I'm getting "busy" error when I try to destroy dataset. Any advice please? *smb.conf* [Global] netbios name = DEV2 server string = %h Test Host workgroup = sm realm =sm.pvt security = ADS server role = member server idmap config *: backend = tdb idmap config *: range = 90000001-100000000 winbind cache time = 7200 winbind offline logon = yes winbind nested groups = yes winbind use default domain = yes winbind refresh tickets = yes idmap config sm.pvt: backend = rid idmap config sm.pvt: range = 20000-90000000 encrypt passwords = yes dns proxy = no strict locking = Auto oplocks = yes deadtime = 15 logging = file max log size = 51200 log level = 2 load printers = no printing = bsd printcap name = /dev/null disable spoolss = yes unix charset = UTF-8 case sensitive = auto guest account = nobody map to guest = Bad User obey pam restrictions = yes ntlm auth = no allow trusted domains = no client ntlmv2 auth = yes kernel change notify = yes panic action = /usr/bin/samba-backtrace dns update command = /usr/sbin/samba_dnsupdate acl allow execute always = true dos filemode = yes multicast dns register = no domain logons = no client use spnego = yes local master = no domain master = no preferred master = no template shell = /bin/sh template homedir = /home/%D/%U max xmit = 65536 max open files = 232040 strict sync = no include = /etc/samba/shares/ssdpool.test.cifs *Share conf:* [test] path = /ssdpool/test guest ok =no browseable = yes writeable = yes hide dot files = yes veto files = /.snapshot/.windows/.mac/.zfs/ use sendfile = no acl group control = yes map acl inherit = yes inherit owner = yes inherit permissions = yes inherit acls = yes vfs objects = acl_xattr streams_xattr aio_pthread acl_xattr:ignore system acls = yes write cache size = 131072
Rowland Penny
2018-Feb-23 11:35 UTC
[Samba] smbcontrol reload & close-share not working like previous version
On Fri, 23 Feb 2018 13:24:19 +0200 Özkan Göksu via samba <samba at lists.samba.org> wrote:> Hello. > > I just upgrade my kernel, smbd and changed my smb.conf. > (4.14.12-1-Arch" to "4.14.19-1-lts") "samba 4.7.4-1" > But now, "reload smbd" and "close-share" can not drop connected users > to share. Because of that I have to restart smbd service for destroy > a share right now. > But it was working previous version and I don't know what is wrong > right now. As you know, restarting SMBD affects other shares. This is > dirty way to an easy job. > > > When I try to destroy a share I follow these steps: > > 1- Edit smb.conf "delete include line" > 2- Delete samba share conf (what is included) > 3- smbcontrol smbd close-shareThe syntax for 'close-share' is: smbcontrol smbd close-share 'sharename' Or smbcontrol smbd close-share '*' For all shares See 'man smbcontrol' for more info Rowland
Özkan Göksu
2018-Feb-23 12:10 UTC
[Samba] smbcontrol reload & close-share not working like previous version
Hello Rowland. I didn't write it but I know and I use like you say. But its not solve my problem. Let me show you. *This is while I'm using share:* [root at SMDEV1-no-kid ~]# smbstatus Samba version 4.7.4 PID Username Group Machine Protocol Version Encryption Signing ---------------------------------------------------------------------------------------------------------------------------------------- 2387 ozkan domain users 192.168.10.230 (ipv4:192.168.10.230:50323) SMB3_11 - partial(AES-128-CMAC) Service pid Machine Connected at Encryption Signing --------------------------------------------------------------------------------------------- ctest 2387 192.168.10.230 Fri Feb 23 03:02:31 PM 2018 +03 - - Locked files: Pid Uid DenyMode Access R/W Oplock SharePath Name Time -------------------------------------------------------------------------------------------------- 2387 90000001 DENY_NONE 0x120089 RDONLY LEASE(RWH) /clspool/ctest asdasd (2).txt Fri Feb 23 15:02:59 2018 2387 90000001 DENY_NONE 0x100081 RDONLY NONE /clspool/ctest . Fri Feb 23 15:02:52 2018 2387 90000001 DENY_NONE 0x100081 RDONLY NONE /clspool/ctest . Fri Feb 23 15:02:55 2018 2387 90000001 DENY_NONE 0x100081 RDONLY NONE /clspool/ctest . Fri Feb 23 15:02:55 2018 *This is after "*smbcontrol smbd close-share ctest*"**:* [root at SMDEV1-no-kid ~]# smbstatus Samba version 4.7.4 PID Username Group Machine Protocol Version Encryption Signing ---------------------------------------------------------------------------------------------------------------------------------------- 2387 ozkan domain users 192.168.10.230 (ipv4:192.168.10.230:50323) SMB3_11 - partial(AES-128-CMAC) Service pid Machine Connected at Encryption Signing --------------------------------------------------------------------------------------------- ctest 2387 192.168.10.230 Fri Feb 23 03:03:07 PM 2018 +03 - - Locked files: Pid Uid DenyMode Access R/W Oplock SharePath Name Time -------------------------------------------------------------------------------------------------- 2387 90000001 DENY_NONE 0x100081 RDONLY NONE /clspool/ctest . Fri Feb 23 15:03:06 2018 2387 90000001 DENY_NONE 0x100081 RDONLY NONE /clspool/ctest . Fri Feb 23 15:03:07 2018 *After these I just followed these steps.* [root at SMDEV1-no-kid ~]# smbcontrol smbd close-share ctest [root at SMDEV1-no-kid ~]# vim /etc/samba/smb.conf (delete include line) [root at SMDEV1-no-kid ~]# rm /etc/samba/shares/clspool.ctest.cifs (this was the included line) removed '/etc/samba/shares/clspool.ctest.cifs' [root at SMDEV1-no-kid ~]# systemctl reload smbd [root at SMDEV1-no-kid ~]# zfs destroy clspool/ctest umount: /clspool/ctest: target is busy. cannot unmount '/clspool/ctest': umount failed [root at SMDEV1-no-kid ~]# lsof /clspool/ctest/ COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME smbd 2387 root cwd DIR 0,52 8 34 /clspool/ctest smbd 2387 root 34r DIR 0,52 8 34 /clspool/ctest smbd 2387 root 36r DIR 0,52 8 34 /clspool/ctest *If you need anything just ask me. * Regards. *Özkan GÖKSU* | *Tekn. Geliştirme* | ozkan.goksu at usishi.com <goktug.yildirim at usishi.com> C : +90 555 449 88 71 | T : +90 (216) 442 7070 | http://www.usishi.com 2018-02-23 13:35 GMT+02:00 Rowland Penny via samba <samba at lists.samba.org>:> On Fri, 23 Feb 2018 13:24:19 +0200 > Özkan Göksu via samba <samba at lists.samba.org> wrote: > > > Hello. > > > > I just upgrade my kernel, smbd and changed my smb.conf. > > (4.14.12-1-Arch" to "4.14.19-1-lts") "samba 4.7.4-1" > > But now, "reload smbd" and "close-share" can not drop connected users > > to share. Because of that I have to restart smbd service for destroy > > a share right now. > > But it was working previous version and I don't know what is wrong > > right now. As you know, restarting SMBD affects other shares. This is > > dirty way to an easy job. > > > > > > When I try to destroy a share I follow these steps: > > > > 1- Edit smb.conf "delete include line" > > 2- Delete samba share conf (what is included) > > 3- smbcontrol smbd close-share > > The syntax for 'close-share' is: > > smbcontrol smbd close-share 'sharename' > > Or > > smbcontrol smbd close-share '*' > > For all shares > > See 'man smbcontrol' for more info > > Rowland > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >