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