So, I was recently gifted with a new-to-me Sun V210. Nice fast machine with onboard U160 SCSI and dual 1GHz UltraSPARC IIIi processors. I promptly installed Solaris 10 on it (after finally finding a kludged set of connectors and adapters that actually gave me a working connection to the ALOM serial console) and set about putting it to work. My plan for it is to connect my LTO-2 drive to it, create an iSCSI target for the drive, then connect to the drive via iSCSI on my main server, giving me a drive logically connected directly to the server while actually being, say, at the other end of the house. Having the tape drive and my disk backup pool manaded by the same Bacula storage daemon on the same machine would give me some useful new abilities, but the most important goal is to get the tape drive connected to the main server by a fast enough connection to keep it streaming.
Setting up a point-to-point gigabit connection between the new machine, epsilon3, and the main server, babylon5, was the work of moments. The first obstacle I ran into was that the V210 couldn't see the tape drive. Well, that is, not the V210 per se; a probe-scsi-all from OpenBoot saw the drive just fine. But once booted, Solaris 10 simply would not find the drive nor create device nodes for it. When I finally found the cause for this one, it was a real facepalm.
You see, SCSI comes in a number of flavors, but the distinction that matters to us right now is wide vs. narrow SCSI. Narrow SCSI uses a 50-pin connector with an eight-bit-wide data bus, and uses three-bit device IDs, allowing a device on a narrow SCSI bus to have a SCSI ID from 0 to 7. (By convention, ID 7 is the host controller, leaving 0-6 for other devices.) Wide SCSI uses a 68-pin connector, with a 16-bit data bus and four-bit device IDs, allowing SCSI IDs up to 15. So, only IDs 0-6 are available for narrow SCSi devices; wide SCSI devices can also use 0-6, but can use 8-15 as well, which narrow SCSI devices cannot.
Now, here's the thing: My tape drive (being a wide SCSI device) was configured with SCSI ID 8, the first ID usable only by wide devices. But it turns out that, despite the fact that no hardware manufacturer in the world has shipped a new narrow-SCSI-only device in probably at least the last ten years, Solaris 10 ships with all of the wide-SCSI targets in /kernel/drv/st.conf, the SCSI tape driver configuration file, disabled by default. They're fully enabled and supported in the driver; they're just commented out in the configuration file. So the driver was perfectly capable of talking to the tape drive; it had simply been configured by default not to even look for a tape drive on a wide-SCSI-only ID. Yet ALL modern high-speed tape drives — LTO, DLT, AIT — with SCSI interfaces are wide-SCSI devices.
Go figure.
Anyway, once I found that and fixed it, one more reset boot and I had a full set of device nodes in /dev/rmt, and from there on the drive Just Worked. After some reconfiguring of Bacula, it now dumps a full set of client machine full backups (130GB of data) to a single LTO-1 tape in 90 minutes, and for the first time since I got it, my LTO-2 drive is being fed data fast enough to actually keep it streaming. (And I haven't actually seen yet how fast this setup can dump data to LTO-2 media, on which it should be able to approach twice the transfer rate.)
I still haven't solved the problem of how to create an iSCSI target from a tape device, but that's a battle for another day. Unfortunately, I'm beginning to suspect there simply isn't any way to do it using the iSCSI tools in Solaris 10 — although Solaris 10 can create an iSCSI target that emulates a tape device using a disk backing store. What on earth the point of that is, I must confess, is quite beyond me, as I find myself completely mystified as to why anyone would want to do such a thing.