From owner-freebsd-questions Tue May 19 09:25:34 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA19209 for freebsd-questions-outgoing; Tue, 19 May 1998 09:25:34 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from pau-amma.whistle.com (s205m64.whistle.com [207.76.205.64]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA19192 for ; Tue, 19 May 1998 09:25:28 -0700 (PDT) (envelope-from dhw@whistle.com) Received: (from dhw@localhost) by pau-amma.whistle.com (8.8.7/8.8.7) id JAA04563; Tue, 19 May 1998 09:24:25 -0700 (PDT) (envelope-from dhw) Date: Tue, 19 May 1998 09:24:25 -0700 (PDT) From: David Wolfskill Message-Id: <199805191624.JAA04563@pau-amma.whistle.com> To: druber@mail.kersur.net, freebsd-questions@FreeBSD.ORG Subject: Re: scsi tape status? Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >Date: Mon, 18 May 1998 20:54:14 -0400 (EDT) >From: Dan Swartzendruber >Is there any way to get the online/offline status for a SCSI DAT drive? >I'm running 2.2.6 and am trying to get multi-tape support to work for >Amanda 2.4.0, but the multi-device script uses 'mt status' to probe for >the status of the drive. Unfortunately, 'mt status' doesn't seem to >print anything other than density/compression information (certainly >nothing that seems related to whether there is a cartridge in the drive). I was recently looking around in the same area, for a similar reason -- I have a home-grown PErl script I've used for backups on various systems, and since I tend to stack multiple files on a given cartridge, I ahd been using "mt status" to report the file number (position). Unfortunately, I found (when I brought the Perl script over to the FreeBSD environment), "mt status" doesn't report that. I tried hacking "mt.c" to report what was in the struct mtget (see /usr/include/sys/mtio.h), but the "file" & "block" numbers are in the "not yet implemented" section, as borne out by the results I was getting -- 0, even after "mt -f /dev/nrst0 fsf". And I didn't see anything in that struct that would indicate o{ff,n}line status, sorry. david -- David Wolfskill dhw@whistle.com (650) 577-7158 pager: (650) 371-4621 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message