Bacula-users

Re: [Bacula-users] After system interruption ERR=No medium found

2008-06-27 06:05:33
Subject: Re: [Bacula-users] After system interruption ERR=No medium found
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Fri, 27 Jun 2008 12:04:51 +0200
Hi,

27.06.2008 03:26, Lucas James BARBUTO wrote:
> Hi Arno,
> 
> Thanks very much for your reply.
> 
> On 26/06/2008, at 6:02 PM, Arno Lehmann wrote:
>>> Attached scsi tape st0 at scsi0, channel 0, id 6, lun 0
>>> Attached scsi tape st1 at scsi1, channel 1, id 14, lun 0
>>> scsi singledevice 1 1 14 1
>>>   Vendor: QUANTUM   Model: UHDL              Rev: 000E
>>>   Type:   Medium Changer                     ANSI SCSI revision: 02
>> You have two tape drives attached. For whatever reason, the kernel now
>> recognized them in a different order than before (could be because the
>> power cut left one of the drives in a state where it needed more time
>> to recover).
> 
> It's become clear to me that I don't understand how SCSI tape devices  
> are handled by Linux.

Short description:
Tapes are used by the /dev/(n)stx device nodes. This is the tape 
driver. the n indicates a non-rewinding device, i.e. the tape keeps 
its position when the drive is closed. By default, the devices are 
numbered in the order the driver detects them when loaded (usually at 
boot time).

> Host: scsi1 Channel: 01 Id: 14 Lun: 00
>    Vendor: QUANTUM  Model: SDLT600          Rev: 2525
>    Type:   Sequential-Access                ANSI SCSI revision: 04
> Host: scsi1 Channel: 01 Id: 14 Lun: 01
>    Vendor: QUANTUM  Model: UHDL             Rev: 000E
>    Type:   Medium Changer                   ANSI SCSI revision: 02
> 
> So the tape drive and the changer are at the same SCSI address.

But with different LUNs, which makes them a different device, effectively.

>  The  
> above dmesg snippet indicates to me that I should find the tape drive  
> at st1 or /dev/nst1 yes?

Not necessarily... if you do a 'cat /proc/scsi/scsi' and count the 
tape drives, starting with 0, you get the numbers for them.

>  But scsi_info will only tell me about the  
> "ARCHIVE Python" device at /dev/nst0, it claims that /dev/nst1 does  
> not exist, which worries me.  Perhaps it's broken?

Might be... I rather believe the st driver is kind of stuck.

> As I understand it: Bacula talks to the changer via its generic SCSI  
> device /dev/sg9,

Yup.

> but must talk to the tape via the st driver at /dev/ 
> nst1

Absolutely correct.

> (this is what the pre-existing bacula-sd.conf indicated).  But  
> the system claims that /dev/nst1 doesn't exist.

So you need to reactivate this. Ok.

> So questions: Is it possible that removing and reloading the st driver  
> will have the drive detected and the device recreated properly (this  
> is kernel 2.4.20-8 from RedHat 9)?

Quite possible... you can try a 'rmmod st && modprobe st' for this 
purpose. Problems should be logged to the kernel messages (dmesg) and 
the system log file.

>  Can I talk to the tape via /dev/ 
> sg9?

Not without writing an own tape driver, I guess ;-)

>  Anything else I should try?

If the drives show up in /proc/scsi/scsi, you can try to remove and 
add them to the internal SCSI device list.
You do a 'echo "scsi remove-single-device 1 1 14 0" >/proc/scsi/scsi' 
and an otherwise identical add-single-device for this.

This should add the devices again, but AFAIK the device names might 
increase.

With reloading the st driver you're on the right track, I think.

Of course, if some of the SCSI devices themselves are blocked somehow, 
shutting down the server and the devices and restarting them (external 
SCSI devices first!) might be the only reliable solution.

Arno

> Regards,
> 
> --
> Lucas James BARBUTO
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 

-- 
Arno Lehmann
IT-Service Lehmann
www.its-lehmann.de

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>