14.04 ESXi VM 上的磁带驱动器不可用

14.04 ESXi VM 上的磁带驱动器不可用

问题

我的系统上连接了一个 Overland ArcVault(实际上是一个虚拟机,它以直通模式连接到独立的 SCSI 卡),但似乎我希望看到的命名磁带设备节点(类似于/dev/st0/dev/nst0)没有被创建,而且创建的几个节点不能正常工作。

具体来说,我看到/dev/sg0通过正在创建五个设备sg4

sg0, 1,并2代表连接到 VM 的虚拟磁盘驱动器。

sg4是代表磁带库本身的设备,并且它工作正常- 也就是说我可以使用类似的命令mtx来控制它。

从启动消息来看,sg3这是实际的驱动器本身,但它拒绝所有访问尝试。尝试执行的操作总是mt -f /dev/sg3 rewind返回Operation not permitted错误。我已经验证了库已在驱动器中安装了磁带,并已在所有设备上尝试了此操作sg*

还存在一个/dev/tape/by-id/scsi-200900d09126c0024,但这仅仅是指向 处的库的符号链接sg4

问题

我如何才能实际访问磁带?为什么我的系统无法获取它?

的背景


安全接口

[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  -

(注意:没有创建特殊的设备节点)

相关 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

(因此磁带驱动器位于 3:0:1:0,看起来像是sg3

磁带信息,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

磁带信息,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

(中等类型:未加载?!)

编辑1

经过进一步挖掘,似乎st负责控制磁带驱动器的内核模块尚未加载,我也无法加载它。

modprobe st 输出
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

是否有包含此模块的 apt 包?

答案1

Ubuntu 附带的通用内核不包含st负责控制磁带驱动器的模块。该模块可以在“extra”内核包中找到。

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

dmesg后来……

[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.

世界一切都好:)

附言:这类内容如果能包含在 Ubuntu 文档中就更好了。我期望服务器安装映像已经附带了磁带驱动器模块之类的东西……

相关内容