# SCSI tape drive



## 610bob (Aug 27, 2014)

I have a Dell PowerVault 124T tape library with a LTO3 Quantum tape drive. It is connected to my server via SCSI using a Dell PERC 4e/DC. But when I look for /dev/st0, it is not there. I know it works because it will show up under Ubuntu, and Windows; and I have written to tapes under these OSes. Any help would be greatly appreciated.


----------



## wblock@ (Aug 27, 2014)

Why do you think it would be /dev/st0?  Remember, FreeBSD is not Linux.  In FreeBSD, the tape device is usually /dev/sa0.  See sa(4) and mt(1).


----------



## 610bob (Aug 27, 2014)

Sorry, I mistyped. /dev/sa0 is not there.


----------



## wblock@ (Aug 27, 2014)

What does `camcontrol devlist` say?


----------



## 610bob (Aug 28, 2014)

```
<WDC WD1003FZEX-00MK2A0 01.01A01>  at scbus2 target 1 lun 0 (pass0,ada0)
<HL-DT-ST DVDRAM SP60NB50 1.00>    at scbus3 target 0 lun 0 (pass1,cd0)
<Corsair Voyager GT 3.0 0.00>      at scbus4 target 0 lun 0 (da0,pass2)
```

All of my drives are listed there, except for my tape drive obviously.


----------



## wblock@ (Aug 28, 2014)

Did you run Ubuntu and Windows on this exact same server, or were they on different hardware?  More specifically, is the SCSI hardware identical, or might there be a termination or controller configuration difference?


----------



## 610bob (Aug 28, 2014)

I just ran a live CD of Ubuntu, and it was there as /dev/st0. I could get status of the tape drive and even use mtx to get status of the library. Windows however is another server. I also tried Mint on another computer (but with the same SCSI card as the Ubuntu and FreeBSD). When it booted, the library started moving, but Mint hung at boot. Could that be a sign of a hardware problem? But with Windows (using Cygwin), it worked fine. I wrote to a couple of tapes with it.


----------



## wblock@ (Aug 28, 2014)

The tape drive works, then.  It would be helpful to identify which SCSI controller is involved.  Realize that even identical controllers can be set up differently, with different termination or on-board BIOS settings.


----------



## 610bob (Aug 28, 2014)

I have two servers. Server 1 is the Windows machine. It is a Dell Poweredge 6850 that contains an on motherboard  PERC 4e/Di SCSI controller. The tape drive works perfectly. Server 2 is a custom built server that uses a Dell PERC 4e/DC PCIe SCSI card. FreeBSD doesn't see the drive, Linux Mint stalls out trying to access the drive on boot but Ubuntu works fine. All OSes were  tested without modifying any settings.

Both servers use the same cable and terminator. Also, the tape drive is the only SCSI device on that port. I can run FreeBSD on server 1 tonight to see if it just a wonky SCSI card (which admittedly, I should have done before).


----------



## wblock@ (Aug 29, 2014)

Termination is needed at both ends of the bus.  Some controllers do this automatically, on some it can be disabled, and some have termpower fuses or jumpers that also need to be set correctly.

Again, the BIOS on the SCSI controller also matters.  Some can be set to scan a limited number of devices to reduce booting time, and devices outside of that range will not be seen.


----------



## 610bob (Aug 29, 2014)

I looked over all of the setting within the SCSI BIOS. It all looks fine. The SCSI BIOS also sees the tape drive. Wouldn't that and the fact that Ubuntu works fine say that it is configured properly?

I tried FreeBSD on server 1. The tape drive still wasn't listed. I did `camcontrol devlist` and my SCSI drives weren't listed (however it was listed in the installation). Also, I installed FreeBSD on a USB drive. Also to increase weirdness, Mint worked fine on server one. I don't care about mint, just using it to help determine the source of the problem.


----------



## Terry_Kennedy (Sep 16, 2014)

610bob said:
			
		

> I looked over all of the setting within the SCSI BIOS. It all looks fine. The SCSI BIOS also sees the tape drive. Wouldn't that and the fact that Ubuntu works fine say that it is configured properly?
> 
> I tried FreeBSD on server 1. The tape drive still wasn't listed. I did `camcontrol devlist` and my SCSI drives weren't listed (however it was listed in the installation).


You are trying to use simple SCSI command passthru to a device on a hardware RAID controller. Whether this works or not depends on whether the driver has knowledge about how to do command passthru on that specific hardware and firmware combination. I believe the PERC 4 controllers were AMI MegaRAID  boards with custom Dell firmware. They are long out of production (nearly 10 years) and the company that made them has been sold several times since.

As another example, the modern PERC H700 controller (SAS/SATA) uses the FreeBSD mfi(4) driver, and in order to expose the passthru interface to the individual drives (for example, for sysutils/smartmontools, you need to `kldload mfip`. But that only gets you pass(4) devices, it won't make a SAS tape drive appear if one is connected.

Your best bet would be to use an add-in parallel SCSI card, if your system doesn't include a built-in "dumb" SCSI port. For example, the Dell PowerEdge 1550 has a simple SCSI port on the motherboard, and if the system has the optional PERC 3/DC controller, the internal drive bays are cabled to that controller and the motherboard's SCSI port is left unconnected. In that case, a simple SCSI cable from that connector to an expansion slot bracket is all you need.


----------

