SCSI Tape/Library Problem
Brett I. Holcomb
brettholcomb
Mon May 17 11:43:10 PDT 2004
On Tue, 14 Jan 2003 10:29:05 -0700
Andrew Mathews <andrew_mathews at linux-works.org> wrote:
This is a devfs system and st does not exist. If I trace the /proc/scsi/scsi output back using the host luns and targets it goes to sg1. devfs sees it as sg.
The tape is id 0 on the card, the changer id 1 according to the card's output when it boots and that matches the scsi output (host 1, id 0 and 1).
lr-xr-xr-x 1 root root 36 Jan 14 10:01 /dev/sg1 -> scsi/host1/bus0/target0/lun0/generic
/dev/sg:
total 0
lr-xr-xr-x 1 root root 39 Jan 14 10:01 c0b0t0u0 -> ../scsi/host0/bus0/target0/lun0/generic
lr-xr-xr-x 1 root root 39 Jan 14 10:01 c1b0t0u0 -> ../scsi/host1/bus0/target0/lun0/generic
lr-xr-xr-x 1 root root 39 Jan 14 10:01 c1b0t1u0 -> ../scsi/host1/bus0/target1/lun0/generic
lr-xr-xr-x 1 root root 39 Jan 14 10:01 c1b0t4u0 -> ../scsi/host1/bus0/target4/lun0/generic
> Brett I. Holcomb wrote:
> > I have a Cybernetics tape library (SCSI) with tape drive (also SCSI). I'm attempting to test it with simple commands like tar -cvf /dev/tape0 /somedir. This gives a list of files ,then "write 0 of 1024 blocks, error not recoverable"
> >
> > If i use mt -f /dev/tape0 status I get "operation not permitted).
> >
> > The tape device (see cat /proc/scsi/scsi below) is id 0 on host 1 while the library is ID 1 on host 1. The /dev/sg1 is linked (by gentoo) to the /scsi device so I created a link /dev/tape0 to /dev/sg1.
>
> BZZT! Remove this and link it to /dev/st0 not sg0.
>
> >
> > lr-xr-xr-x 1 root root 36 Jan 14 10:01 /dev/sg1 ->scsi/host1/bus0/target0/lun0/generic
> >
> > Why does mt tell me the operation is not allowed? The /scsi entries have the correct permissions. I'm doing this as root - any ideas?
> > This system is using the devfs file system.
> >
> <snip>
> Because you can't get the status of the changer, (sg0) you can only get
> the status of the drive (st0). Remember that with a library, you'll have
> 2 devices, the tape drive (st0) and the changer (sg0). I wrote a backup
> script for an ADIC 7 tape DLT library that uses tape 1 for Sunday, tape
> 2 for Monday, etc. if you'd like. (it uses xfsdump, you'll need to
> modify it for tar, cpio, or dump)
>
> --
> Andrew Mathews
> ---------------------------------------------------------------------
> 10:22am up 16 days, 13:20, 9 users, load average: 1.05, 1.02, 1.00
> ---------------------------------------------------------------------
> Bachelor:
> A man who chases women and never Mrs. one.
>
More information about the Linux-users
mailing list