Bacula-users

Re: [Bacula-users] Autochanger problem

2009-10-28 10:01:21
Subject: Re: [Bacula-users] Autochanger problem
From: Oddbjørn Sjøgren <bjorn AT yaymicro DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Wed, 28 Oct 2009 14:55:55 +0100
Hi Allen

The autochanger has now been restarted and I managed to unload the drive. I have also set up a tunnel that allows me to use the web interface with the autochanger. I also ran the inventory command and the 
update slots command in bconsole with no errors. Now for the labeling. I'm having a problem because as soon as I got one volume labeled I think Bacula started a backup job on this tape and now I can't access the drive. Is there any way to terminate bacula make it wait until I'm finished? (BTW,  I believe I managed one label command, the ARS670, that you will see belove. It is also being written to as you can see).

Also, it seems from my web-interface that only a few of my tapes have bar codes. Is there a fast way to label all of them, and update the pool accordingly? Right now the pool seems to have volumes that refers to the old tapes (before the change). Is this correct? Also. The VolumName in the Pool, is it supposed to match the VolumeTag that I see from mtx status? Is this what Label does? Or is the VolumeTag something else?

Here is the mtx status and the list volumes right now:
*list volumes
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
Pool: Default
+---------+------------+-----------+---------+--------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName | VolStatus | Enabled | VolBytes     | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten         |
+---------+------------+-----------+---------+--------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| 2       | ARS662L3   | Purged    | 1       | 426744686592 | 429      | 5616000      | 1       | 4    | 0         | LTO-3     | 2009-08-17 08:51:08 |
| 3       | ARS663L3   | Purged    | 1       | 428235236352 | 430      | 5616000      | 1       | 5    | 0         | LTO-3     | 2009-08-17 14:31:57 |
| 4       | ARS641L3   | Purged    | 1       | 432729335808 | 435      | 5616000      | 1       | 6    | 0         | LTO-3     | 2009-08-17 21:33:49 |
| 5       | ARS643L3   | Purged    | 1       | 422731588608 | 424      | 5616000      | 1       | 7    | 0         | LTO-3     | 2009-08-18 06:56:00 |
| 6       | ARS642L3   | Purged    | 1       | 411474180096 | 412      | 5616000      | 1       | 8    | 0         | LTO-3     | 2009-08-18 15:16:25 |
| 7       | ARS644L3   | Purged    | 1       | 416515663872 | 417      | 5616000      | 1       | 9    | 0         | LTO-3     | 2009-08-18 18:02:38 |
| 8       | ARS645L3   | Full      | 1       | 414861705216 | 416      | 5616000      | 1       | 23   | 1         | LTO-3     | 2009-10-26 22:08:10 |
| 10      | ARS651L3   | Purged    | 1       | 444871526400 | 451      | 5616000      | 1       | 12   | 0         | LTO-3     | 2009-07-06 07:22:17 |
| 11      | ARS652L3   | Purged    | 1       | 413624300544 | 414      | 5616000      | 1       | 13   | 0         | LTO-3     | 2009-07-06 13:58:16 |
| 12      | ARS653L3   | Purged    | 1       | 417378898944 | 418      | 5616000      | 1       | 14   | 0         | LTO-3     | 2009-07-06 16:46:15 |
| 13      | ARS648L3   | Purged    | 1       | 485302228992 | 501      | 5616000      | 1       | 15   | 0         | LTO-3     | 2009-07-19 00:08:58 |
| 14      | ARS649L3   | Purged    | 1       | 456562132992 | 469      | 5616000      | 1       | 16   | 0         | LTO-3     | 2009-07-27 01:36:05 |
| 15      | ARS650L3   | Purged    | 1       | 449315371008 | 457      | 5616000      | 1       | 17   | 0         | LTO-3     | 2009-08-03 04:57:44 |
| 16      | ARS657L3   | Purged    | 1       | 410973760512 | 412      | 5616000      | 1       | 18   | 0         | LTO-3     | 2009-08-03 13:35:30 |
| 17      | ARS658L3   | Purged    | 1       | 416524631040 | 417      | 5616000      | 1       | 19   | 0         | LTO-3     | 2009-08-03 16:22:01 |
| 18      | ARS647L3   | Purged    | 1       | 418602885120 | 419      | 5616000      | 1       | 21   | 0         | LTO-3     | 2009-08-03 19:10:44 |
| 19      | ARS660L3   | Purged    | 1       | 418480634880 | 419      | 5616000      | 1       | 22   | 0         | LTO-3     | 2009-08-03 21:57:32 |
| 20      | ARS656L3   | Purged    | 1       | 416933766144 | 417      | 5616000      | 1       | 23   | 0         | LTO-3     | 2009-08-04 00:41:54 |
| 21      | ARS640L3   | Purged    | 1       | 417385543680 | 418      | 5616000      | 1       | 20   | 0         | LTO-3     | 2009-08-04 03:29:44 |
| 22      | ARS659L3   | Purged    | 1       | 420115949568 | 421      | 5616000      | 1       | 2    | 0         | LTO-3     | 2009-08-05 13:19:12 |
| 23      | ARS661L3   | Purged    | 1       | 431643018240 | 433      | 5616000      | 1       | 3    | 0         | LTO-3     | 2009-08-17 02:27:36 |
| 24      | ARS0009    | Append    | 1       | 0            | 0        | 5616000      | 1       | 11   | 0         | LTO-3     | 0                   |
| 25      | ARS670     | Append    | 1       | 55996416000  | 56       | 172800       | 1       | 2    | 1         | LTO-3     | 2009-10-28 13:44:27 |
+---------+------------+-----------+---------+--------------+----------+--------------+---------+------+-----------+-----------+---------------------+

# mtx status
  Storage Changer /dev/changer:1 Drives, 24 Slots ( 1 Import/Export )
Data Transfer Element 0:Full (Storage Element 2 Loaded)
      Storage Element 1:Full :VolumeTag=ARS664L3
      Storage Element 2:Empty
      Storage Element 3:Full
      Storage Element 4:Full
      Storage Element 5:Full
      Storage Element 6:Full
      Storage Element 7:Full
      Storage Element 8:Full
      Storage Element 9:Full
      Storage Element 10:Full :VolumeTag=ARS654L3
      Storage Element 11:Full
      Storage Element 12:Full
      Storage Element 13:Full
      Storage Element 14:Full
      Storage Element 15:Full
      Storage Element 16:Full
      Storage Element 17:Full
      Storage Element 18:Full
      Storage Element 19:Full
      Storage Element 20:Full
      Storage Element 21:Full
      Storage Element 22:Full
      Storage Element 23:Full :VolumeTag=ARS645L3
      Storage Element 24 IMPORT/EXPORT:Full :VolumeTag=ARS655L3



On Mon, Oct 26, 2009 at 11:14 PM, Allan Black <Allan.Black AT btconnect DOT com> wrote:
Oddbjørn Sjøgren wrote:
> They are using a LTO-3 autochanger and recently changed the tapes in it
> Data Transfer Element 0:Full (Unknown Storage Element Loaded):VolumeTag
> = ARS645L3
>       Storage Element 1:Full :VolumeTag=ARS664L3
>       Storage Element 2:Full
[etc. - all the slots, and the drive, are occupied?]

It looks as if they have changed the tapes and filled up all the slots while
there was a tape in the drive.

Data Transfer Element = tape drive
Storage Element = slot

Assuming I am right, they now have the drive full, but no free slots in the
autochanger. You're not allowed to do that. If the drive is occupied, there
must be at least one free slot so that the drive can be unloaded into it,
before the next tape is loaded into the drive.

It also looks as if the autochanger has a barcode reader, but the inventory
hasn't been updated since the tapes were changed (some autochangers will
automatically inventory themselves; some won't).

First thing to do is free up at least one slot. Take a tape out by hand if
you have to, but taking the one out of the import/export slot will probably
be easiest if removing that particular tape would be OK.

Then unload the drive into the empty slot (mtx -f <changer> unload <slot> 0)
or use the autoloader's front panel or admin interface to do it.

Then inventory the autoloader (mtx -f <changer> inventory) or panel. Use the
mtx status command to check it.

Then update the Bacula database with the state of the autochanger. Use the
bconsole "update" command. Something like "update slots storage=<name>"
should do.

Then try to label a tape, run a backup, etc.

>>From the messages in your email, it looks as if Bacula has already unmounted
the drive, but it's difficult to tell.

Allan

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users