From owner-freebsd-questions@FreeBSD.ORG Fri Apr 28 13:50:12 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3978416A405 for ; Fri, 28 Apr 2006 13:50:12 +0000 (UTC) (envelope-from xfb52@dial.pipex.com) Received: from smtp-out2.blueyonder.co.uk (smtp-out2.blueyonder.co.uk [195.188.213.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8BD4C43D45 for ; Fri, 28 Apr 2006 13:50:10 +0000 (GMT) (envelope-from xfb52@dial.pipex.com) Received: from [172.23.170.142] (helo=anti-virus02-09) by smtp-out2.blueyonder.co.uk with smtp (Exim 4.52) id 1FZTMH-0002zN-Df; Fri, 28 Apr 2006 14:50:09 +0100 Received: from [82.41.253.30] (helo=[192.168.0.2]) by asmtp-out3.blueyonder.co.uk with esmtp (Exim 4.52) id 1FZTMC-0001uZ-Bp; Fri, 28 Apr 2006 14:50:04 +0100 Message-ID: <44521D8B.30104@dial.pipex.com> Date: Fri, 28 Apr 2006 14:50:03 +0100 From: Alex Zbyslaw User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.7.12) Gecko/20060305 X-Accept-Language: en MIME-Version: 1.0 To: fbsd@globalmegahost.com References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: How do I swap tape drives (sa0) without rebooting? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Apr 2006 13:50:12 -0000 fbsd@globalmegahost.com wrote: >Hello list. > >I have a freebsd 6.1-RC1 machine that I am using to test bacula and >various tape drives. If the machine boots up while the tape drive is >attached and powered up, the tape drive is recognized. If I turn off the >tape drive and attach a different drive, I cannot seem to convince the OS >that a tape drive is present. What am I doing wrong? > > All I can say is that under 5.4 (and many versions before) the following works for me. I don't have 6-anything as yet. 3 {root @ cartman} # /sbin/camcontrol rescan 0 Re-scan of bus 0 was successful 3 {root @ cartman} # /sbin/camcontrol devlist at scbus2 target 0 lun 0 (pass0,cd0) at scbus2 target 1 lun 0 (pass1,cd1) Turn on SCSI tape drive (an HP DAT fwiw). 4 {root @ cartman} # /sbin/camcontrol rescan 0 Re-scan of bus 0 was successful 5 {root @ cartman} # /sbin/camcontrol devlist at scbus0 target 3 lun 0 (pass2,sa0) at scbus2 target 0 lun 0 (pass0,cd0) at scbus2 target 1 lun 0 (pass1,cd1) And message in my console as well. Then turn it back off 7 {root @ cartman} # /sbin/camcontrol rescan 0 Re-scan of bus 0 was successful 8 {root @ cartman} # /sbin/camcontrol devlist at scbus2 target 0 lun 0 (pass0,cd0) at scbus2 target 1 lun 0 (pass1,cd1) And message in console about it going away. You mentioned termination. The documentation for your tape drive will tell you if you need it (I though modern stuff was self terminating, but I don't have any modern stuff to confirm that :-)). If not, then maybe you do need a terminator. Or maybe the tape drive is knackered ;-( --Alex PS You should use "all" instead of "0" in the above; I just know where my tape drive is. Also, it takes about 10 seconds from power on for the drive to show up. A rescan inside 10 secs and nothing shows up.