Bacula-users

[Bacula-users] Bacula trying to load tape that was removed:Re: newbie - problem labeling / adding tapes to pool

2012-09-26 18:31:26
Subject: [Bacula-users] Bacula trying to load tape that was removed:Re: newbie - problem labeling / adding tapes to pool
From: Simon Tyler <simon AT tpmcomm DOT com>
To: Dan Langille <dan AT langille DOT org>
Date: Wed, 26 Sep 2012 18:20:25 -0400
Hello,

I am still unable to label the tapes correctly. I'm thinking about just deleting bacula and reinstalling from scratch.

At this time, I have sort of a new problem. We removed some tapes that had a full backup for off site storage. The backup jobs were running successfully, however some tapes are filled and it's looking for a tape that's off site.

I see this message:
26-Sep 17:51 pmappp01.tpmcomm.com-sd JobId 92: Please mount Volume "TPMBU003" or label a new one for:
    Job:          vmappp03_incremental.2012-09-22_23.05.00_32
    Storage:      "HP-0" (/dev/nst0)
    Pool:         Default
    Media type:   LTO-4


I don't really want to get the offsite tape, I want to use tapes that we have. How can I tell bacula to use an existing tape?

*list media
Pool: Default
+---------+----------------------+-----------+---------+-------------------+----------+--------------+---------+------+-----------+-----------+---------------------+
| MediaId | VolumeName           | VolStatus | Enabled | VolBytes          | VolFiles | VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten         |
+---------+----------------------+-----------+---------+-------------------+----------+--------------+---------+------+-----------+-----------+---------------------+
|       2 | vmappp03_backup_test | Append    |       1 |         1,856,797 |        0 |   31,536,000 |       1 |    0 |         0 | File      | 2012-09-04 23:05:07 |
|       3 | TPMBU002             | Full      |       1 | 1,068,231,628,800 |      225 |   31,536,000 |       1 |    0 |         0 | LTO-4     | 2012-09-11 01:39:03 |
|       4 | TPMBU001             | Full      |       1 | 1,049,130,141,696 |      215 |   31,536,000 |       1 |    3 |         1 | LTO-4     | 2012-09-12 10:54:09 |
|       5 | TPMBU005             | Full      |       1 | 1,043,453,666,304 |      211 |   31,536,000 |       1 |    4 |         1 | LTO-4     | 2012-09-13 14:46:19 |
|       6 | TPMBU007             | Full      |       1 | 1,043,761,388,544 |      212 |   31,536,000 |       1 |    5 |         1 | LTO-4     | 2012-09-19 07:45:26 |
|       7 | TPMBU003             | Append    |       1 |   657,220,709,376 |      132 |   31,536,000 |       1 |    0 |         0 | LTO-4     | 2012-09-16 08:30:12 |
|       8 | TPMBU011             | Append    |       1 |            64,512 |        0 |   31,536,000 |       1 |    0 |         0 | LTO-4     | 0000-00-00 00:00:00 |
|       9 | TPMBU009             | Append    |       1 |            64,512 |        0 |   31,536,000 |       1 |    0 |         0 | LTO-4     | 0000-00-00 00:00:00 |
|      10 | TPMBU014             | Append    |       1 |            64,512 |        0 |   31,536,000 |       1 |    0 |         0 | LTO-4     | 0000-00-00 00:00:00 |
|      11 | TPMBU015             | Full      |       1 | 1,046,545,274,880 |      218 |   31,536,000 |       1 |    6 |         1 | LTO-4     | 2012-09-25 03:23:05 |
+---------+----------------------+-----------+---------+-------------------+----------+--------------+---------+------+-----------+-----------+---------------------+

>>From the list above, tapes marked "Append" that are actually in the changer are TPMBU011, TPMBU009, TPMBU014, so it appears that these tapes show when I "list media" but they do NOT show when I do a "status slots storage"

Does anyone have any suggestions? Otherwise, here is the point I blow everything away and start over,

Thanks 

On Fri, Sep 21, 2012 at 11:53 AM, Simon Tyler <simon AT tpmcomm DOT com> wrote:
Hi everyone,

I thought I would try to relabel tapes again when I had a chance to work without interruption, but I ran into much the same results.

Here is the short version:

- I checked that no jobs were running
- I did an unmount
- I did a: status slots storage
- I tried: label barcodes, but this only gave me the option to label the tapes that were already listed by the status above.
- I tried: update slots scan, and each tape was loaded, and Catalog record updated, except for one tape in slot 2
- I did: status slots storage, but the status was the same as before, with only half the tapes listed
-I tried: update slots, but again only half the tapes were listed.

Is there a good way to blow out everything and start over, just wipe out my Catalog, wipe all my tapes and try again?

details for the above steps are below if that's helpful.

Thanks,
=====================
trying to relabel tapes again:

I did an unmount (slot 6)

*status slots storage

The defined Storage resources are:
     1: File
     2: HP Autoloader
Select Storage resource (1-2): 2
Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3306 Issuing autochanger "slots" command.
Device "HP-0" has 8 slots.
Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3306 Issuing autochanger "list" command.
 Slot |   Volume Name    |   Status  |     Media Type       |      Pool          |
------+------------------+-----------+----------------------+--------------------|
    1*|                  |         ? |                    ? |                  ? |
    2*|                  |         ? |                    ? |                  ? |
    3 |         TPMBU001 |      Full |                LTO-4 |            Default |
    4 |         TPMBU005 |      Full |                LTO-4 |            Default |
    5 |         TPMBU007 |      Full |                LTO-4 |            Default |

    6 |         TPMBU015 |    Append |                LTO-4 |            Default |
    7*|                  |         ? |                    ? |                  ? |
    8*|                  |         ? |                    ? |                  ? |

I tried a: label barcodes, but this only gave me the option to label the tapes that are already listed above. So, I tried an: update slots scan

*update slots scan

The defined Storage resources are:
     1: File
     2: HP Autoloader
Select Storage resource (1-2): 2
Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3306 Issuing autochanger "slots" command.
Device "HP-0" has 8 slots.
Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3306 Issuing autochanger "list" command.
Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3301 Issuing autochanger "loaded? drive 0" command.
3302 Autochanger "loaded? drive 0", result: nothing loaded.
3304 Issuing autochanger "load slot 1, drive 0" command.
3305 Autochanger "load slot 1, drive 0", status is OK.
3001 Volume=TPMBU011 Slot=1
Catalog record for Volume "TPMBU011" updated to reference slot 1.

Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3307 Issuing autochanger "unload slot 1, drive 0" command.
3304 Issuing autochanger "load slot 2, drive 0" command.
3305 Autochanger "load slot 2, drive 0", status is OK.
3001 Volume=test Slot=2
Volume "test" not found in catalog. Slot=2 InChanger set to zero.

Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3307 Issuing autochanger "unload slot 2, drive 0" command.
3304 Issuing autochanger "load slot 3, drive 0" command.
3305 Autochanger "load slot 3, drive 0", status is OK.
3001 Volume=TPMBU001 Slot=3
Catalog record for Volume "TPMBU001" updated to reference slot 3.

Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3307 Issuing autochanger "unload slot 3, drive 0" command.
3304 Issuing autochanger "load slot 4, drive 0" command.
3305 Autochanger "load slot 4, drive 0", status is OK.
3001 Volume=TPMBU005 Slot=4
Catalog record for Volume "TPMBU005" updated to reference slot 4.

Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3307 Issuing autochanger "unload slot 4, drive 0" command.
3304 Issuing autochanger "load slot 5, drive 0" command.
3305 Autochanger "load slot 5, drive 0", status is OK.
3001 Volume=TPMBU007 Slot=5
Catalog record for Volume "TPMBU007" updated to reference slot 5.

Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3307 Issuing autochanger "unload slot 5, drive 0" command.
3304 Issuing autochanger "load slot 6, drive 0" command.
3305 Autochanger "load slot 6, drive 0", status is OK.
3001 Volume=TPMBU015 Slot=6
Catalog record for Volume "TPMBU015" updated to reference slot 6.

Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3307 Issuing autochanger "unload slot 6, drive 0" command.
3304 Issuing autochanger "load slot 7, drive 0" command.
3305 Autochanger "load slot 7, drive 0", status is OK.
3001 Volume=TPMBU009 Slot=7
Catalog record for Volume "TPMBU009" updated to reference slot 7.

Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3307 Issuing autochanger "unload slot 7, drive 0" command.
3304 Issuing autochanger "load slot 8, drive 0" command.
3305 Autochanger "load slot 8, drive 0", status is OK.
3001 Volume=TPMBU014 Slot=8
Catalog record for Volume "TPMBU014" updated to reference slot 8.
*status slots storage

The defined Storage resources are:
     1: File
     2: HP Autoloader
Select Storage resource (1-2): 2
Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3306 Issuing autochanger "slots" command.
Device "HP-0" has 8 slots.
Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3306 Issuing autochanger "list" command.
 Slot |   Volume Name    |   Status  |     Media Type       |      Pool          |
------+------------------+-----------+----------------------+--------------------|
    1*|                  |         ? |                    ? |                  ? |
    2*|                  |         ? |                    ? |                  ? |
    3 |         TPMBU001 |      Full |                LTO-4 |            Default |
    4 |         TPMBU005 |      Full |                LTO-4 |            Default |
    5 |         TPMBU007 |      Full |                LTO-4 |            Default |

    6 |         TPMBU015 |    Append |                LTO-4 |            Default |
    7*|                  |         ? |                    ? |                  ? |
    8*|                  |         ? |                    ? |                  ? |
*
*update slots

The defined Storage resources are:
     1: File
     2: HP Autoloader
Select Storage resource (1-2): 2
Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3306 Issuing autochanger "slots" command.
Device "HP-0" has 8 slots.
Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3306 Issuing autochanger "list" command.
Catalog record for Volume "TPMBU001" updated to reference slot 3.
Catalog record for Volume "TPMBU005" updated to reference slot 4.
Catalog record for Volume "TPMBU007" updated to reference slot 5.
Catalog record for Volume "TPMBU015" updated to reference slot 6.




On Mon, Sep 17, 2012 at 7:02 PM, Simon Tyler <simon AT tpmcomm DOT com> wrote:
Hi Dan,

This worked but apparently for only one of the tapes. I took 2 tapes out to go to offsite storage, and put in 2 tapes that were previously used but only one of them is recognized. I feel as if I'm missing something obvious, and again I'm new to this but I tried multiple times with the other tapes and didn't seem to be getting anywhere.

I made sure that the tape from slot 2 was in the drive, bacula was stopped, I erased the tape as per your instructions, started up bacula and tried to unmount the tape, update slots, label barcodes, but these commands appear to ignore the mystery slots. There was no particular error message generated during most of these commands, except when I try to mount an unlabeled tape.
*mount
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"

The defined Storage resources are:
     1: File
     2: HP Autoloader
Select Storage resource (1-2): 2
Enter autochanger slot: 2
3301 Issuing autochanger "loaded? drive 0" command.
3302 Autochanger "loaded? drive 0", result: nothing loaded.

3304 Issuing autochanger "load slot 2, drive 0" command.
3305 Autochanger "load slot 2, drive 0", status is OK.
3902 Cannot mount Volume on Storage Device ""HP-0" (/dev/nst0)" because:
Requested Volume "" on "HP-0" (/dev/nst0) is not a Bacula labeled Volume, because: ERR=block.c:1014 Read zero bytes at 0:0 on device "HP-0" (/dev/nst0).
3905 Device ""HP-0" (/dev/nst0)" open but no Bacula volume is mounted.
If this is not a blank tape, try unmounting and remounting the Volume.


I wasn't really note sure where to go from here. It appears that mtx perceives the same thing as bacula.

[root@pmappp01 bin]# mtx status
  Storage Changer /dev/changer:1 Drives, 8 Slots ( 0 Import/Export )
Data Transfer Element 0:Empty

      Storage Element 1:Full :VolumeTag=TPMBU011                       
      Storage Element 2:Full
      Storage Element 3:Full :VolumeTag=TPMBU001                       
      Storage Element 4:Full :VolumeTag=TPMBU005                       
      Storage Element 5:Full :VolumeTag=TPMBU007                       
      Storage Element 6:Full
      Storage Element 7:Full :VolumeTag=TPMBU009                       
      Storage Element 8:Full

I tried labeling a tape using btape, calling it 'test', that seemed to work. I unmounted anything, checked the tapes in the cartridge and was able to figure out which tape was in which slot. I went back into bacula, mounted another tape I desired to label and labeled it. I was able to do this successfully.

HOWEVER

I now find that it has forgotten the label for the tape in slot 1.
I labeled the rest of the tapes, but they don't all show when I do: status slots
I'm unable to use bacula to relabel the tape that I labeled in btape
When I load a tape that isn't listed by 'status slots' bacula reports the label correctly.
The 'label barcodes' command just offers to label what it already sees.

So, current output from 'status slots':

 Slot |   Volume Name    |   Status  |     Media Type       |      Pool          |
------+------------------+-----------+----------------------+--------------------|
    1*|                  |         ? |                    ? |                  ? |
    2*|                  |         ? |                    ? |                  ? |
    3 |         TPMBU001 |      Full |                LTO-4 |            Default |
    4 |         TPMBU005 |      Full |                LTO-4 |            Default |

    5 |         TPMBU007 |    Append |                LTO-4 |            Default |
    6 |         TPMBU015 |    Append |                LTO-4 |            Default |
    7*|                  |         ? |                    ? |                  ? |
    8*|                  |         ? |                    ? |                  ? |

Previous to this, the system recognized the tape in slot 1. It did not see the tape in slot 6, but does now that I labeled it. Previously it saw the tape in slot 7, now it does not. I labeled the tapes in slot 6 and 8 in an identical fashion, and yet it does not list the tape in slot 8.


So this is current output from label barcodes:

*label barcodes
The defined Storage resources are:
     1: File
     2: HP Autoloader
Select Storage resource (1-2): 2
Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3306 Issuing autochanger "slots" command.
Device "HP-0" has 8 slots.
Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3306 Issuing autochanger "list" command.
The following Volumes will be labeled:
Slot  Volume
==============
   3  TPMBU001
   4  TPMBU005
   5  TPMBU007
   6  TPMBU015


It seems to me that I must be doing something wrong, but I've got no idea what that might be and I'm not sure where to go from here, I'm open to suggestions.

Thanks,


On Sat, Sep 15, 2012 at 8:15 PM, Dan Langille <dan AT langille DOT org> wrote:

On Sep 14, 2012, at 5:41 PM, Simon Tyler wrote:

Hi Gani,

I tried different tapes, and then tried an: update slots scan, but with the same results. I don't think it's the tapes, but they were used by previous backup software. Have I neglected to do something to get bacula to recognize these tapes?

Perhaps they need to be 'erased'.

Try:

mt -f /dev/nst0 rewind
mt -f /dev/nst0 weof
mt -f /dev/nst0 rewind

This places an End-Of-Fil marker at the beginning of the tape.  In effect, it is an erase.

If the data on the tape from the previous system is causing trouble, the above will fix that issue.


Thanks,
Simon Tyler  |  Systems Administrator
TPM Communications  
|  416-408-2727  x286



On Fri, Sep 14, 2012 at 4:50 PM, Simon Tyler <simon AT tpmcomm DOT com> wrote:
Hi Gani,

Thanks for the response.

[root@pmappp01 bin]# ./mtx-changer /dev/sg1 list

1:TPMBU011
2:TPMBU002
3:TPMBU001
4:TPMBU005
5:TPMBU007
6:
7:
8:TPMBU003

[root@pmappp01 bin]# mtx -f /dev/sg1 status
  Storage Changer /dev/sg1:1 Drives, 8 Slots ( 0 Import/Export )
Data Transfer Element 0:Full (Storage Element 8 Loaded):VolumeTag = TPMBU003                       
      Storage Element 1:Full :VolumeTag=TPMBU011                       
      Storage Element 2:Full :VolumeTag=TPMBU002                       
      Storage Element 3:Full :VolumeTag=TPMBU001                       
      Storage Element 4:Full :VolumeTag=TPMBU005                       
      Storage Element 5:Full :VolumeTag=TPMBU007                       
      Storage Element 6:Full
      Storage Element 7:Full
      Storage Element 8:Empty


I also  did an: unmount, and then: update slots scan. On slots 6,7 I got the following errors:

3304 Issuing autochanger "load slot 6, drive 0" command.
3305 Autochanger "load slot 6, drive 0", status is OK.
block.c:275 Volume data error at 0:0! Wanted ID: "BB02", got "". Buffer discarded.
3902 Cannot mount Volume on Storage Device ""HP-0" (/dev/nst0)" because:
Requested Volume "" on "HP-0" (/dev/nst0) is not a Bacula labeled Volume, because: ERR=block.c:275 Volume data error at 0:0! Wanted ID: "BB02", got "". Buffer discarded.
No VolName for Slot=6 InChanger set to zero.

Connecting to Storage daemon HP Autoloader at pmappp01.tpmcomm.com:9103 ...
3307 Issuing autochanger "unload slot 6, drive 0" command.
3304 Issuing autochanger "load slot 7, drive 0" command.
3305 Autochanger "load slot 7, drive 0", status is OK.
block.c:275 Volume data error at 0:0! Wanted ID: "BB02", got "". Buffer discarded.
3902 Cannot mount Volume on Storage Device ""HP-0" (/dev/nst0)" because:
Requested Volume "" on "HP-0" (/dev/nst0) is not a Bacula labeled Volume, because: ERR=block.c:275 Volume data error at 0:0! Wanted ID: "BB02", got "". Buffer discarded.
No VolName for Slot=7 InChanger set to zero.

I'm going to try different tapes and see if it can read those barcodes,



Simon Tyler  |  Systems Administrator
TPM Communications  
|  416-408-2727  x286



On Wed, Sep 5, 2012 at 11:38 PM, ganiuszka <ganiuszka AT gmail DOT com> wrote:
W dniu 06.09.2012 00:37, Simon Tyler pisze:

Hello,

I'm having some issues with bacula.

This is a new install, I have not used bacula before. So far I've
successfully backed up from a client to a file on the bacula server, now
I'm trying to get autoloader working so I can backup to tape. I want to
make it so all tapes or Volumes are a member of Default Pool.

I'm trying to label tapes and set them up so they're available in a Pool
for backups. It appears that two slots are not recognized as containing
bacula tapes and I'm not sure how to fix that. I think almost all of the
tapes were used in our previous backup solution, so I don't know why
these two slots are misbehaving. If I try the "label barcodes" command,
it offers to label slots 1-6, and 8, but not the tapes in mystery slots
6 and 7.

Please let me know if I can supply more information, or if I should be
posting somewhere else.

Hi,

It means that probably there is problem with reading tape labels in slots 6 and 7. Are you sure that tapes in slots 6 and 7 have sticked correct labels?

Could you show us output from below commands?

mtx -f /dev/sgX status

(/dev/sgX is special file of changer device)

and from mtx-changer Bacula script:

mtx-changer /dev/sgX list

(/dev/sgX is special file of changer device).

Regards.
gani



------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

-- 
Dan Langille - http://langille.org




------------------------------------------------------------------------------
How fast is your code?
3 out of 4 devs don\\\'t know how their code performs in production.
Find out how slow your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219672;13503038;z?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
<Prev in Thread] Current Thread [Next in Thread>