xref: /freebsd/bin/chio/chio.1 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
120bf9a14SJustin T. Gibbs.\"	$NetBSD: chio.1,v 1.4 1997/10/02 00:41:25 hubertf Exp $
29ddb49cbSWarner Losh.\"-
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.\"
33*58475c0dSSevan Janiyan.Dd October 5, 2016
34224c8a5bSJoerg Wunsch.Dt CHIO 1
35224c8a5bSJoerg Wunsch.Os
36224c8a5bSJoerg Wunsch.Sh NAME
37224c8a5bSJoerg Wunsch.Nm chio
38224c8a5bSJoerg Wunsch.Nd medium changer control utility
39224c8a5bSJoerg Wunsch.Sh SYNOPSIS
4020bf9a14SJustin T. Gibbs.Nm
41224c8a5bSJoerg Wunsch.Op Fl f Ar changer
42224c8a5bSJoerg Wunsch.Ar command
4320bf9a14SJustin T. Gibbs.Op Fl <flags>
44224c8a5bSJoerg Wunsch.Ar arg1
45224c8a5bSJoerg Wunsch.Ar arg2
46e30b1c64SRuslan Ermilov.Op Ar arg3 Op ...
47224c8a5bSJoerg Wunsch.Sh DESCRIPTION
4845ebb0c1SPhilippe CharnierThe
4920bf9a14SJustin T. Gibbs.Nm
5045ebb0c1SPhilippe Charnierutility is used to control the operation of medium changers, such as those
5145ebb0c1SPhilippe Charnierfound in tape and optical disk jukeboxes.
52224c8a5bSJoerg Wunsch.Pp
53224c8a5bSJoerg WunschThe options are as follows:
54224c8a5bSJoerg Wunsch.Bl -tag -width indent
55224c8a5bSJoerg Wunsch.It Fl f Ar changer
56224c8a5bSJoerg WunschUse the device
579b24396bSSheldon Hearn.Ar changer
58224c8a5bSJoerg Wunschrather than the default device
59224c8a5bSJoerg Wunsch.Pa /dev/ch0 .
60224c8a5bSJoerg Wunsch.El
61224c8a5bSJoerg Wunsch.Pp
62224c8a5bSJoerg WunschA medium changer apparatus is made up of
63cbf6f7d3SPhilippe Charnier.Em elements .
64f944dc77SKenneth D. MerryThere are five element types:
65cbf6f7d3SPhilippe Charnier.Em picker
66224c8a5bSJoerg Wunsch(medium transport),
67cbf6f7d3SPhilippe Charnier.Em slot
68224c8a5bSJoerg Wunsch(storage),
69cbf6f7d3SPhilippe Charnier.Em portal
70f944dc77SKenneth D. Merry(import/export),
71cbf6f7d3SPhilippe Charnier.Em drive
72f944dc77SKenneth D. Merry(data transfer), and
73f944dc77SKenneth D. Merry.Em voltag
74eccea571SRuslan Ermilov(select by volume identifier).
75eccea571SRuslan ErmilovThe
76f944dc77SKenneth D. Merry.Em voltag
77f944dc77SKenneth D. Merrypseudo-element type allows the selection of tapes by their volume tag
78f944dc77SKenneth D. Merry(typically a barcode on the tape).
79f944dc77SKenneth D. Merry.Pp
80f944dc77SKenneth D. MerryIn this command description, the shorthand
81cbf6f7d3SPhilippe Charnier.Em ET
82224c8a5bSJoerg Wunschwill be used to represent an element type, and
83cbf6f7d3SPhilippe Charnier.Em EU
84f944dc77SKenneth D. Merrywill be used to represent an element unit.
85f944dc77SKenneth D. MerryFor example, to represent the first robotic arm in the changer, the
86cbf6f7d3SPhilippe Charnier.Em ET
87cbf6f7d3SPhilippe Charnierwould be
88224c8a5bSJoerg Wunsch.Dq picker
89cbf6f7d3SPhilippe Charnierand the
90cbf6f7d3SPhilippe Charnier.Em EU
91cbf6f7d3SPhilippe Charnierwould be
92224c8a5bSJoerg Wunsch.Dq 0 .
93224c8a5bSJoerg Wunsch.Sh SUPPORTED COMMANDS
94cbf6f7d3SPhilippe Charnier.Bl -tag -width indent
959b24396bSSheldon Hearn.It Ic move Xo
96224c8a5bSJoerg Wunsch.Ar <from ET> <from EU> <to ET> <to EU>
9752e0c32bSRuslan Ermilov.Op Cm inv
98cbf6f7d3SPhilippe Charnier.Xc
99cbf6f7d3SPhilippe CharnierMove the media unit from
1009b24396bSSheldon Hearn.Ar <from ET/EU>
101224c8a5bSJoerg Wunschto
1029b24396bSSheldon Hearn.Ar <to ET/EU> .
103224c8a5bSJoerg WunschIf the optional modifier
10452e0c32bSRuslan Ermilov.Cm inv
105224c8a5bSJoerg Wunschis specified, the media unit will be inverted before insertion.
1069b24396bSSheldon Hearn.It Ic exchange Xo
107224c8a5bSJoerg Wunsch.Ar <src ET> <src EU> <dst1 ET> <dst1 EU>
108224c8a5bSJoerg Wunsch.Op Ar <dst2 ET> <dst2 ET>
10952e0c32bSRuslan Ermilov.Op Cm inv1
11052e0c32bSRuslan Ermilov.Op Cm inv2
111cbf6f7d3SPhilippe Charnier.Xc
112eccea571SRuslan ErmilovPerform a media unit exchange operation.
113eccea571SRuslan ErmilovThe media unit in
1149b24396bSSheldon Hearn.Ar <src ET/EU>
115224c8a5bSJoerg Wunschis moved to
1169b24396bSSheldon Hearn.Ar <dst1 ET/EU>
117224c8a5bSJoerg Wunschand the media unit previously in
1189b24396bSSheldon Hearn.Ar <dst1 ET/EU>
119224c8a5bSJoerg Wunschis moved to
1209b24396bSSheldon Hearn.Ar <dst2 ET/EU> .
121224c8a5bSJoerg WunschIn the case of a simple exchange,
1229b24396bSSheldon Hearn.Ar <dst2 ET/EU>
123224c8a5bSJoerg Wunschis omitted and the values
1249b24396bSSheldon Hearn.Ar <src ET/EU>
125224c8a5bSJoerg Wunschare used in their place.
126224c8a5bSJoerg WunschThe optional modifiers
12752e0c32bSRuslan Ermilov.Cm inv1
128224c8a5bSJoerg Wunschand
12952e0c32bSRuslan Ermilov.Cm inv2
130224c8a5bSJoerg Wunschspecify whether the media units are to be inverted before insertion into
1319b24396bSSheldon Hearn.Ar <dst1 ET/EU>
132224c8a5bSJoerg Wunschand
1339b24396bSSheldon Hearn.Ar <dst2 ET/EU>
134f6b31571SWolfram Schneiderrespectively.
135224c8a5bSJoerg Wunsch.Pp
136224c8a5bSJoerg WunschNote that not all medium changers support the
13720bf9a14SJustin T. Gibbs.Ic exchange
138305a253aSKris Kennawayoperation; the changer must have multiple free pickers or emulate
139224c8a5bSJoerg Wunschmultiple free pickers with transient storage.
1409b24396bSSheldon Hearn.It Ic return Xo
141f944dc77SKenneth D. Merry.Ar <from ET> <from EU>
142f944dc77SKenneth D. Merry.Xc
143f944dc77SKenneth D. MerryReturn the media unit to its source element.
144f944dc77SKenneth D. MerryThis command will query the status of the specified media unit, and
145f944dc77SKenneth D. Merrywill move it to the element specified in its source attribute.
146f944dc77SKenneth D. MerryThis is a convenient way to return media from a drive or portal
147f944dc77SKenneth D. Merryto its previous element in the changer.
1489b24396bSSheldon Hearn.It Ic position Xo
149224c8a5bSJoerg Wunsch.Ar <to ET> <to EU>
15052e0c32bSRuslan Ermilov.Op Cm inv
151cbf6f7d3SPhilippe Charnier.Xc
152224c8a5bSJoerg WunschPosition the picker in front of the element described by
1539b24396bSSheldon Hearn.Ar <to ET/EU> .
154224c8a5bSJoerg WunschIf the optional modifier
15552e0c32bSRuslan Ermilov.Cm inv
156224c8a5bSJoerg Wunschis specified, the media unit will be inverted before insertion.
157224c8a5bSJoerg Wunsch.Pp
158224c8a5bSJoerg WunschNote that not all changers behave as expected when issued this command.
1599b24396bSSheldon Hearn.It Ic params
160224c8a5bSJoerg WunschReport the number of slots, drives, pickers, and portals in the changer,
161224c8a5bSJoerg Wunschand which picker unit the changer is currently configured to use.
1629b24396bSSheldon Hearn.It Ic getpicker
163224c8a5bSJoerg WunschReport which picker unit the changer is currently configured to use.
1649b24396bSSheldon Hearn.It Ic setpicker Xo
165224c8a5bSJoerg Wunsch.Ar <unit>
166cbf6f7d3SPhilippe Charnier.Xc
167224c8a5bSJoerg WunschConfigure the changer to use picker
1689b24396bSSheldon Hearn.Ar <unit> .
1699b24396bSSheldon Hearn.It Ic ielem Xo
1709b24396bSSheldon Hearn.Op Ar <timeout>
17120bf9a14SJustin T. Gibbs.Xc
1729b24396bSSheldon HearnPerform an
1739b24396bSSheldon Hearn.Em INITIALIZE ELEMENT STATUS
174eccea571SRuslan Ermilovoperation on the changer.
175eccea571SRuslan ErmilovThe optional
1769b24396bSSheldon Hearn.Ar <timeout>
17720bf9a14SJustin T. Gibbsparameter may be given to specify a timeout in seconds for the
178eccea571SRuslan Ermilovoperations.
179eccea571SRuslan ErmilovThis may be used if the operation takes unusually long
18020bf9a14SJustin T. Gibbsbecause of buggy firmware or the like.
1819b24396bSSheldon Hearn.It Ic voltag Xo
18220bf9a14SJustin T. Gibbs.Op Fl fca
18320bf9a14SJustin T. Gibbs.Ar <ET>
18420bf9a14SJustin T. Gibbs.Ar <EU>
18520bf9a14SJustin T. Gibbs.Op Ar <label>
18620bf9a14SJustin T. Gibbs.Op Ar <serial>
18720bf9a14SJustin T. Gibbs.Xc
188eccea571SRuslan ErmilovChange volume tag for an element in the media changer.
189eccea571SRuslan ErmilovThis command
190eccea571SRuslan Ermilovis only supported by few media changers.
191eccea571SRuslan ErmilovIf it is not supported by a
1929d5abbddSJens Schweikhardtdevice, using this command will usually result in an "Invalid Field in
19320bf9a14SJustin T. GibbsCDB" error message on the console.
19420bf9a14SJustin T. Gibbs.Pp
19520bf9a14SJustin T. GibbsIf the
19620bf9a14SJustin T. Gibbs.Fl c
19720bf9a14SJustin T. Gibbsflag is specified, the volume tag of the specified element is
198eccea571SRuslan Ermilovcleared.
199eccea571SRuslan ErmilovIf the
20020bf9a14SJustin T. Gibbs.Fl f
201969385c1SBill Fumerolaflag is specified, the volume tag is superseded with the specified
20220bf9a14SJustin T. Gibbsvolume tag even if a volume tag is already defined for the element.
20320bf9a14SJustin T. GibbsIt is an error to not specify the
20420bf9a14SJustin T. Gibbs.Fl f
20520bf9a14SJustin T. Gibbsflag when trying to set a label for an element which already has
20620bf9a14SJustin T. Gibbsvolume tag information defined.
20720bf9a14SJustin T. Gibbs.Pp
20820bf9a14SJustin T. GibbsThe command works with the primary volume tag or, if the
20920bf9a14SJustin T. Gibbs.Fl a
21020bf9a14SJustin T. Gibbsflag is given, with the alternate volume tag.
2119b24396bSSheldon Hearn.It Ic status Xo
21220bf9a14SJustin T. Gibbs.Op Fl vVsSbIa
213224c8a5bSJoerg Wunsch.Op Ar <type>
214cbf6f7d3SPhilippe Charnier.Xc
215eccea571SRuslan ErmilovReport the status of all elements in the changer.
216eccea571SRuslan ErmilovIf
2179b24396bSSheldon Hearn.Ar <type>
218224c8a5bSJoerg Wunschis specified, report the status of all elements of type
2199b24396bSSheldon Hearn.Ar <type> .
22020bf9a14SJustin T. Gibbs.It Fl v
221eccea571SRuslan ErmilovPrint the primary volume tag for each loaded medium, if any.
222eccea571SRuslan ErmilovThe volume
2239b24396bSSheldon Hearntag is printed as
2249b24396bSSheldon Hearn.Dq <LABEL:SERIAL> .
22520bf9a14SJustin T. Gibbs.It Fl V
22620bf9a14SJustin T. GibbsPrint the alternate volume tag for each loaded medium, if any.
22720bf9a14SJustin T. Gibbs.It Fl s
22820bf9a14SJustin T. GibbsPrint the additional sense code and additional sense code qualifier for
22920bf9a14SJustin T. Gibbseach element.
23020bf9a14SJustin T. Gibbs.It Fl S
23120bf9a14SJustin T. GibbsPrint the element source address for each element.
23220bf9a14SJustin T. Gibbs.It Fl b
233eccea571SRuslan ErmilovPrint SCSI bus information for each element.
234eccea571SRuslan ErmilovNote that this information
23520bf9a14SJustin T. Gibbsis valid only for drives.
23620bf9a14SJustin T. Gibbs.It Fl I
237eccea571SRuslan ErmilovPrint the internal element addresses for each element.
238eccea571SRuslan ErmilovThe internal
239eccea571SRuslan Ermilovelement address is not normally used with this driver.
240eccea571SRuslan ErmilovIt is reported
24120bf9a14SJustin T. Gibbsfor diagnostic purposes only.
24220bf9a14SJustin T. Gibbs.It Fl a
24320bf9a14SJustin T. GibbsPrint all additional information (as in
24494ba280cSRuslan Ermilov.Fl vVsSba ) .
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
262cc7a0639SSevan Janiyan.Sh ENVIRONMENT
263cc7a0639SSevan Janiyan.Bl -tag -width CHANGER
264cc7a0639SSevan Janiyan.It Ev CHANGER
265cc7a0639SSevan JaniyanThe default changer may be overridden by setting this environmental
266cc7a0639SSevan Janiyanvariable to the desired changer device.
267cc7a0639SSevan Janiyan.El
2686fca4c7cSRuslan Ermilov.Sh FILES
2696fca4c7cSRuslan Ermilov.Bl -tag -width /dev/ch0 -compact
2706fca4c7cSRuslan Ermilov.It Pa /dev/ch0
2716fca4c7cSRuslan Ermilovdefault changer device
2726fca4c7cSRuslan Ermilov.El
273224c8a5bSJoerg Wunsch.Sh EXAMPLES
274cbf6f7d3SPhilippe Charnier.Bl -tag -width indent
2759b24396bSSheldon Hearn.It Li chio move slot 3 drive 0
276cbf6f7d3SPhilippe CharnierMove the media in slot 3 (fourth slot) to drive 0 (first drive).
2779b24396bSSheldon Hearn.It Li chio move voltag VOLUME01 drive 0
278f944dc77SKenneth D. MerryMove the media with the barcode VOLUME01 to drive 0 (first drive).
2799b24396bSSheldon Hearn.It Li chio return drive 0
280f944dc77SKenneth D. MerryRemove the tape from drive 0 (first drive) and return it to its original
281f944dc77SKenneth D. Merrylocation in the rack.
2829b24396bSSheldon Hearn.It Li chio setpicker 2
283cbf6f7d3SPhilippe CharnierConfigure the changer to use picker 2 (third picker) for operations.
284cbf6f7d3SPhilippe Charnier.El
285224c8a5bSJoerg Wunsch.Sh SEE ALSO
286224c8a5bSJoerg Wunsch.Xr mt 1 ,
28732e5e4cfSBen Smithurst.Xr mount 8
288*58475c0dSSevan Janiyan.Sh HISTORY
289*58475c0dSSevan JaniyanA
290*58475c0dSSevan Janiyan.Nm
291*58475c0dSSevan Janiyanutility appeared in
292*58475c0dSSevan Janiyan.Nx 1.3 .
293*58475c0dSSevan Janiyan.Nm
294*58475c0dSSevan Janiyanfirst appeared in
295*58475c0dSSevan Janiyan.Fx 2.2 .
29605e61fd5SPhilippe Charnier.Sh AUTHORS
297725ab628SRuslan Ermilov.An -nosplit
298224c8a5bSJoerg WunschThe
299cbf6f7d3SPhilippe Charnier.Nm
30005e61fd5SPhilippe Charnierprogram and SCSI changer driver were written by
301bd0891ceSBaptiste Daroussin.An Jason R. Thorpe Aq Mt thorpej@and.com
302725ab628SRuslan Ermilovfor And Communications,
303725ab628SRuslan Ermilov.Pa http://www.and.com/ .
304726b61abSRuslan Ermilov.Pp
30520bf9a14SJustin T. GibbsAdditional work by
306bd0891ceSBaptiste Daroussin.An Hans Huebner Aq Mt hans@artcom.de
307726b61abSRuslan Ermilovand
308bd0891ceSBaptiste Daroussin.An Steve Gunn Aq Mt csg@waterspout.com .
309