SG_READ_LONG(8) | SG3_UTILS | SG_READ_LONG(8) |
sg_read_long - send a SCSI READ LONG command
sg_read_long [--16] [--correct] [--help] [--lba=LBA] [--out=OF] [--pblock] [--readonly] [--verbose] [--version] [--xfer_len=BTL] DEVICE
Send SCSI READ LONG command to DEVICE. The read buffer is output in hex and ASCII to stdout or placed in a file. Note that the data returned includes the logical block data (typically 512 bytes for a disk) plus ECC information (whose format is proprietary) plus optionally other proprietary data. Note that the logical block data may be encoded or encrypted.
In SBC-4 revision 7 the SCSI READ LONG (10 and 16 byte) commands were made obsolete. In the same revision all uses of SCSI WRITE LONG (10 and 16 byte) commands were made obsolete apart from the case in which the WR_UNCOR bit is set.
Arguments to long options are mandatory for short options as well.
If a defective block is found and its contents, if any, has been retrieved then "sg_reassign" could be used to map out the defective block. Associated with such an action the number of elements in the "grown" defect list could be monitored (with "sg_reassign --grown") as the disk could be nearing the end of its useful lifetime.
Various numeric arguments (e.g. LBA) may include multiplicative suffixes or be given in hexadecimal. See the "NUMERIC ARGUMENTS" section in the sg3_utils(8) man page.
As a data point, Fujitsu uses a 54 byte ECC (per block) which is capable of correcting up to a single burst error or 216 bits "on the fly". [Information obtained from MAV20xxrc product manual.]
The exit status of sg_read_long is 0 when it is successful. Otherwise see the sg3_utils(8) man page.
Written by Douglas Gilbert.
Report bugs to <dgilbert at interlog dot com>.
Copyright © 2004-2016 Douglas Gilbert
This software is distributed under the GPL version 2. There is NO warranty;
not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
sg_reassign, sg_write_long, sg_dd
November 2015 | sg3_utils-1.42 |