Mar 292014
 

I am fortunate to receive donations. In the early days, it was a 386 desktop. Later, it was SCSI drives. Recently, it’s been tape libraries. A Bacula user in Europe donated an Overland DLT-8000 tape library in 2012 and paid for shipping to me. At BSDCan 2013, I was fortunate to pick up an Compaq StorageWorks MSL5026 SDLT tape library and it has sat unused.

It’s dead Jim

A few weeks back, the tape drive in the Overland stared acting up. I kept getting Error: Error writing final EOF to tape. This Volume may not be readable errors, sometimes for several tapes in a row. The European donor had sent two other DLT-8000 drives with the tape library. Both turned out to be unusable. One could not be seen by the OS, the other could be seen, but could never complete calibration.

Rather than find a replacement, DLT-8000 drive, I decide to use the SLDT. Peter Sjoberg put it this way: The SDLT will write twice as fast as the DLT-8000 and put three times the data into an SDLT tape than a DLV IV tape.

Sold!

I have about 300 DLT IV tapes and I’ve been a fan of DLT since my first introduction to a DLT-7000 tape drive. DLT-7000 was introduced in 1996, DLT-8000 in 1999, and SDLT in 1998. That said, I am hoping to move to LTO as soon as one comes available.

Knowing that I have about 100 or so SDLT tapes, hopefully I have enough space to to correspond to my existing tape library.

Finding the right SCSI card

I am not great at SCSI. There are many types of cards and connectors. I rely on others for help. But then, I did file a PR back in 2003 regarding data loss in the pthreads driver. If you search, you’ll find me asking about SCSI every few years.

I needed an LVD/SE PCI SCSI card with an external VHDCI connector. That sounds easy to find, but I had trouble. I didn’t know all the right terms and I am always mixing up LVD and HVD. It has to be PCI bus, because the motherboard will take a longer card. I eventually found, with Peter’s help, this 32-bit PCI SCSI Adapter by Symbios for US$15.

Hooking up the card

I’ve had good success with Symbios cards, having used one with the Overland tape library. Here is a paste from the server details with the old card:

sym0: <875> port 0xe000-0xe0ff mem 0xfebeec00-0xfebeecff,0xfebef000-0xfebeffff irq 21 at device 3.0 on pci4
sym0: Symbios NVRAM, ID 7, Fast-20, SE, parity checking
sym0: open drain IRQ line driver, using on-chip SRAM
sym0: using LOAD/STORE-based firmware.

After installing the card and hooking up the cables, I powered up FreeBSD 9.2 and found this in /var/run/dmesg.boot:

sym0: <895> port 0xe000-0xe0ff mem 0xfebeec00-0xfebeecff,0xfebef000-0xfebeffff irq 22 at device 2.0 on pci4
sym0: Symbios NVRAM, ID 7, Fast-40, LVD, parity checking
sym0: open drain IRQ line driver, using on-chip SRAM
sym0: using LOAD/STORE-based firmware.

And this in the output of pciconf -lv

sym0@pci0:4:2:0:        class=0x010000 card=0x10101000 chip=0x000c1000 rev=0x02 hdr=0x00
    vendor     = 'LSI Logic / Symbios Logic'
    device     = '53c895'
    class      = mass storage
    subclass   = SCSI

But I could not see the tape drive, only the tape libray:

$ sudo camcontrol amcontrol devlist
<COMPAQ MSL5000 Series 0520>       at scbus7 target 3 lun 0 (pass10,ch0)

That last item is in my tape library. The tape drive isn’t showing up. I had this same problem back in 2010 with another tape library. It was a cabling problem.

I swapped around the cables, but that didn’t help.

Call for help

I didn’t know what was wrong. So I consulted the FreeBSD SCSI mailing list. Matthias Andree replied to my post. He went to the trouble of downloading the manual and pointed me in the right direction.

NOTES:

What was the problem?

I was connected only to the library and didn’t have the drive connected into the SCSI chain.

Doh!

This is a basic mistake. Here’s my original connection, and what I saw when I looked at the back of the tape drive. I saw only two connectors. Just by altering my view, a little bit, the other connectors came into view. This is a pic of the proper cabling added in.

device.hints

One of the great things about /boot/device.hints is the ability to present a given piece of hardware as a specific device to the operating system. This means that inserting a new device won’t renumber the other other devices, thus playing havoc with any software configuration settings.

By default, the system is putting the tape drive at sa0 and the changer at ch0 (pass11). That’s good for now, but if I ever add another device, I want to ensure I get those values.

Given these bus, target, and lun values:

<COMPAQ SuperDLT1 5F5F>            at scbus7 target 1 lun 0 (sa0,pass10)
<COMPAQ MSL5000 Series 0520>       at scbus7 target 3 lun 0 (pass11,ch0)

I added these entries to /boot/device.hints:

# sa0 should be the Compaq library
hint.sa.0.at="scbus7" 
hint.sa.0.target="1" 
hint.sa.0.unit="0" 

# ch0 is the Compaq auto-changer
hint.pass.11.at="scbus7" 
hint.pass.11.target="3" 
hint.pass.11.unit="0"

If I had set sa.1 or pass.13, the devices would have been sa1 and pass13, respectively.

Testing the tape drive

I went back to my old notes to figure out the commands to test this new library. My first attempt failed:

$ sudo btape -c /usr/local/etc/bacula-sd.conf /dev/nsa0
Tape block granularity is 1024 bytes.
29-Mar 19:23 btape: ERROR TERMINATION at parse_conf.c:918
Config error: Cannot open config file "/usr/local/etc/bacula-sd.conf": No such file or directory

Ahh, that’s because the file was moved into a subdirectory (with this commit). Let’s try again:

$ sudo btape -c /usr/local/etc/bacula/bacula-sd.conf /dev/nsa0
Tape block granularity is 1024 bytes.
btape: butil.c:290 Using device: "/dev/nsa0" for writing.
29-Mar 19:26 btape: Fatal Error at device.c:298 because:
dev open failed: dev.c:513 Unable to open device "DTL03" (/dev/nsa0): ERR=Device not configured

29-Mar 19:26 btape JobId 0: Fatal error: butil.c:195 Cannot open "DTL03" (/dev/nsa0)

What? Yeah, just check your notes… you need a tape loaded in there.

$ sudo /usr/local/sbin/mtx-changer /dev/pass11 load 1 /dev/nsa0 0
Password:
Loading media from Storage Element 1 into drive 0...done

The full output of the test is here.

With the testing done…

With that testing done, I ran a few simple backups and restores. I compared what was on disk to what I restored from tape. It matched.

Right now, there are 36 copy-from-disk-to-tape queued up for running. I’ll evaluate that process and then decide how to proceed later.

But it all looks good right now.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive