Amanda-Users

Re: How to tell if a tape is loaded

2005-11-29 10:15:27
Subject: Re: How to tell if a tape is loaded
From: Jon LaBadie <jon AT jgcomp DOT com>
To: AMANDA Users <amanda-users AT amanda DOT org>
Date: Tue, 29 Nov 2005 10:03:30 -0500
On Tue, Nov 29, 2005 at 06:43:12AM -0800, Yan Seiner wrote:
> 
> I am using a VXA-1 tape drive.
> 
> I've been testing
> 
> mt -f /dev/nst0 load
> 
> which appears to work, returning 0 if the tape is loaded and 2 if it is 
> not....
> 

On a request like this it would be good to know the
OS you are using as different OS's have different tools.


I would consider mt "status" rather than "load".
You might even want to rewind before dumping.

The mt man pages on Solaris and SuSE say:

  EXIT STATUS
     0     All operations were successful.

     1     Command was unrecognized or mt was unable to open  the
           specified tape drive.

     2     An operation failed.


So nearly any mt action seems like a good choice.

-- 
Jon H. LaBadie                  jon AT jgcomp DOT com
 JG Computing
 4455 Province Line Road        (609) 252-0159
 Princeton, NJ  08540-4322      (609) 683-7220 (fax)

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