1.\" $NetBSD: chio.1,v 1.14 2002/09/25 15:18:37 wiz 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). 83In this command description, the shorthand 84.Ic ET 85will be used to represent an element type, and 86.Ic EU 87will be used to represent an element unit. 88For example, to represent 89the first robotic arm in the changer, the ET would be 90.Dq picker 91and the EU would be 92.Dq 0 . 93.Sh SUPPORTED COMMANDS 94.Nm 95.Ic move 96.Ar \*[Lt]from ET\*[Gt] \*[Lt]from EU\*[Gt] \*[Lt]to ET\*[Gt] \*[Lt]to EU\*[Gt] 97.Op Ar inv 98.Pp 99Moves the media unit from 100.Pa \*[Lt]from ET/EU\*[Gt] 101to 102.Pa \*[Lt]to ET/EU\*[Gt] . 103If the optional modifier 104.Pa inv 105is specified, the media unit will be inverted before insertion. 106.Pp 107.Nm 108.Ic exchange 109.Ar \*[Lt]src ET\*[Gt] \*[Lt]src EU\*[Gt] \*[Lt]dst1 ET\*[Gt] \*[Lt]dst1 EU\*[Gt] 110.Op Ar \*[Lt]dst2 ET\*[Gt] \*[Lt]dst2 ET\*[Gt] 111.Op Ar inv1 112.Op Ar inv2 113.Pp 114Performs a media unit exchange operation. 115The media unit in 116.Pa \*[Lt]src ET/EU\*[Gt] 117is moved to 118.Pa \*[Lt]dst1 ET/EU\*[Gt] 119and the media unit previously in 120.Pa \*[Lt]dst1 ET/EU\*[Gt] 121is moved to 122.Pa \*[Lt]dst2 ET/EU\*[Gt] . 123In the case of a simple exchange, 124.Pa \*[Lt]dst2 ET/EU\*[Gt] 125is omitted and the values 126.Pa \*[Lt]src ET/EU\*[Gt] 127are used in their place. 128The optional modifiers 129.Pa inv1 130and 131.Pa inv2 132specify whether the media units are to be inverted before insertion into 133.Pa \*[Lt]dst1 ET/EU\*[Gt] 134and 135.Pa \*[Lt]dst2 ET/EU\*[Gt] 136respectively. 137.Pp 138Note that not all medium changers support the 139.Ic exchange 140operation; The changer must have multiple free pickers or emulate 141multiple free pickers with transient storage. 142.Pp 143.Nm 144.Ic position 145.Ar \*[Lt]to ET\*[Gt] \*[Lt]to EU\*[Gt] 146.Op Ar inv 147.Pp 148Position the picker in front of the element described by 149.Pa \*[Lt]to ET/EU\*[Gt] . 150If the optional modifier 151.Pa inv 152is specified, the media unit will be inverted before insertion. 153.Pp 154Note that not all changers behave as expected when issued this command. 155.Pp 156.Nm 157.Ic params 158.Pp 159Report the number of slots, drives, pickers, and portals in the changer, 160and which picker unit the changer is currently configured to use. 161.Pp 162.Nm 163.Ic getpicker 164.Pp 165Report which picker unit the changer is currently configured to use. 166.Pp 167.Nm 168.Ic setpicker 169.Ar \*[Lt]unit\*[Gt] 170.Pp 171Configure the changer to use picker 172.Pa \*[Lt]unit\*[Gt] . 173.Pp 174.Nm 175.Ic status 176.Oo Ar \*[Lt]type\*[Gt] Oo unit Oo count Oc Oc Oc 177.Op Ar voltags 178.Pp 179Report the status of all elements in the changer. 180If 181.Pa \*[Lt]type\*[Gt] 182is specified, report the status of all elements of type 183.Pa \*[Lt]type\*[Gt] . 184.Pp 185The status bits are defined as follows: 186.Bl -tag -width indent 187.It Nm FULL 188Element contains a media unit. 189.It Nm IMPEXP 190Media was deposited into element by an outside human operator. 191.It Nm EXCEPT 192Element is in an abnormal state. 193.It Nm ACCESS 194Media in this element is accessible by a picker. 195.It Nm EXENAB 196Element supports passing media (exporting) to an outside human operator. 197.It Nm INENAB 198Element supports receiving media (importing) from an outside human operator. 199.El 200.Pp 201If the element is a drive, the device name of the drive will be reported 202if it is available. 203.Pp 204If the 205.Op Ar voltags 206option is specified, primary and alternate volume tag information will 207be reported, if available. 208.Pp 209If the previous location of the media is available, it will also be reported. 210.Pp 211.Nm 212.Ic ielem 213.Pp 214Perform an 215.Em INITIALIZE ELEMENT STATUS 216operation on the changer. 217.Pp 218.Nm 219.Ic cdlu 220.Ar \*[Lt]sub-command\*[Gt] 221.Ar \*[Lt]slot\*[Gt] 222.Pp 223This command is provided for controlling CD-ROM changer mechanisms which 224cannot use the standard changer control interface. 225ATAPI CD-ROM changers fall into this category. 226There are 3 sub-commands: 227.Bl -tag -width indent 228.It Nm load 229Loads the media from the specified slot into the CD-ROM drive. 230.It Nm unload 231Unloads the media from the CD-ROM drive and returns it to the specified slot. 232.It Nm abort 233Aborts any pending load or unload operation. 234.El 235.Sh FILES 236/dev/ch0 - default changer device 237.Sh EXAMPLES 238.Dl chio -f /dev/ch0 move slot 3 drive 0 239.Pp 240Moves the media in slot 3 (fourth slot) to drive 0 (first drive). 241.Pp 242.Dl chio setpicker 2 243.Pp 244Configures the changer to use picker 2 (third picker) for operations. 245.Pp 246.Dl chio -f /dev/cd0a cdlu load 1 247.Pp 248Loads the media from slot (second slot) into the CD-ROM drive. 249.Pp 250.Dl chio -f /dev/ch1 status 251.Pp 252Returns status of all elements in the second changer. 253.Sh SEE ALSO 254.Xr mt 1 , 255.Xr mount 8 256.Sh AUTHORS 257The 258.Nm 259program and SCSI changer driver were originally written by Jason R. Thorpe 260for And Communications, http://www.and.com/. 261Additional development was 262done by Jason R. Thorpe for the Numerical Aerospace Simulation Facility, 263NASA Ames Research Center. 264