blob: 25caf17370c6bd74b8afad8dbb670ec43fa0d480 [file] [log] [blame]
.TH SG_READCAP "8" "April 2003" "sg3_utils-1.03" SG3_UTILS
.SH NAME
sg_readcap \- calls a READ CAPACITY command on a SCSI device
.SH SYNOPSIS
.B sg_readcap
[\fI-lba=<block>\fR] [\fI-pmi\fR] [\fI-V\fR]
<\fIdevice\fR>
.SH DESCRIPTION
.\" Add any additional description here
.PP
The normal usage is to find the number of blocks (and block size)
of the given device and output them.
.TP
-lba=<block>
used in conjunction with "-pmi" option. This variant of READ CAPACITY will
yield the last block address after "<block>" prior to a delay. For a
disk, given a "<block>" address it yields the highest numbered block on
the same cylinder (i.e. before the heads need to move). "<block>" is
in hex (from 0 to ffffffff) and defaults to zero.
.TP
-pmi
partial medium indicator: for finding the next block address prior to
some delay (e.g. head movement). In the absence of this switch, the
total number of blocks and the block size of the device are output.
.TP
-V
outputs version string then exits.
.PP
In the 2.4 series of Linux kernels the given device must be
a SCSI generic (sg) device. In the 2.5 series block devices (e.g. disks
and SCSI DVDs) can also be specified. For example "sg_readcap /dev/sda"
will work in the 2.5 series kernels.
.SH AUTHORS
Written by Douglas Gilbert
.SH COPYRIGHT
Copyright \(co 1999-2003 Douglas Gilbert
.br
This software is distributed under the GPL version 2. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.