Bacula-users

Re: [Bacula-users] newbie - problem labeling / adding tapes to pool

2012-09-17 19:05:21
Subject: Re: [Bacula-users] newbie - problem labeling / adding tapes to pool
From: Simon Tyler <simon AT tpmcomm DOT com>
To: Dan Langille <dan AT langille DOT org>
Date: Mon, 17 Sep 2012 19:02:57 -0400
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


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users