view · edit · print · history

Real servers need tape drives

but these are typically SCSI devices. I bought a Microtech Xpress USB to SCSI converter (USB-SCSI-HD50) on eBay and it works perfect both in Win 2k and Linux. It seemed however necessary to initialize the device once using the original drivers in Windows.

The tape drive, here a HP DAT, resides in an old external SCSI case. Hardware detection is perfect after attaching the drive and the adaptor to the Slug:

 hub.c: new USB device 00:01.1-2.1, assigned address 8
 Protocol: Transparent SCSI
 before kernel thread
 *** detect:usb-storage
 * scsi_register: usb-storage-0,
 * scsi_reg, hostno:0 prot is 50
 * scsi_reg, retval->host_no:0
 scsi0 : SCSI emulation for USB Mass Storage devices
 *** 50
 is removable disk
 Vendor: HP Model: C1537A Rev: L111
 Type: Sequential-Access ANSI SCSI revision: 02
 WARNING: USB Mass Storage data integrity not assured
 USB Mass Storage device found at 8

Whats missing? The Linux st tape driver... it is not (yet) included in Unslung but of course it is part of the Linux kernel. So you need to install OpenEmbedded and change the following lines in the kernel defconfig file to include the missing driver:

< # CONFIG_CHR_DEV_ST is not set
-change to--> CONFIG_CHR_DEV_ST=m

Since the st driver needs kernel devfs support, we enable this as well (and this makes reflashing of the complete firmware necessary):

< # CONFIG_DEVFS_FS is not set
-change to--> CONFIG_DEVFS_FS=y

An excellent description of this process is here: AddUsbWebcam. After the build, flash the new firmware (better test it first using the TFTP to memory method described here: TestAnImageInRamUsingRedBoot) and copy st.o to /opt/lib/modules on the slug.

Create a device file with mknod /dev/st0 c 9 0 and load the driver with insmod st.o

 st: Version 20030406, bufsize 32768, max init. bufs 4, s/g segs 16
 Attached scsi tape st0 at scsi0, channel 0, id 6, lun 0
 st0: Block limits 1 - 16777215 bytes.

Then use tar (the busybox version will do, but the full version does better) like this: tar cf /dev/st0 * to backup, and mt (included in the cpio package) to control the tape drive. It works like a charm.

view · edit · print · history · Last edited by tman.
Originally by StefanWillmeroth.
Page last modified on June 20, 2005, at 06:13 PM