Bacula-users

Re: [Bacula-users] Bacula BLOCKED waiting for mount

2015-08-03 10:12:43
Subject: Re: [Bacula-users] Bacula BLOCKED waiting for mount
From: Michael Schwager <mschwager AT mochotrading DOT com>
To: Kern Sibbald <kern AT sibbald DOT com>
Date: Mon, 3 Aug 2015 08:45:38 -0500
Kern,
Thanks for the reply from The Man himself :-) .

I ran update slots, and it's true that EPW681L3 is not in the library. But that's as I planned it it: Why would it go to EPW681L3 when EPW680L3 is right there in the library? It is in the same pool, it is as full as EPW681L3 once was, it's older than the file/job retention period, but somehow Bacula chose 681 instead of 680 which is what I was expecting.

As a matter of fact, I marked all the eligible tapes as full: First I marked 681 full then Bacula chose 682. So I marked that one as full. Now 683 and beyond are younger than the file/job retention periods, so Bacula thinks it has no tapes. Meanwhile I'm pulling my hair out because I'm saying, "Bacula- 680 is *right there*!  Use it!" But no joy. Can I somehow mark a tape as usable?

Under v. 5.x, I discovered that Bacula's tape usage algorithm went something like this: "Use an eligible tape from the library." I discovered (I think) that I could use any tape that met Bacula's rewritable criteria. Now, I don't know what the algorithm is. This means it will be difficult for me to choose the proper tape to put in the library. I need to know before the weekend starts so it doesn't hang up my backups.

Also, regarding my other question: How do I make Bacula fail hard if it doesn't find the media it needs?


- Mike Schwager
  Linux Network Engineer, Mocho Trading LLC
  312-646-4783 Phone    312-637-0011 Cell    312-957-9804 Fax


On Sun, Aug 2, 2015 at 11:40 PM, Kern Sibbald <kern AT sibbald DOT com> wrote:
Hello,

Sorry you are having problems.  You did a perfect job of supplying the right information :-)

It looks like for some reason you did not have tape EPW681L3 in the autochanger the last time you did an "update slots barcodes" so the slot for that Volume is zero, which means that Bacula will not try to use it -- even though it is recycled.

Every time you remove or add a tape to the library you must subsequently manually run "update slots barcodes" so that Bacula knows what Volumes are in the library.


Best regards,
Kern

On 03.08.2015 00:43, Michael Schwager wrote:
Hello,
We are running Bacula 7.0.5 on CentOS 7.0. This weekend, one of our full stores blocked waiting on a tape. However I was trying to enjoy the nice Chicago weather and trying not to think about work, so needless to say our backup failed.

Starngely, we have another tape that SHOULD be available. Tapes in this pool are set to recycle after 90 days, and 90 days ago from today is May 4th.
​ We have a tape that was last written to on March 28. So why would Bacula block on the unavailable tape? Can I set it to fail and move on if a tape is not available? I will never be able to satisfy Bacula over the weekend- I would rather it fail than hold everything up.

Thanks. ​Here's some Bacula queries; first my client entry from bacula-dir.conf:
Client {
  Name = fscluster2-backup
...
  File Retention = 3 months
  Job Retention = 3 months
  AutoPrune = yes                     # Prune expired Jobs/Files
}


​ Here's what status jobs says:​

Device "HP_LTO-3" (/dev/nst0) is not open.
    Device is BLOCKED waiting for mount of volume "EPW681L3",
       Pool:        Tape
       Media type:  LTO-3
    Drive 0 is not loaded.
==
​ ...​

Used Volume status:
Reserved volume: EPW681L3 on tape device "HP_LTO-3" (/dev/nst0)
    Reader=0 writers=1 reserves=0 volinuse=0
====

​ But list media shows a volume in the changer which was last written to on March 28; much older than 90 days. Why didn't Bacula use it?​


*list media
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Pool: Tape
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes        | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten         |
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+
|      16 | EPW680L3   | Full      |       1 | 557,867,971,584 |      145 |    7,776,000 |       1 |    1 |         1 | LTO-3     | 2015-03-28 07:11:04 |
|      17 | EPW681L3   | Recycle   |       1 |               1 |        0 |    7,776,000 |       1 |    0 |         0 | LTO-3     | 2015-04-25 08:08:59 |
​ ...​

|      46 | EPW692L3   | Full      |       1 | 532,896,215,040 |      163 |    7,776,000 |       1 |    2 |         1 | LTO-3     | 2015-08-01 09:13:24 |
|      47 | EPW693L3   | Full      |       1 | 420,250,650,624 |      105 |    7,776,000 |       1 |    8 |         1 | LTO-3     | 2015-08-01 11:55:27 |
​ ...​

|      68 | ERX840L3   | Full      |       1 | 508,789,241,856 |      130 |    7,776,000 |       1 |    5 |         1 | LTO-3     | 2015-07-25 10:08:25 |
+---------+------------+-----------+---------+-----------------+----------+--------------+---------+------+-----------+-----------+---------------------+

*status slots
Automatically selected Storage: LTO-3
​ ...​

3306 Issuing autochanger "list" command.
 Slot |   Volume Name    |   Status  |     Media Type       |      Pool          |
------+------------------+-----------+----------------------+--------------------|
    1 |         EPW680L3 |      Full |                LTO-3 |               Tape |
    2 |         EPW692L3 |      Full |                LTO-3 |               Tape |
    3 |         EPW732L3 |    Append |                LTO-3 |           WORM-CRM |
    4 |         EPW730L3 |    Append |                LTO-3 |           WORM-CRM |
    5 |         ERX840L3 |      Full |                LTO-3 |               Tape |
    6 |         EPW733L3 |    Append |                LTO-3 |        WORM-Onsite |
    7 |         EPW729L3 |    Append |                LTO-3 |        WORM-Onsite |
    8 |         EPW693L3 |      Full |                LTO-3 |               Tape |


- Mike Schwager
  Linux Network Engineer, Mocho Trading LLC
  312-646-4783 Phone    312-637-0011 Cell    312-957-9804 Fax



This message is for the named person(s) use only. It may contain confidential proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Mocho Trading LLC reserves the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.

------------------------------------------------------------------------------


_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users



This message is for the named person(s) use only. It may contain confidential proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender. You must not, directly or indirectly use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Mocho Trading LLC reserves the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of any such entity.
------------------------------------------------------------------------------
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users