Bacula-users

Re: [Bacula-users] mt Command and Tape ONLINE status

2009-02-17 10:14:40
Subject: Re: [Bacula-users] mt Command and Tape ONLINE status
From: Brian Debelius <bdebelius AT intelesyscorp DOT com>
To: Thomas <thomas AT ic3s DOT de>
Date: Tue, 17 Feb 2009 10:11:24 -0500
There are 2 different mt programs. One is from cpio (i think), and the 
other is from the mt-st package.  I think you are having problems 
detecting which mt you have.

At the beginning of mtx-changer is a case function that sets the ready 
string for wait_for_drive.  The newer mtx-changer script correctly 
handles this.

I think you need to modify your mtx-changer to look like this (or use 
the current mtx-changer)

Linux)
  ready="ONLINE"
  if test -f /etc/debian_version ; then
    mt --version | grep "mt-st" > /dev/null 2>&1
    if test $? -eq 1; then
      ready="drive status"
    fi
  fi

Thomas wrote:
> without tape i get this output
>
> lenny:
> time mt -f /dev/nst1 status
> mt: /dev/nst1: rmtopen failed: Kein Medium gefunden
>
> real    2m0.530s
> user    0m0.000s
> sys     0m0.000s
>
> etch
> time /etc/bacula/mt -f /dev/nst1 status
> /etc/bacula/mt: /dev/nst1: Kein Medium gefunden
>
> real    0m0.016s
> user    0m0.000s
> sys     0m0.000s
>
>
> the new mt version needs 2 minutes ....
>
> Arno Lehmann schrieb:
>   
>> Hi,
>>
>> 17.02.2009 09:48, Thomas wrote:
>>     
>>> Hi List,
>>>
>>> yesterday i did an upgrade from etch to lenny.
>>> after the update bacula was no longer able to verify
>>> that the tapes are loaded correctly.
>>>       
>> ...
>>     
>>> but the mt output shows no ONLINE
>>>
>>>
>>> zlato:~# mt -f /dev/nst0 status
>>> drive type = 114
>>> drive status = 1224736768
>>> sense key error = 0
>>> residue count = 0
>>> file number = 0
>>> block number = 0
>>> zlato:~#
>>>
>>> this is the output from the etch mt:
>>>
>>> /etc/bacula/mt -f /dev/nst0 status
>>> drive type = Generic SCSI-2 tape
>>> drive status = 1224736768
>>> sense key error = 0
>>> residue count = 0
>>> file number = 4
>>> block number = 0
>>> Tape block size 0 bytes. Density code 0x49 (unknown).
>>> Soft error count since last status=0
>>> General status bits on (81010000):
>>>  EOF ONLINE IM_REP_EN
>>>
>>>
>>> zlato:~# mt --version
>>> mt (GNU cpio 2.9)
>>> zlato:~# /etc/bacula/mt --version
>>> mt (GNU cpio 2.6)
>>> zlato:~#
>>>
>>> zlato:~# strings /bin/mt | grep -i online
>>> zlato:~# strings /etc/bacula/mt | grep -i online
>>>  ONLINE
>>> zlato:~#
>>>
>>>
>>> currently i use the etch mt, but what was the correct way to use the lenny 
>>> mt?
>>> (compiling mt from source does not help, the output is identically to the 
>>> lenny mt,
>>> so it looks not like a debian problem)
>>>       
>> This seems to be a problem because the current mt produces different 
>> output... it would be best if you ran mt without a tape loaded and 
>> compared the output, so we can see what actually indicates a tape 
>> loaded and ready.
>>
>> Arno
>>
>>     
>>> Regards
>>>
>>> Thomas
>>>       
>
>   


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users