Multi LUN Tape library on ESXi 5.1u2

If a tape drive comes up with VMW_SATP_ALUA rule in VMware vShpere (4.0 or later) you will most likely see input/output errors during backup operation on the VM you mapped to drive to. A working rule is VMW_SATP_LOCAL and you can change it using some simple steps.

Note: As this issue is related to the HBAs and tape drvies/changers used not all environments are affected.

  1. Find the module for SCSI/SAS HBA using esxcfg-scsidevs

    esx# esxcfg-scsidevs -a
    vmhba0 cciss link-n/a block.cciss/c0d0:0 (0:2:1.0) Compaq Computer Coporation Smart Array P400
    vmhba1 mptspi link-n/a pscsi.vmhba1 (0:7:1.0) LSI Logic / Symbios Logic ProLiant
    vmhba2 mptspi link-n/a pscsi.vmhba2 (0:7:1.1) LSI Logic / Symbios Logic ProLiant

  2. Add an additional rule for the HBA module the tape drive/changer is attached to

    esx# esxcli storage nmp satp rule add -s VMW_SATP_LOCAL -D=’mptspi‘ -e=’Tape drive support’

  3. Restart the ESX host to activate changes. The drive will now work as expected.
  4. Map the tape drive according to http://kb.vmware.com/kb/1016407

Thanks to http://www.syncer.de/?p=147 for the instructions about ESXi 4.x