Amanda-Users

Re: amtapetype problems

2006-08-18 20:08:42
Subject: Re: amtapetype problems
From: Jon LaBadie <jon AT jgcomp DOT com>
To: amanda-users AT amanda DOT org
Date: Fri, 18 Aug 2006 17:57:47 -0400
On Fri, Aug 18, 2006 at 02:45:27PM -0500, Nick Jones wrote:
> I can use mtx to get tape status.  I have not tried to load or unload
> a tape.  Basically, assuming everything works and the problem lies
> with amanda, how do I use amtapetype?  What device do I use?
> 
> Last login: Fri Aug 18 13:40:00 2006 from adams.gige.uiowa.edu
> [root@alienraid ~]# mtx -f /dev/sg1 inquiry
> Product Type: Tape Drive
> Vendor ID: 'HP      '
> Product ID: 'Ultrium 3-SCSI  '
> Revision: 'G24H'
> Attached Changer: No
> [root@alienraid ~]# mtx -f /dev/sg2 inquiry
> Product Type: Medium Changer
> Vendor ID: 'OVERLAND'
> Product ID: 'LXB             '
> Revision: '0107'
> Attached Changer: No
> 
> Trying amtapetype with either of these devices fails.  Any hints?   I
> can try the other things you suggested btw, such as tar or load/unload
> a tape, and will let you know if they don't work.
> 

A tape library consists of several SCSI devices, a minimum of two,
the changer mechanism and the tape drive.  Every SCSI device will
have a Scsi Generic (sg) device associated with it but that 'may'
not be the device used to access the device.  This is because
the specific driver for that kind of device will not attach through
the "generic" device.

For example, external USB disk drives look to the system as SCSI disks.
They will have an "sg" device.  But you can't access files on the disk
with that device.  You need the "sd" device (Scsi Disk) to get a hard
disk driver associated with, and attached to the device.

Tape drive are similar in having an "sg" and another device associated.
In this case the other device will be a Scsi Tape ("st" device).  A
third device name will be "nst" for "No rewind on close Scsi Tape".

Tape changers use a simple enough set of scsi commands that usually
they don't need a separate driver and you can use the "sg" device
for the changer (It looks like /dev/sg2 in your case).  You might
also look for a /dev/changer, or make one, that is a link to /dev/sg2

If you only have one tape drive, its device is probably /dev/st0 (and
/dev/nst0).  These are the tape drive devices amanda wants, particularly
the "nst" version.  Amanda assumes the tape stays where it is unless
amanda issues a rewind.

So your amtapetype command should probably be something like:

        amtapetype -f /dev/nst0 -e 400g

Do not forget the -e 400g option.  Otherwise amtapetype will take
forever to complete (days).  As it is, it should take 4-8 hrs.

-- 
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>