Question : Can you load-balance a set of printers in samba?

We are having to deal with slow printing from an old dot matrix printer through samba 3 on linux. With four people printing forms for our customers on it, they are all waiting on each other.

If we were to get a second dot matrix, and I install it the same way in samba, is there a way to configure it to print round-robin style, or perhaps print it to whichever printer has the least load.

Basically we want to make it where there is only 1 printer to choose from for the users in windows... but then have samba load-balance the print jobs across multiple printers from that one pseudo-printer.

Can this be done?

Answer : Can you load-balance a set of printers in samba?

Well I solved my own question again. It's called a printer pool, and here's how to do it:



1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
Install both printers on CUPS (as root): (example below)

#  lpadmin -p <printer1> -E -v socket://<printerIP>:9100 -P /path/to/PPD-file
#  lpadmin -p <printer2> -E -v socket://<printerIP>:9100 -P /path/to/PPD-file

Create a CUPS class for the 2 printers:

#  lpadmin -p <printer1> -c printer_class_name
#  lpadmin -p <printer2> -c printer_class_name

Put a share for this class manually into smb.conf:

#  [printer_class_name]
#     comment = CUPS-"class" of printers
#     browseable = yes
#     printable = yes
#     public = yes
#     read only = yes
#     create mode = 0700
#     directory = /tmp

Restart smbd.

You should now be able to "see" the class now like a normal printer in the network neighbourhood. You can't directly download a driver for it from the CUPS server (as with normal printers). You need to install a driver through one of the other means. If you print to this printer class, the jobs get alternately printed by one of the members (round-robin) as long as they are both alive. If one is down, the other does the whole lot. Works also with bigger classes.

(excerpt from http://lists.samba.org/archive/samba/2002-February/037322.html )
Random Solutions  
 
programming4us programming4us