LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   no /dev/st0 for scsi tape on RH8.0 (https://www.linuxquestions.org/questions/linux-hardware-18/no-dev-st0-for-scsi-tape-on-rh8-0-a-50933/)

dkinzer 03-20-2003 09:35 PM

no /dev/st0 for scsi tape on RH8.0
 
With the tape drive installed, if I try 'mt -f /dev/st0 status' I get the message that there is no such device. I'm stumped.

I have tried two different SCSI cards (Adaptec 2940 and Adaptec 2940U) and two different tape drives (HP C1533A and Seagate CTT8000I). In all four combinations, the drive is found during the scan at ID=1. There are no other devices on the cable. With the HP drive on, I had the cable terminated (at different times, active and passive). With the Seagate drive on I had it set for internal active termination enabled.

In /var/log/messages, there are entries immediately following those related to the SCSI controller that suggest that Linux sees the drive. For example, with the HP drive attached:

Vendor: HP Model: C1533A Rev:9406
Type: Sequential-Access ANSI SCSI revision:02

Still, no /dev/st0.

It's probably something simple that I'm overlooking. Any tips or suggestions would be most appreciated

Don

fsbooks 03-20-2003 10:08 PM

I'm using RH7.3. Does your 8.0 use devfs? Not having used devfs, does it not eliminate the need to premake all the necessary devices? I only say that so the following is used carefully if things have changed from my experience.

You should just be able to make it, using MAKEDEV. That would be my first choice. However, I just discovered when checking my own system that much to my surprise this RPM is not even installed on my system. Instead, my computer's device files were installed from dev-3.3-4.i386.rpm. So, you could see if you have either or both of these installed (at the appropriate level). See if dev does not provide /dev/st0.

dkinzer 03-21-2003 01:26 AM

/dev/st0 does exist...
 
and has permissions 'crw-rw-rw-', owned by 'root', with group 'disk'. This is why I'm puzzled. The error message from the mt command says that the device doesn't exist.

Perhaps the group should be something other than 'disk'?

Mik 03-21-2003 03:45 AM

Well the messages you mentioned in the /var/log/messages mean that the scsi driver found the tape device. In addition to that you should have a scsi tape driver loaded which handles the rest. Usually this would be the module st. After the module is loaded you should see something like this in /var/log/messages:

st: Version 20011103, bufsize 32768, wrt 30720, max init. bufs 4, s/g segs 16
Attached scsi tape st0 at scsi0, channel 0, id 4, lun 0

Well if you don't get the above messages then it explains why you get the error message device doesn't exist. So try loading the module or compiling the module if it's not already compiled.

dkinzer 03-21-2003 11:31 AM

st module
 
The lsmod command showed that st was not loaded. I did 'insmod st' and then lsmod showed (among others)

st 30768 0 (unused)
scsi_mod 107176 2 [st ide-scsi]

Afterward, 'mt -f /dev/st0 status' still responds '/dev/st0: No such device'.

The permissions on /dev/st0 changed to 'crw-rw----'.

fsbooks 03-22-2003 11:37 AM

Hmm, it probably is simple, usually it is. But how to find that simple answer is always the problem. The following is just additional information and thoughts, mostly just grasping at thinner and thinner straws :-) But one never knows.

Is the tape drive turned on at boot time?

When you loaded the module, did you get kernel messages. In other words, did the kernel notify you that st0 was attached? Like Mik I get the following in my /var/log/messages (similarly in /var/log/dmesg):

kernel: st: Version 20020205, bufsize 32768, wrt 30720, max init. bufs 4, s/g segs 16
kernel: Attached scsi tape st0 at scsi0, channel 0, id 4, lun 0

The "unused" you get with lsmod makes me suspicious. Is the low-level driver for the controller card loaded? Do you have other scsi devices that DO work? If so, are scsi ids different for each devices for each card? My scsi driver is compiled in the kernel, not as a module, but if yours is a module you may need something like the following in modules.conf:

alias scsi_hostadapter aic7xxx

Also the following might help in loading the st module for /dev/st0 and /dev/nst0:
alias char-major-9-0 st
alias char-major-9-128 st

I am using a different tapedrive (Exabyte), but also on a Adaptec 2940 adapter. It shows this in /etc/sysconfig/hwconf:

class: TAPE
bus: SCSI
detached: 0
device: st
driver: ignore
desc: "Exabyte EXB-8200"
host: 0
id: 4
channel: 0
lun: 0

Also, does it show up in /proc/scsi/scsi? What I have is consistent with your output from /var/log/messages:

Host: scsi0 Channel: 00 Id: 04 Lun: 00
Vendor: EXABYTE Model: EXB-8200 Rev: 262S
Type: Sequential-Access ANSI SCSI revision: 01 CCS

How about /proc/scsi/sg/devices? The appropriate line is displayed from mine (with device_hdr for reference).

host chan id lun type opens qdepth busy online
0 0 4 0 1 0 2 0 1

Does it show up in /proc/scsi/sg/device_strs? I get:

EXABYTE EXB-8200 262S

Information on the tape drive should also show up in this file:/proc/scsi/aic7xxx/0 (assuming it is attached to an adapter controller as first adapter).

I also have /dev/tape symlinked to /dev/nst0 (no norewind tape device, since that is the only one I am interested in generally). I don't know that having this link makes a difference, and would not think it would.

Hopefully this gives some things to look at in any case, let us know, of course. Good luck.

michaelk 03-22-2003 03:08 PM

Do you have a /dev/tape?
Do you have anything in /dev like this:
/dev/scsi/host0/bus0/target1/mt

If so you can create links from the above to /dev/st0

I remember a previous post awhile back that had problems with a SCSI device since they were also using scsi emulation. Of course I don't remember the fix either.

rnturn 03-23-2003 11:59 PM

Re: no /dev/st0 for scsi tape on RH8.0
 
Quote:

Originally posted by dkinzer
With the tape drive installed, if I try 'mt -f /dev/st0 status' I get the message that there is no such device. I'm stumped.

...

It's probably something simple that I'm overlooking. Any tips or suggestions would be most appreciated

Have you run /sbin/stinit to initialize the tape drive? I do the drive initialization with stinit by calling a script in rc.sysinit just after the place where the SCSI tape is detected and the module is loaded. It seems to be necessary to run stinit in order for things like tar, cpio, etc. to work properly.

(Why a script? Because the DDS drive I'm using seems to hang if it's initialized with a tape loaded. So I look for that and eject it. The script keeps all this stuff from getting wiped out should I upgrade. You may not have to deal with this.)

sbctec 05-05-2003 10:06 AM

- ll /dev/st0
Make sure st0 has major device 9 and minor device 0.
Your permissions shouldn't matter if you are logged in as root, so that's what I would use for testing purposes.

Then try making your own device
- mknod -m 660 /dev/tape c 9 0 (for auto-rewind)
- mknod -m 660 /dev/tape c 9 128 (for no rewind)

This works fine for me, but I'm running 7.2

jchristman 01-20-2004 03:30 PM

Has this been solved. I have the same problem on RH9 except everyting I look for shows it there from the messages to the proc but when trying to use any command that would use this device errors. mt -f /dev/st0 rewind,erase or what ever does not work


All times are GMT -5. The time now is 03:34 AM.