You are a star of the highest order :)
=====================
=== Autochanger test ===
3301 Issuing autochanger "loaded" command.
btape: btape.c:1133 run_prog: /etc/bacula/mtx-changer /dev/sg0 loaded 1
/dev/nst0 0 stat=0 result="1
"
Slot 1 loaded. I am going to unload it.
btape: btape.c:1147 Results from loaded query=1
btape: dev.c:621 rewind res=0 fd=3 "ADIC-DLT7000" (/dev/nst0)
btape: device.c:322 Force close_dev "ADIC-DLT7000" (/dev/nst0)
btape: dev.c:1685 really close_dev "ADIC-DLT7000" (/dev/nst0)
btape: dvd.c:93 Enter unmount_dev
3302 Issuing autochanger "unload 1 0" command.
unload status=OK 0
3303 Issuing autochanger "load 1 0" command.
btape: btape.c:1176 Changer=/etc/bacula/mtx-changer /dev/sg0 load 1
/dev/nst0 0
3303 Autochanger "load 1 0" status is OK.
btape: dev.c:277 open dev: tape=2 dev_name="ADIC-DLT7000" (/dev/nst0)
vol= mode=OPEN_READ_WRITE
btape: dev.c:323 open dev: device is tape
btape: autochanger.c:249 Locking changer ADIC-Library
23-Jan 22:32 btape: 3301 Issuing autochanger "loaded drive 0" command.
btape: autochanger.c:220 run_prog: /etc/bacula/mtx-changer /dev/sg0
loaded 1 /dev/nst0 0 stat=0 result=1
23-Jan 22:32 btape: 3302 Autochanger "loaded drive 0", result is Slot 1.
btape: autochanger.c:258 Unlocking changer ADIC-Library
btape: dev.c:338 Try open "ADIC-DLT7000" (/dev/nst0)
mode=OPEN_READ_WRITE nonblocking=2048
btape: dev.c:369 openmode=2 OPEN_READ_WRITE
btape: dev.c:382 open dev: tape 3 opened
btape: btape.c:338 open device "ADIC-DLT7000" (/dev/nst0): OK
btape: dev.c:621 rewind res=0 fd=3 "ADIC-DLT7000" (/dev/nst0)
btape: dev.c:1504 weof_dev
btape: btape.c:1206 Rewound "ADIC-DLT7000" (/dev/nst0)
btape: dev.c:1504 weof_dev
btape: btape.c:1213 Wrote EOF to "ADIC-DLT7000" (/dev/nst0)
The test autochanger worked!!
=====================
Many thanks!!
(Now, about those MP3s... ;-)
Steve
Arno Lehmann wrote:
Hello,
On 1/23/2006 10:32 PM, Steve Loughran wrote:
Hi all
First off, I have bacula (v1.38) up and running at work with a
Overland LTO3 unit (zero problems!), so I thought it might be worth
getting it set up at home as well (hell, my MP3s are far more
important than work data :)
Sure... (how many, and do you want to share? ;-)
Just joking...)
... and I run into a problem at the first hurdle. I am trying to run
"btape" to check the autochanger, and its failing (yes, even with the
"mt $device offline" line enabled in mtx-changer)
...
3303 Issuing autochanger "load 1 0" command.
btape: btape.c:1176 Changer=/etc/bacula/mtx-changer /dev/sg0 load 1
/dev/nst0 0
3303 Autochanger "load 1 0" status is OK.
btape: dev.c:277 open dev: tape=2 dev_name="ADIC-DLT7000" (/dev/nst0)
vol= mode=OPEN_READ_WRITE
btape: dev.c:323 open dev: device is tape
btape: autochanger.c:249 Locking changer ADIC-Library
23-Jan 20:56 btape: 3301 Issuing autochanger "loaded drive 0" command.
btape: autochanger.c:220 run_prog: /etc/bacula/mtx-changer /dev/sg0
loaded 1 /dev/nst0 0 stat=0 result=1
23-Jan 20:56 btape: 3302 Autochanger "loaded drive 0", result is Slot 1.
btape: autochanger.c:258 Unlocking changer ADIC-Library
btape: dev.c:338 Try open "ADIC-DLT7000" (/dev/nst0)
mode=OPEN_READ_WRITE nonblocking=2048
btape: dev.c:369 openmode=2 OPEN_READ_WRITE
btape: dev.c:382 open dev: tape 3 opened
btape: btape.c:338 open device "ADIC-DLT7000" (/dev/nst0): OK
btape: dev.c:621 rewind res=0 fd=3 "ADIC-DLT7000" (/dev/nst0)
btape: dev.c:277 open dev: tape=2 dev_name="ADIC-DLT7000" (/dev/nst0)
vol= mode=OPEN_READ_WRITE
btape: dev.c:323 open dev: device is tape
btape: autochanger.c:249 Locking changer ADIC-Library
23-Jan 20:56 btape: 3301 Issuing autochanger "loaded drive 0" command.
btape: autochanger.c:220 run_prog: /etc/bacula/mtx-changer /dev/sg0
loaded 1 /dev/nst0 0 stat=0 result=1
23-Jan 20:56 btape: 3302 Autochanger "loaded drive 0", result is Slot 1.
btape: autochanger.c:258 Unlocking changer ADIC-Library
btape: dev.c:338 Try open "ADIC-DLT7000" (/dev/nst0)
mode=OPEN_READ_WRITE nonblocking=2048
btape: dev.c:369 openmode=2 OPEN_READ_WRITE
btape: dev.c:382 open dev: tape 3 opened
btape: btape.c:1198 Bad status from rewind. ERR=dev.c:672 Rewind error
on "ADIC-DLT7000" (/dev/nst0). ERR=Input/output error.
The test failed, probably because you need to put
a longer sleep time in the mtx-script in the load) case.
Adding a 30 second sleep and trying again ...
3301 Issuing autochanger "loaded" command.
btape: btape.c:1133 run_prog: /etc/bacula/mtx-changer /dev/sg0 loaded
1 /dev/nst0 0 stat=0 result="1
"
Slot 1 loaded. I am going to unload it.
btape: btape.c:1147 Results from loaded query=1
Well, that might easily be solved... I guess the timeout after the wait
is not long enough. I'm using a DLT4000 drive here, and sometimes, with
tapes initialized by higher capacity drives, I see load times of several
minutes.
My workaround was not to set the sleep timeout to a very high value, but
rather to enable the function wait_for_drive in the mtx-changer script.
Works great, usually.
To investigate if thiat is really your problem, you can do the following:
Stop the SD or unmount the tape drive.
From a shell, use mtx to load a tape.
as soon as mtx returns, use tapeinfo to query the tape drives state.
Usually, you will _not_ get a ready and BOT state.
That's the result of the independance of loader and drive in the ADIC
FastStor devices - mtx returns as soon as the loader has done its work,
but then the drive only started. And DLT loading can take quite long.
Arno
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users