NetBSD/sbin/scsictl/scsictl.8

144 lines
4.3 KiB
Groff

.\" $NetBSD: scsictl.8,v 1.4 1999/09/28 23:32:04 ad Exp $
.\"
.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
.\" NASA Ames Research Center.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. All advertising materials mentioning features or use of this software
.\" must display the following acknowledgement:
.\" This product includes software developed by the NetBSD
.\" Foundation, Inc. and its contributors.
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
.\" contributors may be used to endorse or promote products derived
.\" from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd October 15, 1998
.Dt SCSICTL 8
.Os NetBSD
.Sh NAME
.Nm scsictl
.Nd a program to manipulate SCSI devices and busses
.Sh SYNOPSIS
.Nm
.Ar device
.Ar command
.Oo
.Ar arg Oo ...
.Oc
.Oc
.Sh DESCRIPTION
.Nm
allows a user or system administrator to issue commands to and otherwise
control SCSI devices and busses. It is used by specifying a device or
bus to manipulate, the command to perform, and any arguments the command
may require.
.Nm
determines if the specified device is an actual device or a SCSI bus
automatically, and selects the appropriate command set.
.Pp
For commands which
.Nm
issues a SCSI command to the device directly, any returned sense information
will be decoded by
.Nm
and displayed to the standard output.
.Sh DEVICE COMMANDS
The following commands are supported for SCSI devices:
.Pp
.Nm format
.Pp
(Low level) format the named revice.
.Pp
.Nm identify
.Pp
Identify the specified device, displaying the device's SCSI
bus, target, and lun, as well as the device's vendor, product,
and revision strings.
.Pp
.Nm reassign
.Ar blkno
.Oo blkno Oo ...
.Oc
.Oc
.Pp
Issues a
.Li REASSIGN BLOCKS
command to the device, adding the specified blocks to the
grown defect list. This command is only supported on
direct access devices.
.Pp
.Nm reset
.Pp
Reset the device. This command is only supported for devices which
support the
.Li SCIOCRESET
ioctl.
.Sh BUS COMMANDS
The following commands are supported for SCSI busses:
.Pp
.Nm reset
.Pp
Reset the SCSI bus. This command is only supported if the host adapter
supports the
.Li SCBUSIORESET
ioctl.
.Pp
.Nm scan
.Ar target
.Ar lun
.Pp
Scan the SCSI bus for devices. This is useful if a device was not
connected or powered on when the system was booted. The
.Ar target
and
.Ar lun
arguments specify which SCSI target and lun on the bus is to be scanned.
Either may be wildcarded by specifying the keyword
.Dq any
or
.Dq all .
.Sh FILES
/dev/scsibus* - for commands operating on SCSI busses
.Sh SEE ALSO
.Xr ioctl 2 ,
.Xr cd 4 ,
.Xr ch 4 ,
.Xr sd 4 ,
.Xr se 4 ,
.Xr ss 4 ,
.Xr st 4 ,
.Xr uk 4
.Sh AUTHOR
The
.Nm
command was written by Jason R. Thorpe of the Numerical Aerospace Simulation
Facility, NASA Ames Research Center.
.Sh HISTORY
The
.Nm
command first appeared in
.Nx 1.4 .