SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
director fails to find usable volume to append or recycle: b
Author Message
Post director fails to find usable volume to append or recycle: b 
Dear list,

I'm struggling to finish my last round of backups with Bacula 2.4.4,
which I care to do before migrating to the latest version. My problem is
simple to describe: with one of my (multiple, and otherwise working)
media pools, the director fails to find a usable volume for use with a
backup job (thus prompting for the labeling of a new one, which I really
want to avoid).

I've spent the evening going through debug output and part of the source
in src/dird/next_vol.c and src/cats/sql_find.c. Here is what seems like
the part relevant to the problem of what I'm witnessing in the director
debug output when I ask to run a job:

Washington-dir: sql_find.c:323-0 fnextvol=SELECT
MediaId,VolumeName,<snip> FROM Media WHERE PoolId=5 AND MediaType='LTO2
Ultrium' AND Enabled=1 AND VolStatus='Append' ORDER BY LastWritten IS
NULL,LastWritten DESC,MediaId LIMIT 1
Washington-dir: sql_find.c:331-0 item=1 got=0

'got=0' means the query returned 0 rows. But copying and pasting the
exact same query in fact returns the expected result of the tape I'm
expecting. I can only wildly speculate about what could cause numrows or
sql_num_rows(mdb)'s return value to not reflect the fact that there is
in fact a result returned by the query.

I've compared my sources to the latest branch in the git repository, but
my coding skills are basic and nothing strikes me as being the obvious
fix I could just patch in to finish the job. I would be grateful if a
person more familiar with Bacula code could point me in a direction to
try and get db_find_next_volume to play nice.

Regards,

Lucas

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Post director fails to find usable volume to append or recycle: b 
On Wed, 21 Mar 2012 23:01:02 +0100, Lucas B Cohen said:

Dear list,

I'm struggling to finish my last round of backups with Bacula 2.4.4,
which I care to do before migrating to the latest version. My problem is
simple to describe: with one of my (multiple, and otherwise working)
media pools, the director fails to find a usable volume for use with a
backup job (thus prompting for the labeling of a new one, which I really
want to avoid).

I've spent the evening going through debug output and part of the source
in src/dird/next_vol.c and src/cats/sql_find.c. Here is what seems like
the part relevant to the problem of what I'm witnessing in the director
debug output when I ask to run a job:

Washington-dir: sql_find.c:323-0 fnextvol=SELECT
MediaId,VolumeName,<snip> FROM Media WHERE PoolId=5 AND MediaType='LTO2
Ultrium' AND Enabled=1 AND VolStatus='Append' ORDER BY LastWritten IS
NULL,LastWritten DESC,MediaId LIMIT 1
Washington-dir: sql_find.c:331-0 item=1 got=0

'got=0' means the query returned 0 rows. But copying and pasting the
exact same query in fact returns the expected result of the tape I'm
expecting. I can only wildly speculate about what could cause numrows or
sql_num_rows(mdb)'s return value to not reflect the fact that there is
in fact a result returned by the query.

Seems very strange. Is it repeatable, i.e. does the backup still fail to find
a volume after your manual query has returned that volume?

__Martin

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Post director fails to find usable volume to append or recycle: b 
On 2012.03.22 13:12, Martin Simmons wrote:
On Wed, 21 Mar 2012 23:01:02 +0100, Lucas B Cohen said:

with one of my (multiple, and otherwise working)
media pools, the director fails to find a usable volume for use with a
backup job

Washington-dir: sql_find.c:323-0 fnextvol=SELECT
MediaId,VolumeName,<snip> FROM Media WHERE PoolId=5 AND MediaType='LTO2
Ultrium' AND Enabled=1 AND VolStatus='Append' ORDER BY LastWritten IS
NULL,LastWritten DESC,MediaId LIMIT 1
Washington-dir: sql_find.c:331-0 item=1 got=0

'got=0' means the query returned 0 rows. But copying and pasting the
exact same query in fact returns the expected result of the tape I'm
expecting

Seems very strange. Is it repeatable, i.e. does the backup still fail to find
a volume after your manual query has returned that volume?

Absolutely. Restarting storage and director daemons doesn't help either.

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Post director fails to find usable volume to append or recycle: b 
On Thu, 22 Mar 2012 13:24:30 +0100, Lucas B Cohen said:

On 2012.03.22 13:12, Martin Simmons wrote:
On Wed, 21 Mar 2012 23:01:02 +0100, Lucas B Cohen said:

with one of my (multiple, and otherwise working)
media pools, the director fails to find a usable volume for use with a
backup job

Washington-dir: sql_find.c:323-0 fnextvol=SELECT
MediaId,VolumeName,<snip> FROM Media WHERE PoolId=5 AND MediaType='LTO2
Ultrium' AND Enabled=1 AND VolStatus='Append' ORDER BY LastWritten IS
NULL,LastWritten DESC,MediaId LIMIT 1
Washington-dir: sql_find.c:331-0 item=1 got=0

'got=0' means the query returned 0 rows. But copying and pasting the
exact same query in fact returns the expected result of the tape I'm
expecting

Seems very strange. Is it repeatable, i.e. does the backup still fail to find
a volume after your manual query has returned that volume?

Absolutely. Restarting storage and director daemons doesn't help either.

Which database backend are you using?

I can think of three possible causes.

1. Bug in the database.
2. Bug in Bacula.
3. Bacula's query is somehow different from yours.

__Martin

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Bacula-users mailing list
Bacula-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB