Score:0

HP 1/8 G2 medium changer not detected in Oracle Linux 8

vn flag

I have a HP 1x8 G2 Autoloader that connected to a SAN switch, on my VMware environment I have an Oracle Linux that should work with the tape. The problem is after connecting tape to VM, medium changer is not detected but tape drive is OK!

$ 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 

I installed latest version of HPE Array Controller for Centos 8

$ yum list installed 
kmod-hpsa.x86_64                     3.4.20-5.el8_4.elrepo                       @elrepo

and tape Autoloader was in Sequential mode which I changed it to Auto.

kernel info:

$ uname -r
5.4.17-2102.202.5.el8uek.x86_64

mtx outputs:

$ 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
Score:0
vn flag

After days and weeks, finally ...

what was the problem?

HP 1x8 G2 Autoloader is a multi-LUN device. any system which wants to work with the tape has to find both Medium Charger and Tape Drive with one SCSI path but two LUN ID. this feature is called Multi-LUN Scanning.

in my tests, I didn't have a problem when the tape was connected to an HP-DL380 with Centos 7 (bare-metal) installed on it. but in a virtulaized env. ESXi couldn't detect the Medium Changer.

Solution:

01- Login to ESXi host over ssh

02- Locate HBA in the list of scsidevs:

# esxcfg-scsidevs -a 

03- set VMW_SATP_LOCAL rule to the device:

# esxcli storage nmp rule add --driver=<HBA_DRIVER> --satp VMW_SATP_LOCAL

04- reboot the host 05- check devices on the HBA and find both Medium changer and Tape Drive 06- add devices over SCSI device to VM

If you want to know more about NMP, SATP and VMW_SATP_LOCAL:

What is NMP?

What is SATP and VMW_SATP_LOCAL?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.