Vmware-Esxi
磁帶驅動器在 14.04 ESXi VM 上不可用
問題
我有一個 Overland ArcVault 連接到我的系統(實際上是一個虛擬機,它以直通模式連接到獨立的 SCSI 卡),但它似乎是我希望看到的命名磁帶設備節點(類似於
/dev/st0
or )/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
。問題
我如何實際訪問磁帶,為什麼我的系統無法拾取它?
的背景
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 -
(注意:沒有創建特殊的設備節點)
相關 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 包?
Ubuntu 附帶的 -generic 核心不包含
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 文件中的東西。我希望伺服器安裝映像已經附帶磁帶驅動器模組之類的東西……