[Samba-it] Samba print problem when folder spool is a dedicated mounted filesystem: when smbprn.xxxxx temp file is removed do not free space (is still open?)

Dario Lesca d.lesca at solinos.it
Wed Feb 16 13:13:27 UTC 2022


Ciao a tutti, ho postato il seguente messaggio sulla ML internazionale.

Credo che non riceverò risposte su quella ML, visto che è una
combinazione alquanto rara (cartella di spool delle stampanti
posizionata in un filesystem dedicato)

Tuttavia anche usando strace non sono riuscito a capire come mail i job
rimossi rimangono appesi come se fossero ancora aperti dal processo
smbd

Qualcuno di voi sa dirmi qualcosa a riguardo?

Grazie in anticipo.
Dario

------- Messaggio inoltrato -------
Da: Dario Lesca via samba <samba at lists.samba.org>
Rispondi a: Dario Lesca <d.lesca at solinos.it>
A: Samba List <samba at lists.samba.org>
Oggetto: [Samba] Samba print problem when folder spool is a dedicated
mounted filesystem: when smbprn.xxxxx temp file is removed do not free
space (is still open?)
Data: Wed, 16 Feb 2022 11:20:09 +0100

Due to a particular and random windows printer driver problem that
generate huge spool jobs file, I have converted the /var/spool/samba
folder into a dedicate filesystem mounted on it, to mitigate a /var
filesystem full when some times the printer windows driver goes crazy.

But in this case, the samba temp spool file (smbprn.slBOAV) it is
removed when it is still open and the space is not freed:

[root at rocky8 ~]# df /var/spool/samba
File system               1K-blocchi Usati Disponib. Uso% Montato su
/dev/mapper/rl-spoolsamba    2086912 47612   2039300   3%
/var/spool/samba

[root at rocky8 ~]# lsof /var/spool/samba;ls -ltr /var/spool/samba/* -d
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
smbd    1676 root  cwd    DIR  253,3       17  128 /var/spool/samba
smbd    1676 root   14u   REG  253,3       23  132
/var/spool/samba/smbprn.slBOAV (deleted)
smbd    1676 root   51u   REG  253,3       23  133
/var/spool/samba/smbprn.UQmo5T (deleted)
drwxrwxrwx. 2 root root 6 15 feb 04.22 /var/spool/samba/tmp

Only when the windows client (or smbclient) connection is closed this
space set free.

If I unmount the filesystem and I retry print on same printer all work
fine and the space is immediately set free.

For test I have use a dumb printer, but the problem occur whit all
printers and printing= setting type (CUPS or sysv)

[testprint]
        comment = Printer with Restricted Access
        path = /var/spool/samba/
        browseable = yes
        printable = yes
        writable = no
        guest ok = yes
        printing = sysv
        print command = mkdir -p -m777 /tmp/print.d/; echo Printing %s
>> /tmp/print.d/print.log; cp %s /tmp/print.d/;rm %s

If I use the default path=/tmp setting all work fine.

The problem occur when the path= setting point to a filesystem or to
subdir of this filesystem (es: /var/spool/samba/tmp)

Is this a know issue or is a my misconfiguration?

Many thanks.

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



-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/samba-it/attachments/20220216/dc1f06ea/attachment.htm>


More information about the samba-it mailing list