p 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:
p .Nm format .Oo blocksize .Oo immediate .Oc .Oc
p (Low level) format the named device. If the optional .Li blocksize parameter is provided, the device geometry will be modified to use the specified .Li blocksize . If this parameter is different form the Current or Default Mode Page 3 parameters, the device will update Mode Page 3 at the successful completion of the Format. Device geometry may change as a result of using a new device .Li blocksize . When the optional .Li blocksize parameter is specified, the Defect List on the drive will revert to the original primary defect list created at the time of manufacture if available. The drive will usually recertify itself during the Format and add any other defective blocks to the new Defect List. Some disks may not support the ability to change the blocksize and may enter a Degraded Mode when fed a Format command of this type. If this happens the standard recovery for the drive requires issuing a correct Format command, i.e. one without the blocksize parameter.
p When the .Li immediate parameter is also specified, the disk is instructed to return from the format command right away. It continues to format, and every ten seconds .Nm issues a TEST UNIT READY command to check the associated sense data. This associated sense data has a progress indicator which indicates how far the format is progressing. Note well that most SCSI disk drives prior to a few years ago do not support this option.
p .Nm identify
p Identify the specified device, displaying the device's SCSI bus, target, and lun, as well as the device's vendor, product, and revision strings.
p .Nm reassign .Ar blkno .Oo blkno Oo ... .Oc .Oc
p 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.
p .Nm release
p Send a .Dq RELEASE command to the device to release a reservation on it.
p .Nm reserve
p Send a .Dq RESERVE command to the device to place a reservation on it.
p .Nm reset
p Reset the device. This command is only supported for devices which support the .Li SCIOCRESET ioctl.
p .Nm start
p Send a .Dq START command to the device. This is useful typically only for disk devices.
p .Nm stop
p Send a .Dq STOP command to the device. This is useful typically only for disk devices.
p .Nm tur
p Send a .Dq TEST UNIT READY command to the device. This is useful for generating current device status.
p .Nm getcache
p Returns basic cache parameters for the device.
p .Nm setcache .Ar none|r|w|rw .Op Ar save
p Set basic cache parameters for the device. The cache may be disabled
q none , the read cache enabled
q r , the write cache enabled
q w , or both read and write cache enabled
q rw . If the drive's cache parameters are savable, specifying .Ar save after the cache enable state will cause the parameters to be saved in non-volatile storage. .Sh BUS COMMANDS The following commands are supported for SCSI busses:
p .Nm reset
p Reset the SCSI bus. This command is only supported if the host adapter supports the .Li SCBUSIORESET ioctl.
p .Nm scan .Ar target .Ar lun
p 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 .
p .Nm detach .Ar target .Ar lun
p Detach the specified device from the bus. Useful if a device is powered down after use. The .Ar target and .Ar lun arguments have the same meaning as for the .Nm scan command, and may also be wildcarded. .Sh NOTES When scanning the SCSI bus, information about newly recognized devices is printed to console. No information is printed for already probed devices. .Sh FILES
a /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 HISTORY The .Nm command first appeared in .Nx 1.4 . .Sh AUTHORS The .Nm command was written by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, NASA Ames Research Center.