⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mtx.1

📁 通用SCSI设备备份/读写程序
💻 1
字号:
.\" mtx.1  Document copyright 2000 Eric Lee Green.\"  Program Copyright 1996, 1997 Leonard Zubkoff.\"  Extensive changes 2000 by Eric Lee Green <eric@estinc.com>.\".\" This is free documentation; you can redistribute it and/or.\" modify it under the terms of the GNU General Public License as.\" published by the Free Software Foundation; either version 2 of.\" the License, or (at your option) any later version..\".\" The GNU General Public License's references to "object code".\" and "executables" are to be interpreted as the output of any.\" document formatting or typesetting system, including.\" intermediate and printed output..\".\" This manual is distributed in the hope that it will be useful,.\" but WITHOUT ANY WARRANTY; without even the implied warranty of.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the.\" GNU General Public License for more details..\".\" You should have received a copy of the GNU General Public.\" License along with this manual; if not, write to the Free.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,.\" USA..\".TH MTX 1 MTX1.2.SH NAMEmtx \- control SCSI media changer devices .SH SYNOPSISmtx [-f <scsi-generic-device>] [nobarcode] [invert] [noattach] command [ command ... ].SH DESCRIPTIONThe .B mtxcommand controls single or multi-drive SCSI media changers such astape changers, autoloaders, tape libraries, or optical media jukeboxes.It can also be used with media changers that use the 'ATTACHED' API, presuming that they properly report the MChanger bit as requiredby the SCSI T-10 SMC specification. .SH OPTIONSThe first argument, given following.B -f, is the SCSI generic device corresponding to your media changer. Consult your operating system's documentation for more information (forexample, under Linux these are generally /dev/sg0 through /dev/sg15, under FreeBSD these are /dev/pass0 through /dev/passX,under SunOS it may be a file under /dev/rdsk).  .PThe 'invert' option will invert (flip) the media (for optical jukeboxes thatallow such) before inserting it into the drive or returning it to thestorage slot. .PThe 'noattach' option forces the regular media changer API even if themedia changer incorrectly reported that it uses the 'ATTACHED' API. .PThe 'nobarcode' option forces the loader to not request barcodes even ifthe loader is capable of reporting them.  .PFollowing these options there may followone or more robotics controlcommands. Note that the 'invert' and 'noattach'options apply to ALL of robotics controlcommands..SH COMMANDS.TP 10.B --versionReport the mtx version number (e.g. mtx 1.2.8) and exit. .TP 10.B inquiryReport the product type (Medium Changer, Tape Drive, etc.), Vendor ID,Product ID, Revision, and whether this uses the Attached Changer API(some tape drives use this rather than reporting a Medium Changer on aseparate LUN or SCSI address). .TP 10.B noattachMake further commands use the regular media changer API rather than the _ATTACHED API, no matter what the "Attached" bit said in the Inquiry info.Needed with some brain-dead changers that report Attached bit but don't respondto _ATTACHED API. .TP 10.B inventoryMakes the robot arm go and check what elements are in the slots. Thisis needed for a few libraries like the Breece Hill ones that do not automatically check the tape inventory at system startup. .TP 10.B statusReports how many drives and storage elements are contained in thedevice. For each drive, reports whether it has media loaded in it, andif so, from which storage slot the media originated. For each storageslot, reports whether it is empty or full, and if the media changerhas a bar code, MIC reader, or some other way of uniquely identifyingmedia without loading it into a drive, this reports the volume tagand/or alternate volume tag for each piece of media.For historical reasons drives are numbered from 0 and storage slots arenumbered from 1. .TP 10.B load <slotnum> [ <drivenum> ]Load media from slot <slotnum> into drive <drivenum>. Drive 0 is assumedif the drive number is omitted..TP 10.B unload [<slotnum>] [ <drivenum> ]Unloads media from drive <drivenum> into slot <slotnum>. If <drivenum> isomitted, defaults to drive 0 (as do all commands).If <slotnum> is omitted, defaults to the slotthat the drive was loaded from. Note that there's currently no way tosay 'unload drive 1's media to the slot it came from', other than to explicitly use that slot number as the destination..TP 10.B [eepos <operation>] transfer <slotnum> <slotnum>Transfers media from one slot to another, assuming that your mechanism iscapable of doing so. Usually used to move media to/from an import/exportport. 'eepos' is used to extend/retract the import/export tray on certain mid-range to high end tape libraries (if, e.g., the tray wasslot 32, you might say say 'eepos 1 transfer 32 32' to extend the tray). Valid values for eepos <operation>are 0 (do nothing to the import/export tray), 1, and 2 (what 1 and 2 do variesdepending upon the library, consult your library's SCSI-level documentation). .TP 10.B first  [<drivenum>]Loads drive <drivenum> from the first slot in the media changer. Unloadsthe drive if there is already media in it.  Note thatthis command may not be what you want on large tape libraries -- e.g. on Exabyte 220, the first slot isusually a cleaning tape. If <drivenum> is omitted, defaults to first drive..TP 10.B last [<drivenum>]Loads drive <drivenum> from the last slot in the media changer. Unloadsthe drive if there is already a tape in it. .TP 10.B next [<drivenum>]Unloads the drive and loads the next tape in sequence. If the drive wasempty, loads the first tape into the drive..SH AUTHORSThe original 'mtx' program was written by Leonard Zubkoff and extensivelyrevised for large multi-drive libraries with bar code readers by Eric Lee Green <eric@badtux.org>, to whom all problems shouldbe reported for this revision. See 'mtx.c' for other contributors. .SH BUGS AND LIMITATIONS.PYou may need to do a 'mt offline' on the tape drive to eject the tapebefore you can issue the 'mtx unload' command. The Exabyte EZ-17 and 220in particular will happily sit there snapping the robot arm's claws aroundthin air trying to grab a tape that's not there. .PFor some Linux distributions, you may need to re-compile the kernel toscan SCSI LUN's in order to detect the media changer. Check /proc/scsi/scsito see what's going on. .PIf you try to unload a tape to its 'source' slot, and said slot isfull, it will instead put the tape into the first emptyslot. Unfortunately the list of empty slots is not updated betweencommands on the command line, so if you try to unload another drive toa full 'source' slot during the same invocation of 'mtx', it will tryto unload to the same (no longer empty) slot and will urp with a SCSIerror..PThis program reads the Mode Sense Element Address Assignment Page(SCSI) and requests data on all available elements. For largerlibraries (more than a couple dozen elements)this sets a big Allocation_Size in the SCSI command block for theREQUEST_ELEMENT_STATUS command in order to be able to read the entireresult of a big tape library. Some operating systems may not be ableto handle this. Versions of Linux earlier than 2.2.6, in particular,may fail this request due to inability to find contiguous pages ofmemory for the SCSI transfer (later versions of Linux 'sg' device doscatter-gather so that this should no longer be a problem)..PThe .B eeposcommand remains in effect for all further commands on a commandline. Thus you might want to follow .B eepos 1 transfer 32 32with .B eepos 0asthe next command (which clears the .B eeposbits). .PNeed a better name for 'eepos' command! ('eepos' is the name of the bitfield in the actual low-level SCSI command, and has nothing to do with whatit does). .PThis program has only been tested on Linux with a limited number oftape loaders (a dual-drive Exabyte 220 tape library, with bar-codereader and 21 slots, an Exabyte EZ-17 7-slot autoloader, and a SeagateDDS-4 autochanger with 6 slots). It may not work on other operating systems with larger libraries,due to the big SCSI request size. Report problems to Eric Lee Green <eric@badtux.org>.  .SH HINTSUnder Linux, .B cat /proc/scsi/scsiwill tell you what SCSI devices you have.You can then refer to them as .B /dev/sga,.B /dev/sgb, etc. by the order theyare reported..PUnder FreeBSD, .B camcontrol devlistwill tell you what SCSI devices youhave, along with which .B passdevice controls them..PUnder Solaris, set up your 'sgen' driver so that it'll look fortape changers (see /kernel/drv/sgen.conf and the sgen man page), type.B touch /reconfigurethen reboot. You can find your changer in /devices by typing.B /usr/sbin/devfsadm -Cto clean out no-longer-extant entries in your /devices directory, then.B find /devices -name \*changer -printto find the device name. Set the symbolic link .B /dev/changer to pointto that device name (if it is not doing so already)..PWith BRU, set your mount and unmount commands as described on the ESTweb site at http://www.estinc.com to move to the next tape when backing upor restoring. With GNU .B tar,see .B mtx.docfor an example of how to use.B tarand .B mtxto make multi-tape backups. .SH AVAILABILITYThis version of .B mtxis currently being maintained by Eric Lee Green <eric@badtux.org> formerly ofEnhanced Software Technologies Inc. The 'mtx' home page ishttp://mtx.sourceforge.net and the actual codeis currently available there and via CVS from http://sourceforge.net/projects/mtx/ . .SH SEE ALSO.BR mt (1), tapeinfo (1), scsitape(1), loaderinfo(1)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -