1 [label-failure.patch] IQ
2 This patch should fix the problems labeling a tape while
3 Bacula is requesting you to mount or label a new tape.
4 It should also fix problems where Bacula will not recognize
5 that a new tape is inserted or created and it keeps asking for
6 a different tape. It fixes bug #1227.
8 Apply it to 2.4.4 (possibly earlier versions) with:
11 patch -p0 <2.4.4-label-failure.patch
12 ./configure <your-options>
20 Index: src/stored/wait.c
21 ===================================================================
22 --- src/stored/wait.c (revision 8605)
23 +++ src/stored/wait.c (working copy)
26 Bacula® - The Network Backup Solution
28 - Copyright (C) 2000-2008 Free Software Foundation Europe e.V.
29 + Copyright (C) 2000-2009 Free Software Foundation Europe e.V.
31 The main author of Bacula is Kern Sibbald, with contributions from
32 many others, a complete list can be found in the file AUTHORS.
34 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
37 - Bacula® is a registered trademark of John Walker.
38 + Bacula® is a registered trademark of Kern Sibbald.
39 The licensor of Bacula is the Free Software Foundation Europe
40 (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
41 Switzerland, email:ftf@fsfeurope.org.
45 Dmsg1(dbglvl, "Enter blocked=%s\n", dev->print_blocked());
48 + * Since we want to mount a tape, make sure current one is
49 + * not marked as using this drive.
53 unmounted = is_device_unmounted(dev);
57 * Wait requested time (dev->rem_wait_sec). However, we also wake up every
58 Index: src/stored/reserve.c
59 ===================================================================
60 --- src/stored/reserve.c (revision 8605)
61 +++ src/stored/reserve.c (working copy)
63 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
66 - Bacula® is a registered trademark of John Walker.
67 + Bacula® is a registered trademark of Kern Sibbald.
68 The licensor of Bacula is the Free Software Foundation Europe
69 (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
70 Switzerland, email:ftf@fsfeurope.org.
74 Dmsg3(dbglvl, "jid=%u reserve_vol free vol=%s at %p\n", jid(), vol->vol_name, vol->vol_name);
76 - dev->set_unload(); /* have to unload current volume */
77 + /* If old Volume is still mounted, must unload it */
78 + if (strcmp(vol->vol_name, dev->VolHdr.VolumeName) == 0) {
79 + Dmsg0(50, "set_unload\n");
80 + dev->set_unload(); /* have to unload current volume */
82 + free_volume(dev); /* Release old volume entry */
83 debug_list_volumes("reserve_vol free");