[Samba] smbcontrol reload & close-share not working like previous version
Özkan Göksu
ozkan.goksu at usishi.com
Fri Feb 23 12:10:08 UTC 2018
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
>
More information about the samba
mailing list