3

The problem

I've got an Overland ArcVault connected to my system (actually a virtual machine, with the standalone SCSI card it's connected to in passthrough mode), but it seems like the named tape device nodes (something like /dev/st0 or /dev/nst0) i'd expect to see are not being created, and the few nodes that are created don't fully work right.

In particular, I see five devices being created, /dev/sg0 through sg4.

sg0, 1, and 2 represent the virtual disk drives connected to the VM.

sg4 is the device that represents the tape library itself, and it works correctly - that is, I can use commands like mtx to control it.

From the boot messages, sg3 is the actual drive itself, but it resists all attempts at access. Attempts to do things like mt -f /dev/sg3 rewind always return an Operation not permitted error. I've verified that the library has mounted a tape in the drive, and have tried this with all of the sg* devices.

There also exists a /dev/tape/by-id/scsi-200900d09126c0024, but this is just a symlink to the library at sg4.

The question

How do I actually access the tapes, and why can't my system pick it up?

The Background


lsscsi

[1:0:0:0]    cd/dvd  NECVMWar VMware IDE CDR10 1.00  /dev/sr0
[2:0:0:0]    disk    VMware   Virtual disk     1.0   /dev/sda
[2:0:1:0]    disk    VMware   Virtual disk     1.0   /dev/sdb
[3:0:1:0]    tape    HP       Ultrium 4-SCSI   W51H  -
[3:0:1:1]    mediumx OVERLAND NEO Series       0510  -

(note: no special device node created)

relevent dmesg

[    3.666897] scsi host3: ioc0: LSI53C1020A A1, FwRev=01032700h, Ports=1, MaxQ=255, IRQ=16
[    4.558084] scsi 3:0:1:0: Sequential-Access HP       Ultrium 4-SCSI   W51H PQ: 0 ANSI: 5
[    4.558334] scsi target3:0:1: Beginning Domain Validation
[    4.565558] scsi 3:0:1:0: mptspi: ioc0: IDP:ON
[    4.565635] scsi 3:0:1:0: mptspi: ioc0: IDP:ON
[    4.565711] scsi 3:0:1:0: mptspi: ioc0: IDP:ON
[    4.565787] scsi 3:0:1:0: mptspi: ioc0: IDP:ON
[    4.565863] scsi 3:0:1:0: mptspi: ioc0: IDP:ON
[    4.565938] scsi 3:0:1:0: mptspi: ioc0: IDP:ON
[    4.566013] scsi 3:0:1:0: mptspi: ioc0: IDP:ON
[    4.566088] scsi 3:0:1:0: mptspi: ioc0: IDP:ON
[    4.566164] scsi 3:0:1:0: mptspi: ioc0: IDP:ON
[    4.624137] scsi target3:0:1: Ending Domain Validation
[    4.624361] scsi target3:0:1: FAST-160 WIDE SCSI 320.0 MB/s DT IU RTI PCOMP (6.25 ns, offset 64)
[    4.628877] scsi 3:0:1:1: Medium Changer    OVERLAND NEO Series       0510 PQ: 0 ANSI: 5
[    7.888235] scsi 3:0:1:0: Attached scsi generic sg3 type 1
[    7.888784] scsi 3:0:1:1: Attached scsi generic sg4 type 8

(so the tape drive lives at 3:0:1:0, which looks like it would be sg3)

tapeinfo, sg4

Product Type: Medium Changer
Vendor ID: 'OVERLAND'
Product ID: 'NEO Series      '
Revision: '0510'
Attached Changer API: No
SerialNumber: '2B31000036'
SCSI ID: 1
SCSI LUN: 1
Ready: yes

tapeinfo, sg3

Product Type: Tape Drive
Vendor ID: 'HP      '
Product ID: 'Ultrium 4-SCSI  '
Revision: 'W51H'
Attached Changer API: No
SerialNumber: 'MXP113433K'
MinBlock: 1
MaxBlock: 16777215
SCSI ID: 1
SCSI LUN: 0
Ready: yes
BufferedMode: yes
Medium Type: Not Loaded
Density Code: 0x46
BlockSize: 0
DataCompEnabled: yes
DataCompCapable: yes
DataDeCompEnabled: yes
CompType: 0x1
DeCompType: 0x1
BOP: yes
Block Position: 0
Partition 0 Remaining Kbytes: 800226
Partition 0 Size in Kbytes: 800226
ActivePartition: 0
EarlyWarningSize: 0
NumPartitions: 0
MaxPartitions: 0

(medium type: not loaded?!)

edit 1

Some more digging, it appears the st kernel module responsible for controlling tape drives is not loaded, nor can I load it.

modprobe st output
modprobe: ERROR: ../libkmod/libkmod-module.c:809 kmod_module_insert_module() could not find module by name='st'
modprobe: ERROR: could not insert 'st': Function not implemented
modprobe: ERROR: ../libkmod/libkmod-module.c:959 command_do() Error running install command for st
modprobe: ERROR: could not insert 'st': Operation not permitted

Is there an apt package containing this module?

1 Answer 1

3

The -generic kernel that comes with Ubuntu does not contain the st module responsible for controlling tape drives. That module can be found in the 'extra' kernel package.

apt-get install linux-image-extra-$(uname -r)
modprobe st

And one dmesg later-

[57218.963458] st: Version 20101219, fixed bufsize 32768, s/g segs 256
[57218.966611] st 3:0:1:0: Attached scsi tape st0
[57218.966614] st 3:0:1:0: st0: try direct i/o: yes (alignment 512 B)
[57218.991321] st 3:0:1:0: [st0] Block limits 1 - 16777215 bytes.

And all is right with the world :)

Aside: This is the kind of thing that would really do well to be included in Ubuntu's documentation. I'd expect a server install image to come with things like tape drive modules already...

1
  • 3
    Ubuntu is kinda crappy in terms of following standards. This would not be an issue in the Red Hat ecosystem.
    – ewwhite
    Oct 4, 2015 at 16:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .