[Samba] Samba 4.10.x on centos7: smbd daemon it does not free the disk space used by the temporary files of shared printers

Dario Lesca d.lesca at solinos.it
Fri May 21 12:57:11 UTC 2021


Il giorno mer, 19/05/2021 alle 10.28 +0200, Dario Lesca via samba ha
scritto:
> There is some suggest to debug why the temp spool file is removed but
> not closed?
> 
> Many thanks
> 

I have investigate with cups log and inotifywait command and I have
generate this log:

[root at server ~]# tail -f /var/log/cups/access_log &
[root at server ~]# 
[root at server ~]# inotifywait --monitor /var/spool/samba
Setting up watches.
Watches established.
/var/spool/samba/ CREATE smbprn.arQ3mW
/var/spool/samba/ OPEN smbprn.arQ3mW
/var/spool/samba/ MODIFY smbprn.arQ3mW
/var/spool/samba/ ATTRIB smbprn.arQ3mW
/var/spool/samba/ MODIFY smbprn.arQ3mW
/var/spool/samba/ MODIFY smbprn.arQ3mW
/var/spool/samba/ MODIFY smbprn.arQ3mW
/var/spool/samba/ MODIFY smbprn.arQ3mW
/var/spool/samba/ OPEN smbprn.arQ3mW
/var/spool/samba/ ACCESS smbprn.arQ3mW
localhost - - [21/May/2021:14:37:45 +0200] "POST /printers/las2x HTTP/1.1" 200 37067 Print-Job successful-ok
/var/spool/samba/ CLOSE_NOWRITE,CLOSE smbprn.arQ3mW
/var/spool/samba/ DELETE smbprn.arQ3mW
/var/spool/samba/ OPEN,ISDIR 
/var/spool/samba/ CLOSE_NOWRITE,CLOSE,ISDIR 
/var/spool/samba/ OPEN,ISDIR 
/var/spool/samba/ CLOSE_NOWRITE,CLOSE,ISDIR 
^C
[root at server ~]# lsof |grep smbprn.arQ3mW
smbd      12915          root   97u      REG              253,7      36770     191650 /var/spool/samba/smbprn.arQ3mW (deleted)
[root at server ~]# ls -l /var/spool/samba/smbprn.arQ3mW
ls: cannot access /var/spool/samba/smbprn.arQ3mW: No such file or directory

Like you see, when the job is send to samba from windows, smbd daemon
create a temp file, modify it, passed to cups to print and removed.

But if I monitor the process via lsof, the temp file is still opened
from smbd daemon also it's removed from disk.

Someone can suggest to me some other test to try to know what's up?

Many thanks
  
-- 
Dario Lesca
(inviato dal mio Linux Fedora 33 Workstation)




More information about the samba mailing list