Re: arkeia and redhat

Doug Wyatt <[email protected]> Fri, 08 Nov 2002 04:16:54 -0600
Newsgroups gmane.linux.redhat.release.zoot
Organization Kohlman Systems Research, inc.
Message-ID <[email protected]>
Disconnecting the power to the drive should be no more
dangerous than flipping off the power switch on an external
SCSI tape drive enclosure.  In other words, I don't see
any risk to the drive by pulling the power cable.  The only
risks I see in doing this are if you mess with the SCSI
cable, especially if other drives share it.  Of course, if
you can't easily get to the power connection while the
server is running, then rebooting is sufficient.

As for using the ioctl() call, a simple C program might
look something like:

   #include <sys/types.h>
   #include <sys/stat.h>
   #include <fcntl.h>
   #include <linux/mtio.h>

   main() {
      int         fd ;
      struct mtop mtop ;

      fd = open( "/dev/st0", O_RDWR ) ;
      mtop.mt_op = MTRESET ;
      ioctl( fd, MTIOCTOP, &mtop ) ;

      close( fd ) ;
   } /* END main() */

As I indicated, this might work, but only if MTRESET is
implemented for the tape unit you're using.

Doug

Ralph Houben wrote:
> welp!
> 
> could you explain that in plain english please? i aint
> that technical yet in the linux world that i can programm
> things like that....
> 
> do you know of any utils out there that can do that? that i just
> can compile and run? i found a project called sg_utils, but that
> did not include the sg_reset tool, if read the documentation correctly
> it does that but as sayd, the wanted tool aint in the source anymore :(
> 
> hotkilling a drive doesn't seem such a good idea, seeing the drive itself
> is still in warrenty.. heh...
> 
> thank you for your reply doug :)
> 
> ----- Original Message ----- 
> From: "Doug Wyatt" <[email protected]>
> To: <[email protected]>
> Sent: Thursday, November 07, 2002 4:05 PM
> Subject: Re: arkeia and redhat
> 
> 
> 
>>I don't have any great depth of experience with Linux,
>>but I have experienced similar situations with an HP-UX
>>server and an AIT tape drive.   I've found that I can
>>open up the enclosure and disconnect and then reconnect
>>the power cable attached to the tape drive.  This causes
>>the tape drive to reset and does not cause any problems
>>for the server (other than generating a diagnostic SCSI
>>event message).
>>
>>It seems likely that this would work in your situation,
>>but I can't guarantee it.
>>
>>On the software side, an MTRESET delivered to the st
>>device via an ioctl( fd, MTIOCTOP, (struct mtop *)mt_cmd )
>>might do the same thing.
>>
>>Regards,
>>Doug Wyatt
>>
> 
> <snipped my original mail about onstream adr50 and unit hanging
> after crashed tape backup>
> 
> 
> 
> _______________________________________________
> Zoot-list mailing list
> [email protected]
> https://listman.redhat.com/mailman/listinfo/zoot-list

-- 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Doug Wyatt     <[email protected]>
Sys Admin - Kohlman Systems Research, Inc.
319 Perry St.,  Lawrence,  KS  66044   USA
Phone: 785-843-4099      Fax: 785-843-6459