Bacula-users

Re: [Bacula-users] Tape unloads immediately after load

2011-12-09 03:57:58
Subject: Re: [Bacula-users] Tape unloads immediately after load
From: Uwe Bolick <bolick AT astro.physik.tu-berlin DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Fri, 9 Dec 2011 09:55:40 +0100
On Thu, Dec 08, 2011 at 07:58:09PM +0100, Dietz Pröpper wrote:
> Uwe Bolick:
> > Hi,
> > 
> > I needs to restore files from tape, but this time without success,
> > because the needed tape can not be loaded for action. After loading
> > the tape, it get's unloaded immediately:
> [...]
> 
> What happens if you try to load the tape by hand, i.e. by means of a mtx 
> load 3, and try to read it afterwards, i.e. by dding the tape device to 
> /dev/null? Be sure to umount the tape before trying to read.
> ...

It's really strange, because everything seems OK. If I do it by hand,
I get:

*mount storage=Tapelib slot=3 drive=1
Automatically selected Catalog: MyCatalog
Using Catalog "MyCatalog"
3301 Issuing autochanger "loaded? drive 1" command.
3302 Autochanger "loaded? drive 1", result: nothing loaded.
3304 Issuing autochanger "load slot 3, drive 1" command.
3305 Autochanger "load slot 3, drive 1", status is OK.
3902 Cannot mount Volume on Storage Device "Drive-1" (/dev/nst0) because:
label.c:239 Could not reserve volume 000002L5 on "Drive-1" (/dev/nst0)
3001 Device "Drive-1" (/dev/nst0) is already mounted with Volume "000002L5"

*status storage=Tapelib
...
Device status:
Autochanger "TL4000" with devices:
   "Drive-1" (/dev/nst0)
   "Drive-2" (/dev/nst1)
Device "Drive-1" (/dev/nst0) is mounted with:
    Volume:      000002L5
    Pool:        *unknown*
    Media type:  LTO-5
    Slot 3 is loaded in drive 1.
    Total Bytes Read=64,512 Blocks Read=1 Bytes/block=64,512
    Positioned at File=0 Block=0
Device "Drive-2" (/dev/nst1) is not open.
    Drive 0 status unknown.
...

Now stopping the SD, to use bls:

vs5# bls -L -V 000002L5 /dev/nst0
bls: butil.c:281 Using device: "/dev/nst0" for reading.
08-Dec 16:46 bls JobId 0: Invalid slot=0 defined in catalog for Volume 
"000002L5" on "Drive-1" (/dev/nst0). Manual load may be required.
08-Dec 16:46 bls JobId 0: 3301 Issuing autochanger "loaded? drive 1" command.
08-Dec 16:46 bls JobId 0: 3302 Autochanger "loaded? drive 1", result is Slot 3.
08-Dec 16:46 bls JobId 0: Ready to read from volume "000002L5" on device 
"Drive-1" (/dev/nst0).

Volume Label:
Id                : Bacula 1.0 immortal
VerNo             : 11
VolName           : 000002L5
PrevVolName       :
VolFile           : 0
LabelType         : VOL_LABEL
LabelSize         : 159
PoolName          : Tapearchive
MediaType         : LTO-5
PoolType          : Backup
HostName          : vs5
Date label written: 23-Jun-2011 23:47


vs5# bls -V 000002L5 /dev/nst0|head
bls: butil.c:281 Using device: "/dev/nst0" for reading.
08-Dec 16:48 bls JobId 0: Invalid slot=0 defined in catalog for Volume 
"000002L5" on "Drive-1" (/dev/nst0). Manual load may be required.
08-Dec 16:48 bls JobId 0: 3301 Issuing autochanger "loaded? drive 1" command.
08-Dec 16:48 bls JobId 0: 3302 Autochanger "loaded? drive 1", result is Slot 3.
08-Dec 16:48 bls JobId 0: Ready to read from volume "000002L5" on device 
"Drive-1" (/dev/nst0).
bls JobId 37245: -rw-r--r--   1 1252     1252          338088 2011-07-19 
12:20:33  
/raid/attic/new/Diplomarbeit_AB/Literature/Corot-Planeten/Corot-Exo-4b-2008.pdf
bls JobId 37245: -rw-r--r--   1 1252     1252          275082 2011-07-19 
12:20:31  
/raid/attic/new/Diplomarbeit_AB/Literature/Corot-Planeten/Corot-Exo-1b-2008.pdf
bls JobId 37245: -rw-r--r--   1 1252     1252          168025 2011-07-19 
12:20:31  
/raid/attic/new/Diplomarbeit_AB/Literature/Corot-Planeten/Corot-Exo-2b-2008.pdf
bls JobId 37245: -rw-r--r--   1 1252     1252          352161 2011-07-19 
12:20:33  
/raid/attic/new/Diplomarbeit_AB/Literature/Corot-Planeten/Corot-Exo-4b-2008_I.pdf
bls JobId 37245: -rw-r--r--   1 1252     1252         1040203 2011-07-19 
12:20:32  
/raid/attic/new/Diplomarbeit_AB/Literature/Corot-Planeten/Corot-Exo-3b-2008.pdf

Everything looks OK, but if I try a restore the "normal" way, the
load-unload game is starting again.

Can it be a catalog problem? However, dbcheck shows no problems.

And, by the way, I am using Debian/Squeeze with 5.0.2 (forget to tell
yesterday).

Many thanks,
  Uwe
-- 
 Uwe Bolick
 Zentrum für Astronomie und Astrophysik
 Technische Universität Berlin
 EW 8-1, Hardenbergstr. 36, D-10623 Berlin (Germany)

------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users