mtx

Remote Links
  • http://mtx.sourceforge.net/ 1/02 - home of mtx
  • Sun Manager 10/01 email about Solaris 8 changers
  • mtx tar file on ftp.dandelion.com
  • Debian.org page
  • stctl - Solaris SCSI Tape Changer package
  • Local Links
  • mtx-1.0.tar.gz source file That contains:
  • mtx.c
  • mtx.doc
  • chg-mtx - Amanda changer script for this version of mtx. I don't know why I had to modify chg-mtx, my guess is that I'm running a different version of mtx than the Amanda maintainers.
  • Solaris 2.5.1 binary
  • mtx-1.0.solaris2.5.1.tar.gz Tar file that contains the Solaris 2.5.2 mtx binary, mtx.c, mtx.doc and chg-mtx.
  • Juke a more sophisticated tape jukebox system.

  • mtx

    mtx is a program that is
    "for controlling the robotic mechanism of DDS autoloaders such as the Seagate 4586NP, 4584NP, and the HP Surestore 12000"
    Locally, we use it to control a Quantum DLT 4500 and the Amanda back up system.

    Example

    In the example below, we query the drive, then unload slot 4 and load slot 1.
    carson.eecs 8# mtx
    Usage:
      mtx [ -f  ] status | first | last | next | previous
      mtx [ -f  ] load 
      mtx [ -f  ] unload [  ]
    carson.eecs 9# mtx -f /dev/nrst12 status
    Data Transfer Element:	Full (Storage Element 4 Loaded)
    Storage Element 1:	Full
    Storage Element 2:	Full
    Storage Element 3:	Full
    Storage Element 4:	Empty
    Storage Element 5:	Full
    carson.eecs 10# mtx -f /dev/nrst12 load 1
    mtx: Data Transfer Element is Already Full
    carson.eecs 11# mtx -f /dev/nrst12 unload
    Unloading Data Transfer Element into Storage Element 4...done
    carson.eecs 12# mtx -f /dev/nrst12 load 1
    Loading Storage Element 1 into Data Transfer Element...
    carson.eecs 13# mtx -f /dev/nrst12 status
    Data Transfer Element:	Full (Storage Element 1 Loaded)
    Storage Element 1:	Empty
    Storage Element 2:	Full
    Storage Element 3:	Full
    Storage Element 4:	Full
    Storage Element 5:	Full
    carson.eecs 14# 
    

    Solaris 10 notes

    mtx problem
    dumper@carson.EECS.Berkeley.EDU 1# mtx -f /dev/nrst11 status
    mtx -f /dev/nrst11 status
    mtx: Request Sense: Long Report=yes
    mtx: Request Sense: Valid Residual=no
    mtx: Request Sense: Error Code=0 (Unknown?!)
    mtx: Request Sense: Sense Key=No Sense
    mtx: Request Sense: FileMark=no
    mtx: Request Sense: EOM=no
    mtx: Request Sense: ILI=no
    mtx: Request Sense: Additional Sense Code = 00
    mtx: Request Sense: Additional Sense Qualifier = 00
    mtx: Request Sense: BPV=no
    mtx: Request Sense: Error in CDB=no
    mtx: Request Sense: SKSV=no
    INQUIRY command Failed
    
    Running truss indicates
    ioctl(3, 0x04C9, 0xFFBFF8C8)                    Err#1 EPERM [sys_devices]
    
    The /usr/include/sys/errno.h files says:
    #define	EPERM	1	/* Not super-user			*/ 
    
    The solution is to make the mtx binary suid root
    carson.EECS.Berkeley.EDU:root: %C2> ls -l /usr/local/sbin/mtx
    -rwxr-xr-x   1 root        23060 Sep 28 16:02 /usr/local/sbin/mtx
    carson.EECS.Berkeley.EDU:root: %C2> chmod u+s !$
    carson.EECS.Berkeley.EDU:root: %C2> ls -l !$
    -rwsr-xr-x   1 root        23060 Sep 28 16:02 /usr/local/sbin/mtx
    

    Back to my public sysadmin pages
    Last Updated: 10/09/05. cxh at eecs