Bacula-users

Re: [Bacula-users] Tape drive/changer : Please help - going insane ...........

2011-08-30 08:17:38
Subject: Re: [Bacula-users] Tape drive/changer : Please help - going insane ...........
From: John Drescher <drescherjm AT gmail DOT com>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 30 Aug 2011 08:14:29 -0400
> Just got this error when trying the fill test on the 2nd tape.....
>
> 'dev open failed: dev.c:491 Unable to open device "LTO-4" (/dev/nst0): ERR=No 
> medium found'
>
> Since about March this year we have had a tape drive - a Neo 200s that I have 
> been (failing) trying to get working with (z)amanda and now bacula. I have 
> wasted many days of my life trying to get this to work - the best I got with 
> zamada was to do a single tape backup (multiple tapes again failed)
>
> I believe the issue is with the auto changer ???
>
> I am following the bacula guide : 
> http://www.bacula.org/5.0.x-manuals/en/problems/problems/Testing_Your_Tape_Drive.html
>
> I did the initial tests fine (Use tar to write to, then read from your drive: 
> )
>
> I also had success with
>
> ./btape -c bacula-sd.conf /dev/nst0
> test
> (this was 100% success)
>
> and
>
> ./btape -c bacula-sd.conf /dev/nst0
> auto
>
> - the results (of the auto) were
>
> ------------------
> === Autochanger test ===
>
> 3301 Issuing autochanger "loaded" command.
> Slot 24 loaded. I am going to unload it.
> 3302 Issuing autochanger "unload 24 0" command.
> unload status=OK 0
> 3303 Issuing autochanger "load 1 0" command.
> 3303 Autochanger "load 1 0" status is OK.
> btape: btape.c:476 open device "LTO-4" (/dev/nst0): OK
> btape: btape.c:1562 Rewound "LTO-4" (/dev/nst0)
> btape: btape.c:1569 Wrote EOF to "LTO-4" (/dev/nst0)
>
> The test autochanger worked!!
> ------------------
>
>
> However when I tried the fill test it successfully did the first tape, when 
> it tried to go to the second I got
>
> ------------------------------
> 14:04:13 Flush block, write EOF
> Wrote block=12605000, file,blk=812,14483 VolBytes=811,882,423,296 rate=54.28 
> MB/s
> Wrote block=12610000, file,blk=813,3983 VolBytes=812,204,983,296 rate=54.27 
> MB/s
> Wrote block=12615000, file,blk=813,8983 VolBytes=812,527,543,296 rate=54.28 
> MB/s
> Wrote block=12620000, file,blk=813,13983 VolBytes=812,850,103,296 rate=54.28 
> MB/s
> 26-Aug 14:04 btape JobId 0: End of Volume "TestVolume1" at 814:1 on device 
> "LTO-4" (/dev/nst0). Write of 64512 bytes got -1.
> 26-Aug 14:04 btape JobId 0: Re-read of last block succeeded.
> btape: btape.c:2701 Last block at: 813:15500 this_dev_block_num=1
> btape: btape.c:2736 End of tape 814:0. Volume Bytes=812,948,032,512. Write 
> rate = 54.24 MB/s
> 26-Aug 14:04 btape JobId 0: End of medium on Volume "TestVolume1" 
> Bytes=812,948,032,512 Blocks=12,601,501 at 26-Aug-2011 14:04.
> 26-Aug 14:04 btape JobId 0: 3307 Issuing autochanger "unload slot 1, drive 0" 
> command.
> 26-Aug 14:05 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0" 
> command.
> 26-Aug 14:05 btape JobId 0: 3302 Autochanger "loaded? drive 0", result: 
> nothing loaded.
> btape: btape.c:3061 Autochanger returned: -1
> Mount blank Volume on device "LTO-4" (/dev/nst0) and press return when ready: 
> btape: btape.c:3066
> 26-Aug 14:05 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0" 
> command.
> 26-Aug 14:05 btape JobId 0: 3302 Autochanger "loaded? drive 0", result: 
> nothing loaded.
> 26-Aug 14:05 btape: Fatal Error at device.c:298 because:
> dev open failed: dev.c:491 Unable to open device "LTO-4" (/dev/nst0): ERR=No 
> medium found
>
> btape: btape.c:506 Device open failed. ERR=dev.c:491 Unable to open device 
> "LTO-4" (/dev/nst0): ERR=No medium found
>
> 26-Aug 14:05 btape: ABORTING due to ERROR in dev.c:782
> dev.c:781 Bad call to rewind. Device "LTO-4" (/dev/nst0) not open
> Bacula interrupted by signal 11: Segmentation violation
> Kaboom! btape, btape got signal 11 - Segmentation violation. Attempting 
> traceback.
> Kaboom! exepath=/root
> Calling: /root/btraceback /root/btape 17537 /tmp
> execv: /root/btraceback failed: ERR=No such file or directory
> It looks like the traceback worked ...
> Dumping: /tmp/btape.17537.bactrace
> btape: lockmgr.c:909 lockmgr disabled
> [root@tapedrivetest ~]# btape -c bacula-sd.conf /dev/nst0
> Tape block granularity is 1024 bytes.
> btape: butil.c:285 Using device: "/dev/nst0" for writing.
> 26-Aug 14:21 btape JobId 0: 3301 Issuing autochanger "loaded? drive 0" 
> command.
> 26-Aug 14:21 btape JobId 0: 3302 Autochanger "loaded? drive 0", result: 
> nothing loaded.
> 26-Aug 14:21 btape: Fatal Error at device.c:298 because:
> dev open failed: dev.c:491 Unable to open device "LTO-4" (/dev/nst0): ERR=No 
> medium found
>
> 26-Aug 14:21 btape JobId 0: Fatal error: butil.c:194 Cannot open "LTO-4" 
> (/dev/nst0)
>
> ------------------------------
>
> And now I get errors accessing the tape drive
>
> i.e :-
>
> -----------
> mt -f /dev/nst0 status
> SCSI 2 tape drive:
> File number=-1, block number=-1, partition=0.
> Tape block size 0 bytes. Density code 0x0 (default).
> Soft error count since last status=0
> General status bits on (50000):
> DR_OPEN IM_REP_EN
> -----------
>
> Also now when trying the initial test I get
>
> -------
> btape -c /etc/bacula/bacula-sd.conf /dev/nst0
> Tape block granularity is 1024 bytes.
> btape: butil.c:285 Using device: "/dev/nst0" for writing.
> 26-Aug 16:57 btape: Fatal Error at device.c:298 because:
> dev open failed: dev.c:491 Unable to open device "LTO-4" (/dev/nst0): ERR=No 
> medium found
>
> 26-Aug 16:57 btape JobId 0: Fatal error: butil.c:194 Cannot open "LTO-4" 
> (/dev/nst0)
> -------
>
> Is this due to no tape ? If so why, shouldn't the changer take care of this ?
>

I would test the operation of the mtx-changer script directly to debug
why the script is failing. In some cases you will need to modify the
script yourself for your OS (that may use an old version of mtx) or
your changer.

See testing your autochanger in the following:
http://www.bacula.org/en/dev-manual/main/main/Autochanger_Resource.html#SECTION002430000000000000000

Wait a minute. Why is the tape labeled TestVolume1? That can't be a
barcode label can it? Remember  an autochanger will work much better
with barcode labels.

John

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users