1 Index: src/dird/next_vol.c
2 ===================================================================
3 --- src/dird/next_vol.c (revision 7259)
4 +++ src/dird/next_vol.c (working copy)
8 Dmsg0(150, "Call prune_volumes\n");
9 - prune_volumes(jcr, InChanger, mr);
10 + ok = prune_volumes(jcr, InChanger, mr);
12 - ok = recycle_oldest_purged_volume(jcr, InChanger, mr);
13 - if (!ok && create) {
14 - Dmsg4(050, "after prune volumes_vol ok=%d index=%d InChanger=%d Vstat=%s\n",
15 - ok, index, InChanger, mr->VolStatus);
17 - * 5. Try pulling a volume from the Scratch pool
19 - ok = get_scratch_volume(jcr, InChanger, mr);
22 - * If we are using an Autochanger and have not found
23 - * a volume, retry looking for any volume.
28 - continue; /* retry again accepting any volume */
33 + ok = recycle_oldest_purged_volume(jcr, InChanger, mr);
34 + if (!ok && create) {
35 + Dmsg4(050, "after prune volumes_vol ok=%d index=%d InChanger=%d Vstat=%s\n",
36 + ok, index, InChanger, mr->VolStatus);
38 + * 5. Try pulling a volume from the Scratch pool
40 + ok = get_scratch_volume(jcr, InChanger, mr);
41 + Dmsg4(050, "after get scratch volume ok=%d index=%d InChanger=%d Vstat=%s\n",
42 + ok, index, InChanger, mr->VolStatus);
45 + * If we are using an Autochanger and have not found
46 + * a volume, retry looking for any volume.
48 + if (!ok && InChanger) {
50 + continue; /* retry again accepting any volume */
57 Index: src/dird/autoprune.c
58 ===================================================================
59 --- src/dird/autoprune.c (revision 7259)
60 +++ src/dird/autoprune.c (working copy)
62 prune_list.num_ids = 0; /* reset count */
64 ok = is_volume_purged(ua, &lmr);
67 + * Check if this volume is available (InChanger + StorageId)
68 + * If not, just skip this volume and try the next one
70 + if (ok && InChanger) {
71 + if (!lmr.InChanger || (lmr.StorageId != mr->StorageId)) {
72 + ok = false; /* skip this volume, ie not loadable */
77 * If purged and not moved to another Pool,
78 * then we stop pruning and take this volume.