]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - bin/chio/chio.1
MFC r306714:
[FreeBSD/stable/10.git] / bin / chio / chio.1
1 .\"     $NetBSD: chio.1,v 1.4 1997/10/02 00:41:25 hubertf Exp $
2 .\"-
3 .\" Copyright (c) 1996 Jason R. Thorpe <thorpej@and.com>
4 .\" All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. All advertising materials mentioning features or use of this software
15 .\"    must display the following acknowledgements:
16 .\"     This product includes software developed by Jason R. Thorpe
17 .\"     for And Communications, http://www.and.com/
18 .\" 4. The name of the author may not be used to endorse or promote products
19 .\"    derived from this software without specific prior written permission.
20 .\"
21 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26 .\" BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28 .\" AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 .\" OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" SUCH DAMAGE.
32 .\"
33 .\" $FreeBSD$
34 .\"
35 .Dd October 5, 2016
36 .Dt CHIO 1
37 .Os
38 .Sh NAME
39 .Nm chio
40 .Nd medium changer control utility
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl f Ar changer
44 .Ar command
45 .Op Fl <flags>
46 .Ar arg1
47 .Ar arg2
48 .Op Ar arg3 Op ...
49 .Sh DESCRIPTION
50 The
51 .Nm
52 utility is used to control the operation of medium changers, such as those
53 found in tape and optical disk jukeboxes.
54 .Pp
55 The options are as follows:
56 .Bl -tag -width indent
57 .It Fl f Ar changer
58 Use the device
59 .Ar changer
60 rather than the default device
61 .Pa /dev/ch0 .
62 .El
63 .Pp
64 A medium changer apparatus is made up of
65 .Em elements .
66 There are five element types:
67 .Em picker
68 (medium transport),
69 .Em slot
70 (storage),
71 .Em portal
72 (import/export),
73 .Em drive
74 (data transfer), and
75 .Em voltag
76 (select by volume identifier).
77 The
78 .Em voltag
79 pseudo-element type allows the selection of tapes by their volume tag
80 (typically a barcode on the tape).
81 .Pp
82 In this command description, the shorthand
83 .Em ET
84 will be used to represent an element type, and
85 .Em EU
86 will be used to represent an element unit.
87 For example, to represent the first robotic arm in the changer, the
88 .Em ET
89 would be
90 .Dq picker
91 and the
92 .Em EU
93 would be
94 .Dq 0 .
95 .Sh SUPPORTED COMMANDS
96 .Bl -tag -width indent
97 .It Ic move Xo
98 .Ar <from ET> <from EU> <to ET> <to EU>
99 .Op Cm inv
100 .Xc
101 Move the media unit from
102 .Ar <from ET/EU>
103 to
104 .Ar <to ET/EU> .
105 If the optional modifier
106 .Cm inv
107 is specified, the media unit will be inverted before insertion.
108 .It Ic exchange Xo
109 .Ar <src ET> <src EU> <dst1 ET> <dst1 EU>
110 .Op Ar <dst2 ET> <dst2 ET>
111 .Op Cm inv1
112 .Op Cm inv2
113 .Xc
114 Perform a media unit exchange operation.
115 The media unit in
116 .Ar <src ET/EU>
117 is moved to
118 .Ar <dst1 ET/EU>
119 and the media unit previously in
120 .Ar <dst1 ET/EU>
121 is moved to
122 .Ar <dst2 ET/EU> .
123 In the case of a simple exchange,
124 .Ar <dst2 ET/EU>
125 is omitted and the values
126 .Ar <src ET/EU>
127 are used in their place.
128 The optional modifiers
129 .Cm inv1
130 and
131 .Cm inv2
132 specify whether the media units are to be inverted before insertion into
133 .Ar <dst1 ET/EU>
134 and
135 .Ar <dst2 ET/EU>
136 respectively.
137 .Pp
138 Note that not all medium changers support the
139 .Ic exchange
140 operation; the changer must have multiple free pickers or emulate
141 multiple free pickers with transient storage.
142 .It Ic return Xo
143 .Ar <from ET> <from EU>
144 .Xc
145 Return the media unit to its source element.
146 This command will query the status of the specified media unit, and
147 will move it to the element specified in its source attribute.
148 This is a convenient way to return media from a drive or portal
149 to its previous element in the changer.
150 .Pp
151 .It Ic position Xo
152 .Ar <to ET> <to EU>
153 .Op Cm inv
154 .Xc
155 Position the picker in front of the element described by
156 .Ar <to ET/EU> .
157 If the optional modifier
158 .Cm inv
159 is specified, the media unit will be inverted before insertion.
160 .Pp
161 Note that not all changers behave as expected when issued this command.
162 .It Ic params
163 Report the number of slots, drives, pickers, and portals in the changer,
164 and which picker unit the changer is currently configured to use.
165 .It Ic getpicker
166 Report which picker unit the changer is currently configured to use.
167 .It Ic setpicker Xo
168 .Ar <unit>
169 .Xc
170 Configure the changer to use picker
171 .Ar <unit> .
172 .Pp
173 .It Ic ielem Xo
174 .Op Ar <timeout>
175 .Xc
176 Perform an
177 .Em INITIALIZE ELEMENT STATUS
178 operation on the changer.
179 The optional
180 .Ar <timeout>
181 parameter may be given to specify a timeout in seconds for the
182 operations.
183 This may be used if the operation takes unusually long
184 because of buggy firmware or the like.
185 .It Ic voltag Xo
186 .Op Fl fca
187 .Ar <ET>
188 .Ar <EU>
189 .Op Ar <label>
190 .Op Ar <serial>
191 .Xc
192 Change volume tag for an element in the media changer.
193 This command
194 is only supported by few media changers.
195 If it is not supported by a
196 device, using this command will usually result in an "Invalid Field in
197 CDB" error message on the console.
198 .Pp
199 If the
200 .Fl c
201 flag is specified, the volume tag of the specified element is
202 cleared.
203 If the
204 .Fl f
205 flag is specified, the volume tag is superseded with the specified
206 volume tag even if a volume tag is already defined for the element.
207 It is an error to not specify the
208 .Fl f
209 flag when trying to set a label for an element which already has
210 volume tag information defined.
211 .Pp
212 The command works with the primary volume tag or, if the
213 .Fl a
214 flag is given, with the alternate volume tag.
215 .It Ic status Xo
216 .Op Fl vVsSbIa
217 .Op Ar <type>
218 .Xc
219 Report the status of all elements in the changer.
220 If
221 .Ar <type>
222 is specified, report the status of all elements of type
223 .Ar <type> .
224 .It Fl v
225 Print the primary volume tag for each loaded medium, if any.
226 The volume
227 tag is printed as
228 .Dq <LABEL:SERIAL> .
229 .It Fl V
230 Print the alternate volume tag for each loaded medium, if any.
231 .It Fl s
232 Print the additional sense code and additional sense code qualifier for
233 each element.
234 .It Fl S
235 Print the element source address for each element.
236 .It Fl b
237 Print SCSI bus information for each element.
238 Note that this information
239 is valid only for drives.
240 .It Fl I
241 Print the internal element addresses for each element.
242 The internal
243 element address is not normally used with this driver.
244 It is reported
245 for diagnostic purposes only.
246 .It Fl a
247 Print all additional information (as in
248 .Fl vVsSba ) .
249 .El
250 .Pp
251 The status bits are defined as follows:
252 .Bl -tag -width indent
253 .It FULL
254 Element contains a media unit.
255 .It IMPEXP
256 Media was deposited into element by an outside human operator.
257 .It EXCEPT
258 Element is in an abnormal state.
259 .It ACCESS
260 Media in this element is accessible by a picker.
261 .It EXENAB
262 Element supports passing media (exporting) to an outside human operator.
263 .It INENAB
264 Element supports receiving media (importing) from an outside human operator.
265 .El
266 .Sh ENVIRONMENT
267 .Bl -tag -width CHANGER
268 .It Ev CHANGER
269 The default changer may be overridden by setting this environmental
270 variable to the desired changer device.
271 .El
272 .Sh FILES
273 .Bl -tag -width /dev/ch0 -compact
274 .It Pa /dev/ch0
275 default changer device
276 .El
277 .Sh EXAMPLES
278 .Bl -tag -width indent
279 .It Li chio move slot 3 drive 0
280 Move the media in slot 3 (fourth slot) to drive 0 (first drive).
281 .It Li chio move voltag VOLUME01 drive 0
282 Move the media with the barcode VOLUME01 to drive 0 (first drive).
283 .It Li chio return drive 0
284 Remove the tape from drive 0 (first drive) and return it to its original
285 location in the rack.
286 .It Li chio setpicker 2
287 Configure the changer to use picker 2 (third picker) for operations.
288 .El
289 .Sh SEE ALSO
290 .Xr mt 1 ,
291 .Xr mount 8
292 .Sh HISTORY
293 A
294 .Nm
295 utility appeared in
296 .Nx 1.3 .
297 .Nm
298 first appeared in
299 .Fx 2.2 .
300 .Sh AUTHORS
301 .An -nosplit
302 The
303 .Nm
304 program and SCSI changer driver were written by
305 .An Jason R. Thorpe Aq thorpej@and.com
306 for And Communications,
307 .Pa http://www.and.com/ .
308 .Pp
309 Additional work by
310 .An Hans Huebner
311 .Aq hans@artcom.de
312 and
313 .An Steve Gunn
314 .Aq csg@waterspout.com .