120bf9a14SJustin T. Gibbs.\" $NetBSD: chio.1,v 1.4 1997/10/02 00:41:25 hubertf Exp $ 2224c8a5bSJoerg Wunsch.\" 3224c8a5bSJoerg Wunsch.\" Copyright (c) 1996 Jason R. Thorpe <thorpej@and.com> 4224c8a5bSJoerg Wunsch.\" All rights reserved. 5224c8a5bSJoerg Wunsch.\" 6224c8a5bSJoerg Wunsch.\" Redistribution and use in source and binary forms, with or without 7224c8a5bSJoerg Wunsch.\" modification, are permitted provided that the following conditions 8224c8a5bSJoerg Wunsch.\" are met: 9224c8a5bSJoerg Wunsch.\" 1. Redistributions of source code must retain the above copyright 10224c8a5bSJoerg Wunsch.\" notice, this list of conditions and the following disclaimer. 11224c8a5bSJoerg Wunsch.\" 2. Redistributions in binary form must reproduce the above copyright 12224c8a5bSJoerg Wunsch.\" notice, this list of conditions and the following disclaimer in the 13224c8a5bSJoerg Wunsch.\" documentation and/or other materials provided with the distribution. 14224c8a5bSJoerg Wunsch.\" 3. All advertising materials mentioning features or use of this software 15224c8a5bSJoerg Wunsch.\" must display the following acknowledgements: 16224c8a5bSJoerg Wunsch.\" This product includes software developed by Jason R. Thorpe 17224c8a5bSJoerg Wunsch.\" for And Communications, http://www.and.com/ 18224c8a5bSJoerg Wunsch.\" 4. The name of the author may not be used to endorse or promote products 19224c8a5bSJoerg Wunsch.\" derived from this software without specific prior written permission. 20224c8a5bSJoerg Wunsch.\" 21224c8a5bSJoerg Wunsch.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22224c8a5bSJoerg Wunsch.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23224c8a5bSJoerg Wunsch.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24224c8a5bSJoerg Wunsch.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25224c8a5bSJoerg Wunsch.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26224c8a5bSJoerg Wunsch.\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 27224c8a5bSJoerg Wunsch.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28224c8a5bSJoerg Wunsch.\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29224c8a5bSJoerg Wunsch.\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30224c8a5bSJoerg Wunsch.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31224c8a5bSJoerg Wunsch.\" SUCH DAMAGE. 32224c8a5bSJoerg Wunsch.\" 332a456239SPeter Wemm.\" $FreeBSD$ 34cbf6f7d3SPhilippe Charnier.\" 3520bf9a14SJustin T. Gibbs.Dd May 14, 1998 36224c8a5bSJoerg Wunsch.Dt CHIO 1 37224c8a5bSJoerg Wunsch.Os 38224c8a5bSJoerg Wunsch.Sh NAME 39224c8a5bSJoerg Wunsch.Nm chio 40224c8a5bSJoerg Wunsch.Nd medium changer control utility 41224c8a5bSJoerg Wunsch.Sh SYNOPSIS 4220bf9a14SJustin T. Gibbs.Nm 43224c8a5bSJoerg Wunsch.Op Fl f Ar changer 44224c8a5bSJoerg Wunsch.Ar command 4520bf9a14SJustin T. Gibbs.Op Fl <flags> 46224c8a5bSJoerg Wunsch.Ar arg1 47224c8a5bSJoerg Wunsch.Ar arg2 48224c8a5bSJoerg Wunsch.Oo 49224c8a5bSJoerg Wunsch.Ar arg3 Oo ... 50224c8a5bSJoerg Wunsch.Oc 51224c8a5bSJoerg Wunsch.Oc 52224c8a5bSJoerg Wunsch.Sh DESCRIPTION 5320bf9a14SJustin T. Gibbs.Nm 54224c8a5bSJoerg Wunschis used to control the operation of medium changers, such as those found 55224c8a5bSJoerg Wunschin tape and optical disk jukeboxes. 56224c8a5bSJoerg Wunsch.Pp 57224c8a5bSJoerg WunschThe options are as follows: 58224c8a5bSJoerg Wunsch.Bl -tag -width indent 59224c8a5bSJoerg Wunsch.It Fl f Ar changer 60224c8a5bSJoerg WunschUse the device 619b24396bSSheldon Hearn.Ar changer 62224c8a5bSJoerg Wunschrather than the default device 63224c8a5bSJoerg Wunsch.Pa /dev/ch0 . 64224c8a5bSJoerg Wunsch.El 65224c8a5bSJoerg Wunsch.Pp 66224c8a5bSJoerg WunschThe default changer may be overridden by setting the environment variable 67cbf6f7d3SPhilippe Charnier.Ev CHANGER 68224c8a5bSJoerg Wunschto the desired changer device. 69224c8a5bSJoerg Wunsch.Pp 70224c8a5bSJoerg WunschA medium changer apparatus is made up of 71cbf6f7d3SPhilippe Charnier.Em elements . 72f944dc77SKenneth D. MerryThere are five element types: 73cbf6f7d3SPhilippe Charnier.Em picker 74224c8a5bSJoerg Wunsch(medium transport), 75cbf6f7d3SPhilippe Charnier.Em slot 76224c8a5bSJoerg Wunsch(storage), 77cbf6f7d3SPhilippe Charnier.Em portal 78f944dc77SKenneth D. Merry(import/export), 79cbf6f7d3SPhilippe Charnier.Em drive 80f944dc77SKenneth D. Merry(data transfer), and 81f944dc77SKenneth D. Merry.Em voltag 82f944dc77SKenneth D. Merry(select by volume identifier). The 83f944dc77SKenneth D. Merry.Em voltag 84f944dc77SKenneth D. Merrypseudo-element type allows the selection of tapes by their volume tag 85f944dc77SKenneth D. Merry(typically a barcode on the tape). 86f944dc77SKenneth D. Merry.Pp 87f944dc77SKenneth D. MerryIn this command description, the shorthand 88cbf6f7d3SPhilippe Charnier.Em ET 89224c8a5bSJoerg Wunschwill be used to represent an element type, and 90cbf6f7d3SPhilippe Charnier.Em EU 91f944dc77SKenneth D. Merrywill be used to represent an element unit. 92f944dc77SKenneth D. MerryFor example, to represent the first robotic arm in the changer, the 93cbf6f7d3SPhilippe Charnier.Em ET 94cbf6f7d3SPhilippe Charnierwould be 95224c8a5bSJoerg Wunsch.Dq picker 96cbf6f7d3SPhilippe Charnierand the 97cbf6f7d3SPhilippe Charnier.Em EU 98cbf6f7d3SPhilippe Charnierwould be 99224c8a5bSJoerg Wunsch.Dq 0 . 100224c8a5bSJoerg Wunsch.Pp 101224c8a5bSJoerg Wunsch.Sh SUPPORTED COMMANDS 102cbf6f7d3SPhilippe Charnier.Bl -tag -width indent 1039b24396bSSheldon Hearn.It Ic move Xo 104224c8a5bSJoerg Wunsch.Ar <from ET> <from EU> <to ET> <to EU> 10552e0c32bSRuslan Ermilov.Op Cm inv 106cbf6f7d3SPhilippe Charnier.Xc 107cbf6f7d3SPhilippe CharnierMove the media unit from 1089b24396bSSheldon Hearn.Ar <from ET/EU> 109224c8a5bSJoerg Wunschto 1109b24396bSSheldon Hearn.Ar <to ET/EU> . 111224c8a5bSJoerg WunschIf the optional modifier 11252e0c32bSRuslan Ermilov.Cm inv 113224c8a5bSJoerg Wunschis specified, the media unit will be inverted before insertion. 1149b24396bSSheldon Hearn.It Ic exchange Xo 115224c8a5bSJoerg Wunsch.Ar <src ET> <src EU> <dst1 ET> <dst1 EU> 116224c8a5bSJoerg Wunsch.Op Ar <dst2 ET> <dst2 ET> 11752e0c32bSRuslan Ermilov.Op Cm inv1 11852e0c32bSRuslan Ermilov.Op Cm inv2 119cbf6f7d3SPhilippe Charnier.Xc 120cbf6f7d3SPhilippe CharnierPerform a media unit exchange operation. The media unit in 1219b24396bSSheldon Hearn.Ar <src ET/EU> 122224c8a5bSJoerg Wunschis moved to 1239b24396bSSheldon Hearn.Ar <dst1 ET/EU> 124224c8a5bSJoerg Wunschand the media unit previously in 1259b24396bSSheldon Hearn.Ar <dst1 ET/EU> 126224c8a5bSJoerg Wunschis moved to 1279b24396bSSheldon Hearn.Ar <dst2 ET/EU> . 128224c8a5bSJoerg WunschIn the case of a simple exchange, 1299b24396bSSheldon Hearn.Ar <dst2 ET/EU> 130224c8a5bSJoerg Wunschis omitted and the values 1319b24396bSSheldon Hearn.Ar <src ET/EU> 132224c8a5bSJoerg Wunschare used in their place. 133224c8a5bSJoerg WunschThe optional modifiers 13452e0c32bSRuslan Ermilov.Cm inv1 135224c8a5bSJoerg Wunschand 13652e0c32bSRuslan Ermilov.Cm inv2 137224c8a5bSJoerg Wunschspecify whether the media units are to be inverted before insertion into 1389b24396bSSheldon Hearn.Ar <dst1 ET/EU> 139224c8a5bSJoerg Wunschand 1409b24396bSSheldon Hearn.Ar <dst2 ET/EU> 141f6b31571SWolfram Schneiderrespectively. 142224c8a5bSJoerg Wunsch.Pp 143224c8a5bSJoerg WunschNote that not all medium changers support the 14420bf9a14SJustin T. Gibbs.Ic exchange 145305a253aSKris Kennawayoperation; the changer must have multiple free pickers or emulate 146224c8a5bSJoerg Wunschmultiple free pickers with transient storage. 1479b24396bSSheldon Hearn.It Ic return Xo 148f944dc77SKenneth D. Merry.Ar <from ET> <from EU> 149f944dc77SKenneth D. Merry.Xc 150f944dc77SKenneth D. MerryReturn the media unit to its source element. 151f944dc77SKenneth D. MerryThis command will query the status of the specified media unit, and 152f944dc77SKenneth D. Merrywill move it to the element specified in its source attribute. 153f944dc77SKenneth D. MerryThis is a convenient way to return media from a drive or portal 154f944dc77SKenneth D. Merryto its previous element in the changer. 155f944dc77SKenneth D. Merry.Pp 1569b24396bSSheldon Hearn.It Ic position Xo 157224c8a5bSJoerg Wunsch.Ar <to ET> <to EU> 15852e0c32bSRuslan Ermilov.Op Cm inv 159cbf6f7d3SPhilippe Charnier.Xc 160224c8a5bSJoerg WunschPosition the picker in front of the element described by 1619b24396bSSheldon Hearn.Ar <to ET/EU> . 162224c8a5bSJoerg WunschIf the optional modifier 16352e0c32bSRuslan Ermilov.Cm inv 164224c8a5bSJoerg Wunschis specified, the media unit will be inverted before insertion. 165224c8a5bSJoerg Wunsch.Pp 166224c8a5bSJoerg WunschNote that not all changers behave as expected when issued this command. 1679b24396bSSheldon Hearn.It Ic params 168224c8a5bSJoerg WunschReport the number of slots, drives, pickers, and portals in the changer, 169224c8a5bSJoerg Wunschand which picker unit the changer is currently configured to use. 1709b24396bSSheldon Hearn.It Ic getpicker 171224c8a5bSJoerg WunschReport which picker unit the changer is currently configured to use. 1729b24396bSSheldon Hearn.It Ic setpicker Xo 173224c8a5bSJoerg Wunsch.Ar <unit> 174cbf6f7d3SPhilippe Charnier.Xc 175224c8a5bSJoerg WunschConfigure the changer to use picker 1769b24396bSSheldon Hearn.Ar <unit> . 17720bf9a14SJustin T. Gibbs.Pp 1789b24396bSSheldon Hearn.It Ic ielem Xo 1799b24396bSSheldon Hearn.Op Ar <timeout> 18020bf9a14SJustin T. Gibbs.Xc 1819b24396bSSheldon HearnPerform an 1829b24396bSSheldon Hearn.Em INITIALIZE ELEMENT STATUS 18320bf9a14SJustin T. Gibbsoperation on the changer. The optional 1849b24396bSSheldon Hearn.Ar <timeout> 18520bf9a14SJustin T. Gibbsparameter may be given to specify a timeout in seconds for the 18620bf9a14SJustin T. Gibbsoperations. This may be used if the operation takes unusually long 18720bf9a14SJustin T. Gibbsbecause of buggy firmware or the like. 1889b24396bSSheldon Hearn.It Ic voltag Xo 18920bf9a14SJustin T. Gibbs.Op Fl fca 19020bf9a14SJustin T. Gibbs.Ar <ET> 19120bf9a14SJustin T. Gibbs.Ar <EU> 19220bf9a14SJustin T. Gibbs.Op Ar <label> 19320bf9a14SJustin T. Gibbs.Op Ar <serial> 19420bf9a14SJustin T. Gibbs.Xc 19520bf9a14SJustin T. GibbsChange volume tag for an element in the media changer. This command 19620bf9a14SJustin T. Gibbsis only supported by few media changers. If it is not supported by a 19720bf9a14SJustin T. Gibbsdevice, using this command will usually result in a "Invalid Field in 19820bf9a14SJustin T. GibbsCDB" error message on the console. 19920bf9a14SJustin T. Gibbs.Pp 20020bf9a14SJustin T. GibbsIf the 20120bf9a14SJustin T. Gibbs.Fl c 20220bf9a14SJustin T. Gibbsflag is specified, the volume tag of the specified element is 20320bf9a14SJustin T. Gibbscleared. If the 20420bf9a14SJustin T. Gibbs.Fl f 205969385c1SBill Fumerolaflag is specified, the volume tag is superseded with the specified 20620bf9a14SJustin T. Gibbsvolume tag even if a volume tag is already defined for the element. 20720bf9a14SJustin T. GibbsIt is an error to not specify the 20820bf9a14SJustin T. Gibbs.Fl f 20920bf9a14SJustin T. Gibbsflag when trying to set a label for an element which already has 21020bf9a14SJustin T. Gibbsvolume tag information defined. 21120bf9a14SJustin T. Gibbs.Pp 21220bf9a14SJustin T. GibbsThe command works with the primary volume tag or, if the 21320bf9a14SJustin T. Gibbs.Fl a 21420bf9a14SJustin T. Gibbsflag is given, with the alternate volume tag. 2159b24396bSSheldon Hearn.It Ic status Xo 21620bf9a14SJustin T. Gibbs.Op Fl vVsSbIa 217224c8a5bSJoerg Wunsch.Op Ar <type> 218cbf6f7d3SPhilippe Charnier.Xc 219224c8a5bSJoerg WunschReport the status of all elements in the changer. If 2209b24396bSSheldon Hearn.Ar <type> 221224c8a5bSJoerg Wunschis specified, report the status of all elements of type 2229b24396bSSheldon Hearn.Ar <type> . 22320bf9a14SJustin T. Gibbs.It Fl v 22420bf9a14SJustin T. GibbsPrint the primary volume tag for each loaded medium, if any. The volume 2259b24396bSSheldon Hearntag is printed as 2269b24396bSSheldon Hearn.Dq <LABEL:SERIAL> . 22720bf9a14SJustin T. Gibbs.It Fl V 22820bf9a14SJustin T. GibbsPrint the alternate volume tag for each loaded medium, if any. 22920bf9a14SJustin T. Gibbs.It Fl s 23020bf9a14SJustin T. GibbsPrint the additional sense code and additional sense code qualifier for 23120bf9a14SJustin T. Gibbseach element. 23220bf9a14SJustin T. Gibbs.It Fl S 23320bf9a14SJustin T. GibbsPrint the element source address for each element. 23420bf9a14SJustin T. Gibbs.It Fl b 23520bf9a14SJustin T. GibbsPrint SCSI bus information for each element. Note that this information 23620bf9a14SJustin T. Gibbsis valid only for drives. 23720bf9a14SJustin T. Gibbs.It Fl I 23820bf9a14SJustin T. GibbsPrint the internal element addresses for each element. The internal 23920bf9a14SJustin T. Gibbselement address is not normally used with this driver. It is reported 24020bf9a14SJustin T. Gibbsfor diagnostic purposes only. 24120bf9a14SJustin T. Gibbs.It Fl a 24220bf9a14SJustin T. GibbsPrint all additional information (as in 24320bf9a14SJustin T. Gibbs.Fl vVsSba 24420bf9a14SJustin T. Gibbs). 245cbf6f7d3SPhilippe Charnier.El 246224c8a5bSJoerg Wunsch.Pp 247224c8a5bSJoerg WunschThe status bits are defined as follows: 248224c8a5bSJoerg Wunsch.Bl -tag -width indent 249cbf6f7d3SPhilippe Charnier.It FULL 250224c8a5bSJoerg WunschElement contains a media unit. 251cbf6f7d3SPhilippe Charnier.It IMPEXP 252224c8a5bSJoerg WunschMedia was deposited into element by an outside human operator. 253cbf6f7d3SPhilippe Charnier.It EXCEPT 254224c8a5bSJoerg WunschElement is in an abnormal state. 255cbf6f7d3SPhilippe Charnier.It ACCESS 256224c8a5bSJoerg WunschMedia in this element is accessible by a picker. 257cbf6f7d3SPhilippe Charnier.It EXENAB 25832c21313SSteve PriceElement supports passing media (exporting) to an outside human operator. 259cbf6f7d3SPhilippe Charnier.It INENAB 260224c8a5bSJoerg WunschElement supports receiving media (importing) from an outside human operator. 261224c8a5bSJoerg Wunsch.El 26220bf9a14SJustin T. Gibbs.Pp 263224c8a5bSJoerg Wunsch.Sh EXAMPLES 264cbf6f7d3SPhilippe Charnier.Bl -tag -width indent 2659b24396bSSheldon Hearn.It Li chio move slot 3 drive 0 266cbf6f7d3SPhilippe CharnierMove the media in slot 3 (fourth slot) to drive 0 (first drive). 2679b24396bSSheldon Hearn.It Li chio move voltag VOLUME01 drive 0 268f944dc77SKenneth D. MerryMove the media with the barcode VOLUME01 to drive 0 (first drive). 2699b24396bSSheldon Hearn.It Li chio return drive 0 270f944dc77SKenneth D. MerryRemove the tape from drive 0 (first drive) and return it to its original 271f944dc77SKenneth D. Merrylocation in the rack. 2729b24396bSSheldon Hearn.It Li chio setpicker 2 273cbf6f7d3SPhilippe CharnierConfigure the changer to use picker 2 (third picker) for operations. 274cbf6f7d3SPhilippe Charnier.El 275224c8a5bSJoerg Wunsch.Sh FILES 276cbf6f7d3SPhilippe Charnier.Bl -tag -width /dev/ch0 -compact 277cbf6f7d3SPhilippe Charnier.It Pa /dev/ch0 278cbf6f7d3SPhilippe Charnierdefault changer device 279cbf6f7d3SPhilippe Charnier.El 280224c8a5bSJoerg Wunsch.Sh SEE ALSO 281224c8a5bSJoerg Wunsch.Xr mt 1 , 28220bf9a14SJustin T. Gibbs.Xr mount 8 . 28305e61fd5SPhilippe Charnier.Sh AUTHORS 284224c8a5bSJoerg WunschThe 285cbf6f7d3SPhilippe Charnier.Nm 28605e61fd5SPhilippe Charnierprogram and SCSI changer driver were written by 28705e61fd5SPhilippe Charnier.An Jason R. Thorpe Aq thorpej@and.com 28820bf9a14SJustin T. Gibbsfor And Communications, http://www.and.com/. 289726b61abSRuslan Ermilov.Pp 29020bf9a14SJustin T. GibbsAdditional work by 291f944dc77SKenneth D. Merry.An Hans Huebner 292f944dc77SKenneth D. Merry.Aq hans@artcom.de 293726b61abSRuslan Ermilovand 294726b61abSRuslan Ermilov.An Steve Gunn 295f944dc77SKenneth D. Merry.Aq csg@waterspout.com 296