Let me preface this with I'm not a Linux person. But I've been around
OS's long enough to make some educated guesses.
>I think, the first scsi device is sg0, the second is sg1 etc.
That's certainly possible.
>here the result from mtx with sg6 and sg7
>
>root@fileserver: > mtx -f /dev/sg6 status
>mtx: Request Sense: 70 00 02 00 00 00 00 16 00 00 00 00 04 00 00 00 00 00 00
>00
>mtx: READ ELEMENT STATUS Command Failed
>
>root@fileserver: > mtx -f /dev/sg7 status
>Data Transfer Element: Full (Storage Element 7 Loaded)
>...
What you're seeing here is that sg7 is truly the changer, which accepts
raw SCSI commands like "READ ELEMENT STATUS", and that sg6 might be
the tape device, but it doesn't do changer type commands (which is no
surprise), hence the error.
>root@fileserver:/ > mtx -f /dev/sg6 status
>mtx: Request Sense: 70 00 02 00 00 00 00 16 00 00 00 00 04 00 00 00 00 00 00
>00
>mtx: READ ELEMENT STATUS Command Failed
>
>root@fileserver:/ > mtx -f /dev/nst0 status
>mtx: Request Sense: 70 00 02 00 00 00 00 16 00 00 00 00 04 00 00 00 00 00 00
>00
>mtx: READ ELEMENT STATUS Command Failed
See above. Mtx "status" sends changer SCSI commands to a device (although
"info" is a generic command all devices support). So you can't use mtx
to talk to the tape drive except with some specific commands -- "status"
isn't one of them, "info" probably is.
>Is /dev/sg6 and /dev/nst0 the same, eg. the tape?
They might end up talking to the same physical device, but you cannot
use mtx (in general) to talk to /dev/nst0 and you cannot use mt to talk
to /dev/sg6. Mt sends the tape driver ioctl's to do generic types of
things (e.g. "rewind"). The driver translates those to the appropriate
tape (SCSI, in this case) commands. Amanda (other than chg-scsi) needs
a real tape device it can issue mt-like ioctl's to. So you've got to
get /dev/nst0 fixed.
Chg-scsi can issue raw SCSI commands to a device and bypass the st driver,
which is why you give it the sg* names. So with Amanda and chg-scsi,
you need both to work properly.
Put another way, the /dev/nst0 driver is at one level between an
application and the tape device, the /dev/sg* driver is at the next
level "down" (closer to the device):
Application (e.g. mt or Amanda, other than chg-scsi)
st driver
sg driver
physical device
You said:
>as user amanda and as user root after typing "mt-f /dev/nst0 rewind" this
>error message is displayed:
>mt: /dev/nst0: Input-/output error
>...
>I think the device /dev/nst0 is demaged.
I agree that your /dev/nst0 entry might be wrong. It's probably still
telling the tape driver to talk to SCSI ID 5, which is why it hung --
disk drives don't like to be told to rewind :-). I don't know how
you tell Linux to regenerate /dev entries. Maybe if you just remove
(or rename would be safer) it, it will come back on the next reboot?
>Bye Juergen
John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]