From 8f0a4eb1b804ec037f5ad46e5b1ce43493f0bf41 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 16 Jul 2009 13:03:53 +0000 Subject: [PATCH] Fix #1323 about a problem when mounting a requested volume during a restore. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@9025 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/stored/acquire.c | 11 +++++++++++ bacula/src/stored/dircmd.c | 5 +++-- bacula/technotes | 3 +++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/bacula/src/stored/acquire.c b/bacula/src/stored/acquire.c index 50e767b611..b2bf07e29d 100644 --- a/bacula/src/stored/acquire.c +++ b/bacula/src/stored/acquire.c @@ -286,7 +286,18 @@ default_path: if (!dir_ask_sysop_to_mount_volume(dcr, ST_READ)) { goto get_out; /* error return */ } + + /* Volume info is always needed because of VolParts */ + Dmsg1(150, "dir_get_volume_info vol=%s\n", dcr->VolumeName); + if (!dir_get_volume_info(dcr, GET_VOL_INFO_FOR_READ)) { + Dmsg2(150, "dir_get_vol_info failed for vol=%s: %s\n", + dcr->VolumeName, jcr->errmsg); + Jmsg1(jcr, M_WARNING, 0, "Read acquire: %s", jcr->errmsg); + } + dev->set_load(); /* set to load volume */ + try_autochanger = true; /* permit trying the autochanger again */ + continue; /* try reading again */ } /* end switch */ break; diff --git a/bacula/src/stored/dircmd.c b/bacula/src/stored/dircmd.c index 19374afddf..3e1e613c6f 100644 --- a/bacula/src/stored/dircmd.c +++ b/bacula/src/stored/dircmd.c @@ -660,8 +660,9 @@ static bool mount_cmd(JCR *jcr) /* Someone is waiting, wake him */ Dmsg0(100, "Waiting for mount. Attempting to wake thread\n"); dev->set_blocked(BST_MOUNT); - dir->fsend("3001 OK mount. Device=%s\n", - dev->print_name()); + dir->fsend("3001 OK mount requested. %sDevice=%s\n", + slot>0?_("Specified slot ignored. "):"", + dev->print_name()); pthread_cond_broadcast(&dev->wait_next_vol); Dmsg1(100, "JobId=%u broadcast wait_device_release\n", (uint32_t)dcr->jcr->JobId); pthread_cond_broadcast(&wait_device_release); diff --git a/bacula/technotes b/bacula/technotes index e25e9a4758..59fd42acfd 100644 --- a/bacula/technotes +++ b/bacula/technotes @@ -2,6 +2,9 @@ General: +16Jul09 +ebl Fix #1323 about a problem when mounting a requested volume + during a restore. 15Jul09 kes Make CONF::init header and .c file agree about types. Reported by "Eli Shemer" -- 2.39.5