From: Eric Bollengier Date: Thu, 16 Jul 2009 13:03:53 +0000 (+0000) Subject: Fix #1323 about a problem when mounting a requested volume during a restore. X-Git-Tag: Release-3.0.2~41 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c86ed18dcef2e2add8beb6bbd3abbc77581205d5;p=bacula%2Fbacula 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 --- 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"