磁帶驅動器在 14.04 ESXi 虛擬機器上不可用

磁帶驅動器在 14.04 ESXi 虛擬機器上不可用

問題

我有一個 Overland ArcVault 連接到我的系統(實際上是一個虛擬機,它以直通模式連接到獨立的 SCSI 卡),但它似乎是我希望看到的指定磁帶設備節點(類似於/dev/st0/dev/nst0

特別是,我看到/dev/sg0通過sg4.

sg0, 12代表連接到VM的虛擬磁碟機。

sg4是代表磁帶庫本身的設備,並且它工作正常——也就是說,我可以使用類似的指令mtx來控制它。

從啟動訊息來看,sg3是實際的驅動器本身,但它阻止所有存取嘗試。嘗試執行諸如mt -f /dev/sg3 rewind始終返回Operation not permitted錯誤之類的操作。我已驗證該庫已在驅動器中安裝了磁帶,並已在所有sg*設備上嘗試過此操作。

也存在 a /dev/tape/by-id/scsi-200900d09126c0024,但這只是指向 庫的符號連結sg4

問題

我如何實際存取磁帶,為什麼我的系統無法拾取它?

的背景


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  -

(注意:沒有創建特殊設備節點)

相關訊息

[    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負責控制磁帶機的模組。該模組可以在“額外”內核包中找到。

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 的文檔中確實會很好。我希望伺服器安裝映像已經附帶磁帶驅動器模組之類的東西...

相關內容