xref: /freebsd/bin/chio/chio.1 (revision eccea571a771f9fa80ccb3963855f281db792efd)
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
48e30b1c64SRuslan Ermilov.Op Ar arg3 Op ...
49224c8a5bSJoerg Wunsch.Sh DESCRIPTION
5045ebb0c1SPhilippe CharnierThe
5120bf9a14SJustin T. Gibbs.Nm
5245ebb0c1SPhilippe Charnierutility is used to control the operation of medium changers, such as those
5345ebb0c1SPhilippe Charnierfound in tape and optical disk jukeboxes.
54224c8a5bSJoerg Wunsch.Pp
55224c8a5bSJoerg WunschThe options are as follows:
56224c8a5bSJoerg Wunsch.Bl -tag -width indent
57224c8a5bSJoerg Wunsch.It Fl f Ar changer
58224c8a5bSJoerg WunschUse the device
599b24396bSSheldon Hearn.Ar changer
60224c8a5bSJoerg Wunschrather than the default device
61224c8a5bSJoerg Wunsch.Pa /dev/ch0 .
62224c8a5bSJoerg Wunsch.El
63224c8a5bSJoerg Wunsch.Pp
64224c8a5bSJoerg WunschThe default changer may be overridden by setting the environment variable
65cbf6f7d3SPhilippe Charnier.Ev CHANGER
66224c8a5bSJoerg Wunschto the desired changer device.
67224c8a5bSJoerg Wunsch.Pp
68224c8a5bSJoerg WunschA medium changer apparatus is made up of
69cbf6f7d3SPhilippe Charnier.Em elements .
70f944dc77SKenneth D. MerryThere are five element types:
71cbf6f7d3SPhilippe Charnier.Em picker
72224c8a5bSJoerg Wunsch(medium transport),
73cbf6f7d3SPhilippe Charnier.Em slot
74224c8a5bSJoerg Wunsch(storage),
75cbf6f7d3SPhilippe Charnier.Em portal
76f944dc77SKenneth D. Merry(import/export),
77cbf6f7d3SPhilippe Charnier.Em drive
78f944dc77SKenneth D. Merry(data transfer), and
79f944dc77SKenneth D. Merry.Em voltag
80eccea571SRuslan Ermilov(select by volume identifier).
81eccea571SRuslan ErmilovThe
82f944dc77SKenneth D. Merry.Em voltag
83f944dc77SKenneth D. Merrypseudo-element type allows the selection of tapes by their volume tag
84f944dc77SKenneth D. Merry(typically a barcode on the tape).
85f944dc77SKenneth D. Merry.Pp
86f944dc77SKenneth D. MerryIn this command description, the shorthand
87cbf6f7d3SPhilippe Charnier.Em ET
88224c8a5bSJoerg Wunschwill be used to represent an element type, and
89cbf6f7d3SPhilippe Charnier.Em EU
90f944dc77SKenneth D. Merrywill be used to represent an element unit.
91f944dc77SKenneth D. MerryFor example, to represent the first robotic arm in the changer, the
92cbf6f7d3SPhilippe Charnier.Em ET
93cbf6f7d3SPhilippe Charnierwould be
94224c8a5bSJoerg Wunsch.Dq picker
95cbf6f7d3SPhilippe Charnierand the
96cbf6f7d3SPhilippe Charnier.Em EU
97cbf6f7d3SPhilippe Charnierwould be
98224c8a5bSJoerg Wunsch.Dq 0 .
99224c8a5bSJoerg Wunsch.Sh SUPPORTED COMMANDS
100cbf6f7d3SPhilippe Charnier.Bl -tag -width indent
1019b24396bSSheldon Hearn.It Ic move Xo
102224c8a5bSJoerg Wunsch.Ar <from ET> <from EU> <to ET> <to EU>
10352e0c32bSRuslan Ermilov.Op Cm inv
104cbf6f7d3SPhilippe Charnier.Xc
105cbf6f7d3SPhilippe CharnierMove the media unit from
1069b24396bSSheldon Hearn.Ar <from ET/EU>
107224c8a5bSJoerg Wunschto
1089b24396bSSheldon Hearn.Ar <to ET/EU> .
109224c8a5bSJoerg WunschIf the optional modifier
11052e0c32bSRuslan Ermilov.Cm inv
111224c8a5bSJoerg Wunschis specified, the media unit will be inverted before insertion.
1129b24396bSSheldon Hearn.It Ic exchange Xo
113224c8a5bSJoerg Wunsch.Ar <src ET> <src EU> <dst1 ET> <dst1 EU>
114224c8a5bSJoerg Wunsch.Op Ar <dst2 ET> <dst2 ET>
11552e0c32bSRuslan Ermilov.Op Cm inv1
11652e0c32bSRuslan Ermilov.Op Cm inv2
117cbf6f7d3SPhilippe Charnier.Xc
118eccea571SRuslan ErmilovPerform a media unit exchange operation.
119eccea571SRuslan ErmilovThe media unit in
1209b24396bSSheldon Hearn.Ar <src ET/EU>
121224c8a5bSJoerg Wunschis moved to
1229b24396bSSheldon Hearn.Ar <dst1 ET/EU>
123224c8a5bSJoerg Wunschand the media unit previously in
1249b24396bSSheldon Hearn.Ar <dst1 ET/EU>
125224c8a5bSJoerg Wunschis moved to
1269b24396bSSheldon Hearn.Ar <dst2 ET/EU> .
127224c8a5bSJoerg WunschIn the case of a simple exchange,
1289b24396bSSheldon Hearn.Ar <dst2 ET/EU>
129224c8a5bSJoerg Wunschis omitted and the values
1309b24396bSSheldon Hearn.Ar <src ET/EU>
131224c8a5bSJoerg Wunschare used in their place.
132224c8a5bSJoerg WunschThe optional modifiers
13352e0c32bSRuslan Ermilov.Cm inv1
134224c8a5bSJoerg Wunschand
13552e0c32bSRuslan Ermilov.Cm inv2
136224c8a5bSJoerg Wunschspecify whether the media units are to be inverted before insertion into
1379b24396bSSheldon Hearn.Ar <dst1 ET/EU>
138224c8a5bSJoerg Wunschand
1399b24396bSSheldon Hearn.Ar <dst2 ET/EU>
140f6b31571SWolfram Schneiderrespectively.
141224c8a5bSJoerg Wunsch.Pp
142224c8a5bSJoerg WunschNote that not all medium changers support the
14320bf9a14SJustin T. Gibbs.Ic exchange
144305a253aSKris Kennawayoperation; the changer must have multiple free pickers or emulate
145224c8a5bSJoerg Wunschmultiple free pickers with transient storage.
1469b24396bSSheldon Hearn.It Ic return Xo
147f944dc77SKenneth D. Merry.Ar <from ET> <from EU>
148f944dc77SKenneth D. Merry.Xc
149f944dc77SKenneth D. MerryReturn the media unit to its source element.
150f944dc77SKenneth D. MerryThis command will query the status of the specified media unit, and
151f944dc77SKenneth D. Merrywill move it to the element specified in its source attribute.
152f944dc77SKenneth D. MerryThis is a convenient way to return media from a drive or portal
153f944dc77SKenneth D. Merryto its previous element in the changer.
154f944dc77SKenneth D. Merry.Pp
1559b24396bSSheldon Hearn.It Ic position Xo
156224c8a5bSJoerg Wunsch.Ar <to ET> <to EU>
15752e0c32bSRuslan Ermilov.Op Cm inv
158cbf6f7d3SPhilippe Charnier.Xc
159224c8a5bSJoerg WunschPosition the picker in front of the element described by
1609b24396bSSheldon Hearn.Ar <to ET/EU> .
161224c8a5bSJoerg WunschIf the optional modifier
16252e0c32bSRuslan Ermilov.Cm inv
163224c8a5bSJoerg Wunschis specified, the media unit will be inverted before insertion.
164224c8a5bSJoerg Wunsch.Pp
165224c8a5bSJoerg WunschNote that not all changers behave as expected when issued this command.
1669b24396bSSheldon Hearn.It Ic params
167224c8a5bSJoerg WunschReport the number of slots, drives, pickers, and portals in the changer,
168224c8a5bSJoerg Wunschand which picker unit the changer is currently configured to use.
1699b24396bSSheldon Hearn.It Ic getpicker
170224c8a5bSJoerg WunschReport which picker unit the changer is currently configured to use.
1719b24396bSSheldon Hearn.It Ic setpicker Xo
172224c8a5bSJoerg Wunsch.Ar <unit>
173cbf6f7d3SPhilippe Charnier.Xc
174224c8a5bSJoerg WunschConfigure the changer to use picker
1759b24396bSSheldon Hearn.Ar <unit> .
17620bf9a14SJustin T. Gibbs.Pp
1779b24396bSSheldon Hearn.It Ic ielem Xo
1789b24396bSSheldon Hearn.Op Ar <timeout>
17920bf9a14SJustin T. Gibbs.Xc
1809b24396bSSheldon HearnPerform an
1819b24396bSSheldon Hearn.Em INITIALIZE ELEMENT STATUS
182eccea571SRuslan Ermilovoperation on the changer.
183eccea571SRuslan ErmilovThe optional
1849b24396bSSheldon Hearn.Ar <timeout>
18520bf9a14SJustin T. Gibbsparameter may be given to specify a timeout in seconds for the
186eccea571SRuslan Ermilovoperations.
187eccea571SRuslan ErmilovThis may be used if the operation takes unusually long
18820bf9a14SJustin T. Gibbsbecause of buggy firmware or the like.
1899b24396bSSheldon Hearn.It Ic voltag Xo
19020bf9a14SJustin T. Gibbs.Op Fl fca
19120bf9a14SJustin T. Gibbs.Ar <ET>
19220bf9a14SJustin T. Gibbs.Ar <EU>
19320bf9a14SJustin T. Gibbs.Op Ar <label>
19420bf9a14SJustin T. Gibbs.Op Ar <serial>
19520bf9a14SJustin T. Gibbs.Xc
196eccea571SRuslan ErmilovChange volume tag for an element in the media changer.
197eccea571SRuslan ErmilovThis command
198eccea571SRuslan Ermilovis only supported by few media changers.
199eccea571SRuslan ErmilovIf it is not supported by a
2009d5abbddSJens Schweikhardtdevice, using this command will usually result in an "Invalid Field in
20120bf9a14SJustin T. GibbsCDB" error message on the console.
20220bf9a14SJustin T. Gibbs.Pp
20320bf9a14SJustin T. GibbsIf the
20420bf9a14SJustin T. Gibbs.Fl c
20520bf9a14SJustin T. Gibbsflag is specified, the volume tag of the specified element is
206eccea571SRuslan Ermilovcleared.
207eccea571SRuslan ErmilovIf the
20820bf9a14SJustin T. Gibbs.Fl f
209969385c1SBill Fumerolaflag is specified, the volume tag is superseded with the specified
21020bf9a14SJustin T. Gibbsvolume tag even if a volume tag is already defined for the element.
21120bf9a14SJustin T. GibbsIt is an error to not specify the
21220bf9a14SJustin T. Gibbs.Fl f
21320bf9a14SJustin T. Gibbsflag when trying to set a label for an element which already has
21420bf9a14SJustin T. Gibbsvolume tag information defined.
21520bf9a14SJustin T. Gibbs.Pp
21620bf9a14SJustin T. GibbsThe command works with the primary volume tag or, if the
21720bf9a14SJustin T. Gibbs.Fl a
21820bf9a14SJustin T. Gibbsflag is given, with the alternate volume tag.
2199b24396bSSheldon Hearn.It Ic status Xo
22020bf9a14SJustin T. Gibbs.Op Fl vVsSbIa
221224c8a5bSJoerg Wunsch.Op Ar <type>
222cbf6f7d3SPhilippe Charnier.Xc
223eccea571SRuslan ErmilovReport the status of all elements in the changer.
224eccea571SRuslan ErmilovIf
2259b24396bSSheldon Hearn.Ar <type>
226224c8a5bSJoerg Wunschis specified, report the status of all elements of type
2279b24396bSSheldon Hearn.Ar <type> .
22820bf9a14SJustin T. Gibbs.It Fl v
229eccea571SRuslan ErmilovPrint the primary volume tag for each loaded medium, if any.
230eccea571SRuslan ErmilovThe volume
2319b24396bSSheldon Hearntag is printed as
2329b24396bSSheldon Hearn.Dq <LABEL:SERIAL> .
23320bf9a14SJustin T. Gibbs.It Fl V
23420bf9a14SJustin T. GibbsPrint the alternate volume tag for each loaded medium, if any.
23520bf9a14SJustin T. Gibbs.It Fl s
23620bf9a14SJustin T. GibbsPrint the additional sense code and additional sense code qualifier for
23720bf9a14SJustin T. Gibbseach element.
23820bf9a14SJustin T. Gibbs.It Fl S
23920bf9a14SJustin T. GibbsPrint the element source address for each element.
24020bf9a14SJustin T. Gibbs.It Fl b
241eccea571SRuslan ErmilovPrint SCSI bus information for each element.
242eccea571SRuslan ErmilovNote that this information
24320bf9a14SJustin T. Gibbsis valid only for drives.
24420bf9a14SJustin T. Gibbs.It Fl I
245eccea571SRuslan ErmilovPrint the internal element addresses for each element.
246eccea571SRuslan ErmilovThe internal
247eccea571SRuslan Ermilovelement address is not normally used with this driver.
248eccea571SRuslan ErmilovIt is reported
24920bf9a14SJustin T. Gibbsfor diagnostic purposes only.
25020bf9a14SJustin T. Gibbs.It Fl a
25120bf9a14SJustin T. GibbsPrint all additional information (as in
25294ba280cSRuslan Ermilov.Fl vVsSba ) .
253cbf6f7d3SPhilippe Charnier.El
254224c8a5bSJoerg Wunsch.Pp
255224c8a5bSJoerg WunschThe status bits are defined as follows:
256224c8a5bSJoerg Wunsch.Bl -tag -width indent
257cbf6f7d3SPhilippe Charnier.It FULL
258224c8a5bSJoerg WunschElement contains a media unit.
259cbf6f7d3SPhilippe Charnier.It IMPEXP
260224c8a5bSJoerg WunschMedia was deposited into element by an outside human operator.
261cbf6f7d3SPhilippe Charnier.It EXCEPT
262224c8a5bSJoerg WunschElement is in an abnormal state.
263cbf6f7d3SPhilippe Charnier.It ACCESS
264224c8a5bSJoerg WunschMedia in this element is accessible by a picker.
265cbf6f7d3SPhilippe Charnier.It EXENAB
26632c21313SSteve PriceElement supports passing media (exporting) to an outside human operator.
267cbf6f7d3SPhilippe Charnier.It INENAB
268224c8a5bSJoerg WunschElement supports receiving media (importing) from an outside human operator.
269224c8a5bSJoerg Wunsch.El
270224c8a5bSJoerg Wunsch.Sh EXAMPLES
271cbf6f7d3SPhilippe Charnier.Bl -tag -width indent
2729b24396bSSheldon Hearn.It Li chio move slot 3 drive 0
273cbf6f7d3SPhilippe CharnierMove the media in slot 3 (fourth slot) to drive 0 (first drive).
2749b24396bSSheldon Hearn.It Li chio move voltag VOLUME01 drive 0
275f944dc77SKenneth D. MerryMove the media with the barcode VOLUME01 to drive 0 (first drive).
2769b24396bSSheldon Hearn.It Li chio return drive 0
277f944dc77SKenneth D. MerryRemove the tape from drive 0 (first drive) and return it to its original
278f944dc77SKenneth D. Merrylocation in the rack.
2799b24396bSSheldon Hearn.It Li chio setpicker 2
280cbf6f7d3SPhilippe CharnierConfigure the changer to use picker 2 (third picker) for operations.
281cbf6f7d3SPhilippe Charnier.El
282224c8a5bSJoerg Wunsch.Sh FILES
283cbf6f7d3SPhilippe Charnier.Bl -tag -width /dev/ch0 -compact
284cbf6f7d3SPhilippe Charnier.It Pa /dev/ch0
285cbf6f7d3SPhilippe Charnierdefault changer device
286cbf6f7d3SPhilippe Charnier.El
287224c8a5bSJoerg Wunsch.Sh SEE ALSO
288224c8a5bSJoerg Wunsch.Xr mt 1 ,
28932e5e4cfSBen Smithurst.Xr mount 8
29005e61fd5SPhilippe Charnier.Sh AUTHORS
291725ab628SRuslan Ermilov.An -nosplit
292224c8a5bSJoerg WunschThe
293cbf6f7d3SPhilippe Charnier.Nm
29405e61fd5SPhilippe Charnierprogram and SCSI changer driver were written by
29505e61fd5SPhilippe Charnier.An Jason R. Thorpe Aq thorpej@and.com
296725ab628SRuslan Ermilovfor And Communications,
297725ab628SRuslan Ermilov.Pa http://www.and.com/ .
298726b61abSRuslan Ermilov.Pp
29920bf9a14SJustin T. GibbsAdditional work by
300f944dc77SKenneth D. Merry.An Hans Huebner
301f944dc77SKenneth D. Merry.Aq hans@artcom.de
302726b61abSRuslan Ermilovand
303726b61abSRuslan Ermilov.An Steve Gunn
304725ab628SRuslan Ermilov.Aq csg@waterspout.com .
305