MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


SG3UTILS                                        SGREADLONG(1M)



NAME
     sgreadlong - send a SCSI READ LONG command

SYNOPSIS
     sgreadlong   [--16]   [--correct]   [--help]   [--lba=LBA]
     [--out=OF]      [--pblock]      [--verbose]      [--version]
     [--xferlen=BTL] DEVICE

DESCRIPTION
     Send SCSI READ LONG command to DEVICE. The  read  buffer  is
     output  in hex and ASCI to stdout or placed in a file. Note
     that the data returned includes the logical block data (typ-
     ically  512  bytes  for  a disk) plus EC information (whose
     format is proprietary)  plus  optionally  other  proprietary
     data.

OPTIONS
     Arguments to long options are mandatory for short options as
     well.

     -S, --16
          uses a SCSI READ LONG(16) command. The  default  action
          is  to  use  a  SCSI  READ  LONG(10)  command. The READ
          LONG(10) command has a 32 bit field for the  lba  while
          READ LONG(16) has a 64 bit field.

     -c, --correct
          sets the 'CORCT' bit in the SCSI  READ  LONG  command.
          When  set the data is corrected by the EC before being
          transferred back to this utility.  The  default  is  to
          leave  the 'CORCT' bit clear in which case the data is
          not corrected.

     -h, --help
          output the usage message then exit.

     -l, --lba=LBA
          where LBA is the logical block address of the sector to
          read.  Assumed  to  be  in decimal unless prefixed with
          '0x' (or has a trailing 'h'). Defaults to lba 0. If the
          lba  is  larger  than  can fit in 32 bits then the --16
          option should be used.

     -o, --out=OF
          instead of outputting ASCI hex to stdout, send  it  in
          binary  to  the  file called OF. If '-' is given for OF
          then the (binary) output is sent to stdout.  Note  that
          all informative and error output is sent to stderr.

     -p, --pblock
          sets the 'PBLOCK' bit in the SCSI  READ  LONG  command.
          When  set the physical block (plus EC data) containing



sg3utils-1.23      Last change: January 2007                   1






SG3UTILS                                        SGREADLONG(1M)



          the  requested  logical  block  address  is  read.  The
          default  is  to  leave  the 'PBLOCK' bit clear in which
          case the logical block (plus any EC data) is read.

     -v, --verbose
          increase the level of verbosity, (i.e. debug output).

     -V, --version
          print the version string and then exit.

     -x, --xferlen=BTL
          where BTL is the byte transfer length (default to 520).
          If  the given value (or the default) does not match the
          "long" block size of the device, the appropriate BTL is
          deduced   from  the  error  response  and  printed  (to
          stderr). The idea is that  the  user  will  retry  this
          utility with the correct transfer length.

NOTES
     If a defective block is found and its contents, if any,  has
     been  retrieved  then "sgreassign" 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 moni-
     tored (with "sgreassign --grown")  as  the  disk  could  be
     nearing the end of its useful lifetime.

     The LBA and BTL (transfer length) arguments may be  followed
     by the following multiplicative suffixes:  c C *1; w W *2; b
     B *512; k K KiB *1,024; KB *1,000; m M  MiB  *1,048,576;  MB
     *1,000,000;  g G GiB *1,073,741,824; and GB *1,000,000,000 .
     Also a suffix of the  form  "x"  multiplies  the  leading
     number by .

     Alternatively numerical values can be given  in  hexadecimal
     preceded  by  either "0x" or "0X" (or with a trailing "h" or
     "H"). When hex numbers  are  given,  multipliers  cannot  be
     used.

     As a data point, Fujitsu uses a  54  byte  EC  (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.]

EXIT STATUS
     The exit status of sgreadlong is 0 when it is  successful.
     Otherwise see the sg3utils(1M) man page.

AUTHORS
     Written by Douglas Gilbert.

REPORTING BUGS
     Report bugs to .



sg3utils-1.23      Last change: January 2007                   2






SG3UTILS                                        SGREADLONG(1M)



COPYRIGHT
     Copyright O 2004-2007 Douglas Gilbert
     This software is distributed under the GPL version 2.  There
     is  NO warranty; not even for MERCHANTABILITY or FITNES FOR
     A PARTICULAR PURPOSE.

SEE ALSO
     sgreassign, sgwritelong, sgdd

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:

     
       ATRIBUTE TYPE     ATRIBUTE VALUE
    
     Availability         SUNWsg3utilsu  
    
     Interface Stability  Committed      
    

NOTES
     Source for sg3utils is available on http:/opensolaris.org.
































sg3utils-1.23      Last change: January 2007                   3



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™