Accessing tape drive using passthrough driver

Kenneth D. Merry ken at kdm.org
Mon Mar 22 10:07:24 PST 2004


On Mon, Mar 22, 2004 at 18:06:36 +0100, Marco Senft wrote:
> I'm currently using a HP DAT24 tape drive which is working fine when 
> using standard unix tools like mt, tar or dump. Here's the dmesg output 
> concerning the tape drive:
> 
> ahc1: <Adaptec 2940 SCSI adapter> port 0xe000-0xe0ff mem 
> 0xd8020000-0xd8020fff irq 11 at device 11.0 on pci0
> aic7870: Single Channel A, SCSI Id=7, 16/253 SCBs
> sa0 at ahc1 bus 0 target 6 lun 0
> sa0: <HP C1537A L105> Removable Sequential Access SCSI-2 device
> sa0: 10.000MB/s transfers (10.000MHz, offset 15)
> 
> However, we recently bought a software called "TapeWare" (Version 7) 
> which does not recognize the drive. The technical support of the 
> manufacturer told me that I am "accessing the tape drive currently 
> through ST but this is no way for Tapeware to access the drive." I 
> should use the SG driver instead. This sounds like they're talking of 
> Solaris stuff, and recommended me to "just look at your OS documentation 
> on how to load up SG vs ST".
> 
> If I understand this correctly, these drivers are called "sa" and "pass" 
> in the FreeBSD world. I'm using the GENERIC 4.7-RELEASE kernel 
> currently, which is compiled with both the "sa" and the "pass" devices.
> 
> There are some "pass" devices under /dev:
> 
> > ls -la /dev/pass*
> crw-------  1 root  operator   31,   0 Oct 21  2002 pass0
> crw-------  1 root  operator   31,   1 Oct 21  2002 pass1
> crw-------  1 root  operator   31,   2 Oct 21  2002 pass2
> crw-------  1 root  operator   31,   3 Oct 21  2002 pass3
> 
> I have four hard drives attached to the first controller, don't know if 
> this has any influence on the list above.
> 
> 
> So if someone just could tell me if and how I can make sure that the 
> tape drive is accessible using the "pass" driver, I'd be really happy.

Under FreeBSD, most tape comands (mt, tar, dump) talk to the sa(4) driver,
which presents a block interface to userland.

SCSI passthrough does go through the pass(4) driver, as you've figured out.

You can type 'camcontrol devlist' to see which pass(4) driver instance is
attached to the tape drive.  If you only have those 4 passthrough devices
in /dev, you may need to create more.  To do that, type:

cd /dev
sh MAKEDEV pass8

Where 8 is the number of passthrough devices you want to make.  (So you'll
wind up with pass0 - pass7.)

To see if you can talk to your tape drive via the passthrough driver, type:

camcontrol tur sa0 -v

If you get "Unit is ready" or some SCSI sense information, you can talk to
the drive.  Otherwise you'll get another error that means you probably need
to create the device node.

Anyway, that said, the SCSI passthrough interface under FreeBSD is
different than the Linux or Windows, so they'll have to support the FreeBSD
passthrough interface in order for it to work.

They claim FreeBSD support on their web site, so it may work.  (It isn't
clear whether FreeBSD support is just for backup clients or for the backup
server machine as well.)

Ken
-- 
Kenneth Merry
ken at kdm.org


More information about the freebsd-scsi mailing list