Adding a SCSI tape drive using the cciss driver in SLES

  • 3611352
  • 12-Apr-2007
  • 27-Apr-2012


SUSE Linux Enterprise Server 9 (SLES 9)
SUSE Linux Enterprise Server 10 (SLES 10)
SUSE Linux Enterprise Server 10 (SLES 11)
cciss driver for HP/Compaq's SMART Array Controller


After adding a SCSI tape drive using the cciss driver an attempt to access the tape drive returns: "/dev/st0: Cannot open: No such device", "/dev/st0: No such file or directory", or "/dev/st0: Input/Output error"


The cciss driver is documented in the file /usr/src/linux/Documentation/cciss.txt - this covers all
aspects of how to use the driver for block and sequential devices.

The first thing to note is that by default, the cciss driver will not identify a SCSI tape device
when booting the Linux kernel. Details as to why this is the case can be found in the cciss.txt file -
the important thing to note here is that a couple of steps need to be taken so that the tape drive
will be seen each time the system is rebooted. Otherwise, attempts to access the tape drive will fail,
even though it is correctly attached to the SCSI bus.

The first step is to inform the SCSI driver to scan for additional devices (this is referred to in
the documentation as engaging the SCSI core.) To do this, edit the file /etc/init.d/boot.local, and
add the following lines:

for x in /proc/driver/cciss/cciss[0-9]*
echo "engage scsi">$x

After you have finished the edit, reboot the system.

In a majority of cases, this should allow the tape drive to be accessed. You can verify that the tape drive is working by
running the following command:

# mt -f /dev/st0 status

This should report that the device is active - if an error is returned, then some additional troubleshooting is needed.

First, look at the /proc/scsi/scsi file:

# cat /proc/scsi/scsi

You should see output similar to the following:

Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: HP Model: C7438A Rev: V303
Type: Sequential-Access ANSI SCSI revision: 03

This entry corresponds to an HP StorageWorks DAT tape drive.

Another thing to check is that the tape drive is seen during boot:

# dmesg > /tmp/dmesg.out

Examining the dmesg.out file, an entry such as this should appear:

Attached scsi tape st0 at scsi0 channel 0 id 0, lun 0

If the device doesn't show up when running either command, then you can force the driver to rescan the SCSI bus as follows:

# echo "rescan"> /proc/scsi/cciss0/1

You can then try to add the SCSI device to the bus through the SCSI mid layer:

# echo "scsi add-single-device a b c d">/proc/scsi/scsi

a = controller
b = bus
c = target
d = lun

This information can be obtained from the SCSI controller's BIOS output.

If, after performing these steps the tape drive still isn't recognized, then check the BIOS of the SCSI
controller, to make sure the settings are correct. Also consider updating the BIOS on the controller.

Additional Information

Formerly known as TID# 10094676

Change Log

2010-06-02 - swehnert - Updated TID as situation applies to SLES11 as well

Feedback service temporarily unavailable. For content questions or problems, please contact Support.