1.\" $NetBSD: scsictl.8,v 1.13 2001/11/16 11:26:56 wiz Exp $ 2.\" 3.\" Copyright (c) 1998 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 October 15, 1998 39.Dt SCSICTL 8 40.Os 41.Sh NAME 42.Nm scsictl 43.Nd a program to manipulate SCSI devices and busses 44.Sh SYNOPSIS 45.Nm 46.Ar device 47.Ar command 48.Oo 49.Ar arg Oo ... 50.Oc 51.Oc 52.Sh DESCRIPTION 53.Nm 54allows a user or system administrator to issue commands to and otherwise 55control SCSI devices and busses. It is used by specifying a device or 56bus to manipulate, the command to perform, and any arguments the command 57may require. 58.Nm 59determines if the specified device is an actual device or a SCSI bus 60automatically, and selects the appropriate command set. 61.Pp 62For commands which 63.Nm 64issues a SCSI command to the device directly, any returned sense information 65will be decoded by 66.Nm 67and displayed to the standard output. 68.Sh DEVICE COMMANDS 69The following commands are supported for SCSI devices: 70.Pp 71.Nm format 72.Pp 73(Low level) format the named device. 74.Pp 75.Nm identify 76.Pp 77Identify the specified device, displaying the device's SCSI 78bus, target, and lun, as well as the device's vendor, product, 79and revision strings. 80.Pp 81.Nm reassign 82.Ar blkno 83.Oo blkno Oo ... 84.Oc 85.Oc 86.Pp 87Issues a 88.Li REASSIGN BLOCKS 89command to the device, adding the specified blocks to the 90grown defect list. This command is only supported on 91direct access devices. 92.Pp 93.Nm reset 94.Pp 95Reset the device. This command is only supported for devices which 96support the 97.Li SCIOCRESET 98ioctl. 99.Sh BUS COMMANDS 100The following commands are supported for SCSI busses: 101.Pp 102.Nm reset 103.Pp 104Reset the SCSI bus. This command is only supported if the host adapter 105supports the 106.Li SCBUSIORESET 107ioctl. 108.Pp 109.Nm scan 110.Ar target 111.Ar lun 112.Pp 113Scan the SCSI bus for devices. This is useful if a device was not 114connected or powered on when the system was booted. The 115.Ar target 116and 117.Ar lun 118arguments specify which SCSI target and lun on the bus is to be scanned. 119Either may be wildcarded by specifying the keyword 120.Dq any 121or 122.Dq all . 123.Pp 124.Nm detach 125.Ar target 126.Ar lun 127.Pp 128Detach the specified device from the bus. Useful if a device is powered down 129after use. The 130.Ar target 131and 132.Ar lun 133arguments have the same meaning as for the 134.Nm scan 135command, and may also be wildcarded. 136.Sh NOTES 137When scanning the SCSI bus, information about newly recognized devices 138is printed to console. No information is printed for already probed 139devices. 140.Sh FILES 141.Pa /dev/scsibus* 142- for commands operating on SCSI busses 143.Sh SEE ALSO 144.Xr ioctl 2 , 145.Xr cd 4 , 146.Xr ch 4 , 147.Xr sd 4 , 148.Xr se 4 , 149.Xr ss 4 , 150.Xr st 4 , 151.Xr uk 4 152.Sh HISTORY 153The 154.Nm 155command first appeared in 156.Nx 1.4 . 157.Sh AUTHORS 158The 159.Nm 160command was written by Jason R. Thorpe of the Numerical Aerospace Simulation 161Facility, NASA Ames Research Center. 162