Hi Arno, Keith and list

Thanks a lot. Now I've found out a few things...
- Nearly needless to say that you where both right and /dev/sg3 _is_ the
changer device.

- Arno, thanks for the hint to forget playing around with bacula and to focus
on getting mtx working.

Now the empirical things:
- I have to _stop_ bacula to do certain test, otherwise "mtx", "tar" etc always
tell me - as an error - that the device is busy.

- The device could be working. I attached some command-outputs that are my
reasons to believe so:

# tapeinfo -f /dev/sg3
Product Type: Medium Changer
Vendor ID: 'QUANTUM '
Product ID: 'UHDL            '
Revision: '0031'
Attached Changer: No
SerialNumber: 'CG6JC35647UH'
SCSI ID: 5
SCSI LUN: 1
Ready: no

# loaderinfo -f /dev/sg3
Product Type: Medium Changer
Vendor ID: 'QUANTUM '
Product ID: 'UHDL            '
Revision: '0031'
Attached Changer: No
Bar Code Reader: No
EAAP: Yes
Number of Medium Transport Elements: 1
Number of Storage Elements: 16
Number of Import/Export Element Elements: 0
Number of Data Transfer Elements: 1
Transport Geometry Descriptor Page: Yes
Invertable: No
Device Configuration Page: Yes
Can Transfer: Yes

# mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 512 bytes. Density code 0x44 (no translation).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN

# tar -cf /dev/nst0 /tmp/
tar: Removing leading `/' from member names
(This works, I guess.)

Well now, the less funny part:

# mtx -f /dev/sg3 status
mtx: Request Sense: 70 00 02 00 00 00 00 1E 00 00 00 00 04 03 00 00 00 00 00 00
READ ELEMENT STATUS Command Failed

# /usr/pack/bacula_mysql-2.0.3-rp/amd64-debian-linux3.1/scripts/mtx-changer 
/dev/sg3 load 1 /dev/nst0 0
mtx: Request Sense: 70 00 02 00 00 00 00 1E 00 00 00 00 04 03 00 00 00 00 00 00
READ ELEMENT STATUS Command Failed

# mt -f /dev/sg3 eject
/dev/sg3: Operation not permitted


# dmesg | tail
[168322.441562] NFSD: starting 90-second grace period
[1188266.284746] st0: Write not multiple of tape block size.
[1188301.160942] st0: Write not multiple of tape block size.
[1189175.640945] st0: Write not multiple of tape block size.
[1189249.930203] st0: Write not multiple of tape block size.
[1206329.081616] st0: Write not multiple of tape block size.
[1206335.525053] st0: Write not multiple of tape block size.
[1206359.269428] st0: Write not multiple of tape block size.
[1207514.104233] st0: Write not multiple of tape block size.
[1791080.401660] st0: Write not multiple of tape block size.

(I suppose this is from an older try where I've got a similar message but
maybe it helps).
This is the only affecting appearance in syslog, messages & dmesg.

# ls -hal /dev/sg* /dev/nst*
crwxrwxrwx  1 root tape  9, 128 May  2 15:08 /dev/nst0
crw-rw----  1 root tape  9, 224 May  2 15:08 /dev/nst0a
crw-rw----  1 root tape  9, 160 May  2 15:08 /dev/nst0l
crw-rw----  1 root tape  9, 192 May  2 15:08 /dev/nst0m
crw-rw----  1 root root 21,   0 May  2 15:08 /dev/sg0
crw-rw----  1 root root 21,   1 May  2 15:08 /dev/sg1
crwxrwxrwx  1 root tape 21,   2 May  2 15:08 /dev/sg2
crwxrwxrwx  1 root root 21,   3 May  2 15:08 /dev/sg3

You are right, I do have to get mtx working together with my drive
but neither google nor me have some ideas how to do this.
Is there maybe a hardware-problem or does anyone have an idea
where and what could be wrong?

Thanks a lot!
Sincerely,
christoph


>>> Arno Lehmann<[EMAIL PROTECTED]> 23.05.2007 00:05 >>>
Hi,

On 5/22/2007 9:39 AM, Christoph Buchli wrote:
> Hy list
> I give up trying and start hoping... hoping someone here could help me...

Let's see...

> My problem is, that bacula (and even mtx) won't use my autochanger as
> it would be built for...
> 
> mtx recognises it [1] but that's all.
> According to this, I set up my bacula-sd.conf: [2]
> Everything looks great so far, doesn't it? (I'm pretty shure that sg2 is the
> right device but although I tested with sg3: Same behaviour.
> 
> The problem is now that bacula won't accept or even detect some Tapes.
> The 'label' command prints me some mtx-errors [3] and prints:
> Label command failed for Volume TestTape001.

I admit this mail is really hard to read and reply to, so it's possible 
I overlooked something...

> I have added some outputs of bconsole [4]... Confusing is, that the it seems
> that there is somewhere a tape labeled with "Montag" but it is not mounted
> although bconsole tells that it is mounted.
> The 'create' command responses with an error too that say something like:
> 'Pool Default already exists'.

Yup. Why do you want to use the 'create' command?

> Why the hell is he trying the "slots" command on "Drive-1", my
> archive-device [5]?
> 
> I guess it's just a lack of understanding how this whole tape-thing works.
> Of corse I've read through the documentation an found a lot of helpful
> things but at the moment I can turn page about page but can't find
> anything...
> 
> Thanks a lot in advice.
> 
> sincerely,
> christoph
> 
> ______________________________________________________________
> 
> [1] perl -e 'my @v = ( 0,1,2,3 ) ; foreach ( @v ) { my $cmd = `mtx -f 
> /dev/sg$_ inquiry` ; print "$cmd\r\r" ; }'
> 
> Product Type: Disk Drive
> Vendor ID: 'Areca   '
> Product ID: 'ARC-1260-VOL#00 '
> Revision: 'R001'
> Attached Changer: No
> 
> Product Type: Processor
> Vendor ID: 'Areca   '
> Product ID: 'RAID controller '
> Revision: 'R001'
> Attached Changer: Yes
> 
> Product Type: Tape Drive
> Vendor ID: 'CERTANCE'
> Product ID: 'ULTRIUM 3       '
> Revision: '1856'
> Attached Changer: No
> 
> Product Type: Medium Changer
> Vendor ID: 'QUANTUM '
> Product ID: 'UHDL            '
> Revision: '0031'
> Attached Changer: No

/dev/sg3 is your autochanger, not /dev/sg2.

> [2] cat /usr/sepp/var-svn/bacula/srv-rhein/bacula-sd.conf | grep .. | grep -v 
> ^\#
> [...]
> Autochanger {
>   Name = "Superloader"
>   Device = Drive-1
>   Changer Device = /dev/sg2

Fix this here.

>   Changer Command = 
> "/usr/pack/bacula_mysql-2.0.3-rp/amd64-debian-linux3.1/scripts/mtx-changer %c 
> %o %S %a %d"
> }
> Device {
>   Name = Drive-1
>   Drive Index = 0
>   Media Type = LTO-3
>   Archive Device = /dev/nst0    # Normal archive device
>   Minimum block size = 1024
>   Maximum blocksize = 1024

The above two lines are probably a performance killer.

>   Autochanger = yes
>   LabelMedia = no;
>   AutomaticMount = yes;
>   AlwaysOpen = yes;
> }
> [...]
> 
> [3] root(cbu)@srv-rhein# mtx -f /dev/sg2 status
> mtx: Request Sense: 70 00 05 00 00 00 00 1E 00 00 00 00 20 00 00 00 00 00 00 
> 00
> READ ELEMENT STATUS Command Failed
> root(cbu)@srv-rhein# mtx -f /dev/sg3 status
> mtx: Request Sense: 70 00 02 00 00 00 00 1E 00 00 00 00 04 03 00 00 00 00 00 
> 00
> READ ELEMENT STATUS Command Failed
> root(cbu)@srv-rhein# mtx -f /dev/sg3 inventory
> mtx:inventory failed

Interesting output :-)

The mtx's I know report problems in a different format. Which mtx is it 
you're calling here?

Anyway, as the configuration is incorrect, and mtx, and thus 
mtx-changer, don't work correctly, it's not possible to tell anything 
valuable from the following output... with exceptions :-)

> 
> [4]  bconsole
> * mount > 2(Superloader) > Slot:1

Interesting. When mtx does not work, and mtx-changer does not work, too, 
there should be some messages and probably an error here.

> [...]
> 3001 Mounted Volume: Montag
> 3001 Device "Drive-1" (/dev/nst0) is already mounted with Volume "Montag"
> * list pools
> Automatically selected Catalog: MyCatalog
> Using Catalog "MyCatalog"
> +--------+---------+---------+---------+----------+-------------+
> | PoolId | Name    | NumVols | MaxVols | PoolType | LabelFormat |
> +--------+---------+---------+---------+----------+-------------+
> |      1 | Default |       1 |       0 | Backup   | *           |
> +--------+---------+---------+---------+----------+-------------+
> *list volumes
> Pool: Default
> +---------+------------------+-----------+---------+------------+----------+--------------+---------+------+-----------+-----------+---------------------+
> | MediaId | VolumeName       | VolStatus | Enabled | VolBytes   | VolFiles | 
> VolRetention | Recycle | Slot | InChanger | MediaType | LastWritten         |
> +---------+------------------+-----------+---------+------------+----------+--------------+---------+------+-----------+-----------+---------------------+
> |       1 | TestVolumeTmp001 | Append    |       1 | 18,513,823 |        0 |  
>  31,536,000 |       1 |    0 |         1 | File      | 2007-05-16 15:51:40 |
> +---------+------------------+-----------+---------+------------+----------+--------------+---------+------+-----------+-----------+---------------------+

And now you wonder where the volume Montag comes from?

Probably you deleted the pool it belonged to, labeled it using btape, or 
got that volume from another Bacula installation.

> [5] *update
> Update choice:
>      1: Volume parameters
>      2: Pool from resource
>      3: Slots from autochanger
> Choose catalog item to update (1-3): 3
> The defined Storage resources are:
>      1: File
>      2: Superloader
> Select Storage resource (1-2): 2
> Connecting to Storage daemon Superloader at srv-rhein:9103 ...
> 3306 Issuing autochanger "slots" command.
> Device "Drive-1" has 0 slots.
> No slots in changer to scan.
> *

mtx-changer does not work.


You've got to get mtx-changer working first. mtx-changer relies on mtx, 
so unless you get mtx to report the device status correctly, it's no use 
trying to operate Bacula.

First, make sure you've got a working SCSI installation (use tar or dd 
to test the tape). Then, investigate why mtx can't operate the 
Superloader. Actually, I'm quite sure this *can* work... watch the 
system log during mtx operation.

Once you've got this right, use btape for the tape testing, following 
the manual.

Arno


-- 
IT-Service Lehmann                    [EMAIL PROTECTED] 
Arno Lehmann                  http://www.its-lehmann.de 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/ 




-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to