xref: /netbsd/bin/chio/chio.1 (revision bf9ec67e)
1.\"	$NetBSD: chio.1,v 1.13 2002/02/08 01:21:55 ross Exp $
2.\"
3.\" Copyright (c) 1996, 1998, 1999 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
8.\" NASA Ames Research Center.
9.\"
10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions
12.\" are met:
13.\" 1. Redistributions of source code must retain the above copyright
14.\"    notice, this list of conditions and the following disclaimer.
15.\" 2. Redistributions in binary form must reproduce the above copyright
16.\"    notice, this list of conditions and the following disclaimer in the
17.\"    documentation and/or other materials provided with the distribution.
18.\" 3. All advertising materials mentioning features or use of this software
19.\"    must display the following acknowledgement:
20.\"        This product includes software developed by the NetBSD
21.\"        Foundation, Inc. and its contributors.
22.\" 4. Neither the name of The NetBSD Foundation nor the names of its
23.\"    contributors may be used to endorse or promote products derived
24.\"    from this software without specific prior written permission.
25.\"
26.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36.\" POSSIBILITY OF SUCH DAMAGE.
37.\"
38.Dd September 8, 1999
39.Dt CHIO 1
40.Os
41.Sh NAME
42.Nm chio
43.Nd medium changer control utility
44.Sh SYNOPSIS
45.Nm
46.Op Fl f Ar changer
47.Ar command
48.Ar arg1
49.Ar arg2
50.Oo
51.Ar arg3 Oo ...
52.Oc
53.Oc
54.Sh DESCRIPTION
55.Nm
56is used to control the operation of medium changers, such as those found
57in tape and optical disk jukeboxes.
58.Pp
59The options are as follows:
60.Bl -tag -width indent
61.It Fl f Ar changer
62Use the device
63.Pa changer
64rather than the default device
65.Pa /dev/ch0 .
66.El
67.Pp
68The default changer may be overridden by setting the environment variable
69.Ev CHANGER
70to the desired changer device.
71.Pp
72A medium changer apparatus is made up of
73.Pa elements .
74There are four element types:
75.Pa picker
76(medium transport),
77.Pa slot
78(storage),
79.Pa portal
80(import/export), and
81.Pa drive
82(data transfer).  In this command description, the shorthand
83.Ic ET
84will be used to represent an element type, and
85.Ic EU
86will be used to represent an element unit.  For example, to represent
87the first robotic arm in the changer, the ET would be
88.Dq picker
89and the EU would be
90.Dq 0 .
91.Sh SUPPORTED COMMANDS
92.Nm
93.Ic move
94.Ar \*[Lt]from ET\*[Gt] \*[Lt]from EU\*[Gt] \*[Lt]to ET\*[Gt] \*[Lt]to EU\*[Gt]
95.Op Ar inv
96.Pp
97Moves the media unit from
98.Pa \*[Lt]from ET/EU\*[Gt]
99to
100.Pa \*[Lt]to ET/EU\*[Gt] .
101If the optional modifier
102.Pa inv
103is specified, the media unit will be inverted before insertion.
104.Pp
105.Nm
106.Ic exchange
107.Ar \*[Lt]src ET\*[Gt] \*[Lt]src EU\*[Gt] \*[Lt]dst1 ET\*[Gt] \*[Lt]dst1 EU\*[Gt]
108.Op Ar \*[Lt]dst2 ET\*[Gt] \*[Lt]dst2 ET\*[Gt]
109.Op Ar inv1
110.Op Ar inv2
111.Pp
112Performs a media unit exchange operation.  The media unit in
113.Pa \*[Lt]src ET/EU\*[Gt]
114is moved to
115.Pa \*[Lt]dst1 ET/EU\*[Gt]
116and the media unit previously in
117.Pa \*[Lt]dst1 ET/EU\*[Gt]
118is moved to
119.Pa \*[Lt]dst2 ET/EU\*[Gt] .
120In the case of a simple exchange,
121.Pa \*[Lt]dst2 ET/EU\*[Gt]
122is omitted and the values
123.Pa \*[Lt]src ET/EU\*[Gt]
124are used in their place.
125The optional modifiers
126.Pa inv1
127and
128.Pa inv2
129specify whether the media units are to be inverted before insertion into
130.Pa \*[Lt]dst1 ET/EU\*[Gt]
131and
132.Pa \*[Lt]dst2 ET/EU\*[Gt]
133respectively.
134.Pp
135Note that not all medium changers support the
136.Ic exchange
137operation; The changer must have multiple free pickers or emulate
138multiple free pickers with transient storage.
139.Pp
140.Nm
141.Ic position
142.Ar \*[Lt]to ET\*[Gt] \*[Lt]to EU\*[Gt]
143.Op Ar inv
144.Pp
145Position the picker in front of the element described by
146.Pa \*[Lt]to ET/EU\*[Gt] .
147If the optional modifier
148.Pa inv
149is specified, the media unit will be inverted before insertion.
150.Pp
151Note that not all changers behave as expected when issued this command.
152.Pp
153.Nm
154.Ic params
155.Pp
156Report the number of slots, drives, pickers, and portals in the changer,
157and which picker unit the changer is currently configured to use.
158.Pp
159.Nm
160.Ic getpicker
161.Pp
162Report which picker unit the changer is currently configured to use.
163.Pp
164.Nm
165.Ic setpicker
166.Ar \*[Lt]unit\*[Gt]
167.Pp
168Configure the changer to use picker
169.Pa \*[Lt]unit\*[Gt] .
170.Pp
171.Nm
172.Ic status
173.Oo Ar \*[Lt]type\*[Gt] Oo unit Oo count Oc Oc Oc
174.Op Ar voltags
175.Pp
176Report the status of all elements in the changer.  If
177.Pa \*[Lt]type\*[Gt]
178is specified, report the status of all elements of type
179.Pa \*[Lt]type\*[Gt] .
180.Pp
181The status bits are defined as follows:
182.Bl -tag -width indent
183.It Nm FULL
184Element contains a media unit.
185.It Nm IMPEXP
186Media was deposited into element by an outside human operator.
187.It Nm EXCEPT
188Element is in an abnormal state.
189.It Nm ACCESS
190Media in this element is accessible by a picker.
191.It Nm EXENAB
192Element supports passing media (exporting) to an outside human operator.
193.It Nm INENAB
194Element supports receiving media (importing) from an outside human operator.
195.El
196.Pp
197If the element is a drive, the device name of the drive will be reported
198if it is available.
199.Pp
200If the
201.Op Ar voltags
202option is specified, primary and alternate volume tag information will
203be reported, if available.
204.Pp
205If the previous location of the media is available, it will also be reported.
206.Pp
207.Nm
208.Ic ielem
209.Pp
210Perform an
211.Em INITIALIZE ELEMENT STATUS
212operation on the changer.
213.Pp
214.Nm
215.Ic cdlu
216.Ar \*[Lt]sub-command\*[Gt]
217.Ar \*[Lt]slot\*[Gt]
218.Pp
219This command is provided for controlling CD-ROM changer mechanisms which
220cannot use the standard changer control interface.  ATAPI CD-ROM changers
221fall into this category.  There are 3 sub-commands:
222.Bl -tag -width indent
223.It Nm load
224Loads the media from the specified slot into the CD-ROM drive.
225.It Nm unload
226Unloads the media from the CD-ROM drive and returns it to the specified slot.
227.It Nm abort
228Aborts any pending load or unload operation.
229.El
230.Sh FILES
231/dev/ch0 - default changer device
232.Sh EXAMPLES
233.Dl chio -f /dev/ch0 move slot 3 drive 0
234.Pp
235Moves the media in slot 3 (fourth slot) to drive 0 (first drive).
236.Pp
237.Dl chio setpicker 2
238.Pp
239Configures the changer to use picker 2 (third picker) for operations.
240.Pp
241.Dl chio -f /dev/cd0a cdlu load 1
242.Pp
243Loads the media from slot (second slot) into the CD-ROM drive.
244.Pp
245.Dl chio -f /dev/ch1 status
246.Pp
247Returns status of all elements in the second changer.
248.Sh SEE ALSO
249.Xr mt 1 ,
250.Xr mount 8
251.Sh AUTHORS
252The
253.Nm
254program and SCSI changer driver were originally written by Jason R. Thorpe
255for And Communications, http://www.and.com/.  Additional development was
256done by Jason R. Thorpe for the Numerical Aerospace Simulation Facility,
257NASA Ames Research Center.
258