我有一个连接到 SAN 交换机的 HP 1x8 G2 Autoloader,在我的 VMware 环境中,我有一个可以与磁带一起使用的 Oracle Linux。问题是在将磁带连接到 VM 后,未检测到介质更换器,但磁带驱动器正常!
$ cat /proc/scsi/scsi
Attached devices:
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: VMware Model: Virtual disk Rev: 2.0
Type: Direct-Access ANSI SCSI revision: 06
Host: scsi2 Channel: 00 Id: 01 Lun: 00
Vendor: HP Model: Ultrium 6-SCSI Rev: 25MW
Type: Sequential-Access ANSI SCSI revision: 06
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: NECVMWar Model: VMware IDE CDR00 Rev: 1.00
Type: CD-ROM ANSI SCSI revision: 05
$ lsscsi -g
[0:0:0:0] cd/dvd NECVMWar VMware IDE CDR00 1.00 /dev/sr0 /dev/sg2
[2:0:0:0] disk VMware Virtual disk 2.0 /dev/sda /dev/sg0
[2:0:1:0] tape HP Ultrium 6-SCSI 25MW /dev/st0 /dev/sg1
$ ls -l /dev/tape/by-path
lrwxrwxrwx 1 root root 9 Jul 30 08:49 pci-0000:00:10.0-scsi-0:0:1:0 -> ../../st0
lrwxrwxrwx 1 root root 10 Jul 30 08:49 pci-0000:00:10.0-scsi-0:0:1:0-nst -> ../../nst0
$ lsmod | grep scsi
scsi_transport_spi 32768 1 mptspi
mptscsih 36864 1 mptspi
mptbase 94208 2 mptspi,mptscsih
$ lsmod | grep sg
sg 36864 0
$ lsmod | grep st
st 61440
我为 Centos 8 安装了最新版本的 HPE 阵列控制器
$ yum list installed
kmod-hpsa.x86_64 3.4.20-5.el8_4.elrepo @elrepo
并且磁带自动加载器处于顺序模式,我将其更改为自动。
内核信息:
$ uname -r
5.4.17-2102.202.5.el8uek.x86_64
mtx 输出:
$ mtx -f /dev/nst0 status
mtx: Request Sense: Long Report=yes
mtx: Request Sense: Valid Residual=no
mtx: Request Sense: Error Code=70 (Current)
mtx: Request Sense: Sense Key=Illegal Request
mtx: Request Sense: FileMark=no
mtx: Request Sense: EOM=no
mtx: Request Sense: ILI=no
mtx: Request Sense: Additional Sense Code = 20
mtx: Request Sense: Additional Sense Qualifier = 00
mtx: Request Sense: BPV=no
mtx: Request Sense: Error in CDB=no
mtx: Request Sense: SKSV=no
READ ELEMENT STATUS Command Failed
$ mtx -f /dev/nst0 inquiry
Product Type: Tape Drive
Vendor ID: 'HP '
Product ID: 'Ultrium 6-SCSI '
Revision: '25MW'
Attached Changer API: No