[CentOS] CentOS 7: samba 4.10.x: smbd daemon cannot free space used from the spool temp file removed

Tue May 18 13:11:49 UTC 2021
Dario Lesca <d.lesca at solinos.it>

After a while, the /var filesystem is full because the smbd samba
daemon cannot release the space of job files removed:

To release this space I must restart the service or kill -15 the
process that already use this file.

This is the situation after some hours of work:

# lsof |grep smbprn.
smbd      10099          root   34u      REG              253,7     129691         82 /var/spool/samba/smbprn.Y44hEB (deleted)
smbd      10099          root   36u      REG              253,7     190666         72 /var/spool/samba/smbprn.Jqx29D (deleted)
smbd      10099          root   38u      REG              253,7  461718458         73 /var/spool/samba/smbprn.sY0OzI (deleted)
smbd      10099          root   41u      REG              253,7     129347         93 /var/spool/samba/smbprn.i7fjQ6 (deleted)
smbd      10099          root   42u      REG              253,7     128170         79 /var/spool/samba/smbprn.gdEDXN (deleted)
smbd      10099          root   45u      REG              253,7     229790         80 /var/spool/samba/smbprn.qjm2NL (deleted)
smbd      10099          root   46u      REG              253,7      43076         97 /var/spool/samba/smbprn.z0etcZ (deleted)
smbd      10099          root   48u      REG              253,7     129339         95 /var/spool/samba/smbprn.GHcowo (deleted)
smbd      10099          root   49u      REG              253,7     216893         98 /var/spool/samba/smbprn.2cqa6X (deleted)
smbd      10099          root   52u      REG              253,7     130143         87 /var/spool/samba/smbprn.QimHW4 (deleted)
smbd      10099          root   55u      REG              253,7      52581        100 /var/spool/samba/smbprn.snvGa3 (deleted)
smbd      10099          root   56u      REG              253,7     129623         94 /var/spool/samba/smbprn.w7L8y6 (deleted)
smbd      10099          root   68u      REG              253,7      64781         99 /var/spool/samba/smbprn.2uHnut (deleted)
smbd      10099          root   69u      REG              253,7      52581        101 /var/spool/samba/smbprn.Exeq3U (deleted)
smbd      10099          root   70u      REG              253,7      43681        106 /var/spool/samba/smbprn.REFsbL (deleted)
smbd      10099          root   71u      REG              253,7     342598        102 /var/spool/samba/smbprn.8Dka0u (deleted)
smbd      10099          root   72u      REG              253,7     222603        104 /var/spool/samba/smbprn.q6ZPY7 (deleted)
smbd      10099          root   73u      REG              253,7     221328        109 /var/spool/samba/smbprn.K2YwWA (deleted)
smbd      10099          root   74u      REG              253,7      43780        107 /var/spool/samba/smbprn.1o6uIX (deleted)
smbd      10099          root   75u      REG              253,7     221019        108 /var/spool/samba/smbprn.KeH0O3 (deleted)
smbd      10099          root   77u      REG              253,7      43315        111 /var/spool/samba/smbprn.KBL8ic (deleted)
smbd      10100          root   34u      REG              253,7     142770         77 /var/spool/samba/smbprn.s1h496 (deleted)
smbd      10100          root   35u      REG              253,7      33696         78 /var/spool/samba/smbprn.GncIKK (deleted)
smbd      10101          root   33u      REG              253,7     240900         69 /var/spool/samba/smbprn.3WQlx1 (deleted)
smbd      10101          root   34u      REG              253,7     409379         96 /var/spool/samba/smbprn.zZ5RbD (deleted)
smbd      10101          root   35u      REG              253,7     162610         67 /var/spool/samba/smbprn.ziDbOl (deleted)
smbd      10101          root   38u      REG              253,7     242494         68 /var/spool/samba/smbprn.X0YIZT (deleted)
smbd      10101          root   42u      REG              253,7     327729         70 /var/spool/samba/smbprn.ZUwcjE (deleted)
smbd      10101          root   43u      REG              253,7     429289         71 /var/spool/samba/smbprn.n5YHhG (deleted)
smbd      11962        nobody   16u      REG              253,7     123406         74 /var/spool/samba/smbprn.Wclp0q (deleted)
smbd      11962        nobody   33u      REG              253,7    2804169         86 /var/spool/samba/smbprn.BrKhuU (deleted)
smbd      11962        nobody   35u      REG              253,7      63284         75 /var/spool/samba/smbprn.Aoq7I2 (deleted)
smbd      11962        nobody   40u      REG              253,7    4814097         76 /var/spool/samba/smbprn.ZZy1rS (deleted)
smbd      11962        nobody   41u      REG              253,7      82282         88 /var/spool/samba/smbprn.rAIBil (deleted)
smbd      11962        nobody   42u      REG              253,7     602346         81 /var/spool/samba/smbprn.4ZTHAL (deleted)
smbd      11962        nobody   44u      REG              253,7   28309942         83 /var/spool/samba/smbprn.45x0K9 (deleted)
smbd      11962        nobody   45u      REG              253,7    5608461         84 /var/spool/samba/smbprn.bLuZXv (deleted)
smbd      11962        nobody   46u      REG              253,7    5603883         85 /var/spool/samba/smbprn.MIA8uL (deleted)
smbd      11962        nobody   47u      REG              253,7     129605        103 /var/spool/samba/smbprn.vv4vRt (deleted)
smbd      11962        nobody   48u      REG              253,7      82219        115 /var/spool/samba/smbprn.dHbGuR (deleted)
smbd      11962        nobody   49u      REG              253,7      65393         89 /var/spool/samba/smbprn.btj79i (deleted)
smbd      11962        nobody   50u      REG              253,7     774651         90 /var/spool/samba/smbprn.6bMjov (deleted)
smbd      11962        nobody   51u      REG              253,7     873423         91 /var/spool/samba/smbprn.qM3VjY (deleted)

The /var/spool/samba folder is empty, but the smbprn temp file still
use the space on filesystem because the file is already open, and after
a while i get a filesystem full on /var.

Is this a know issue?
There is some solution?

Many thanks

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