xscsidisktest  -  finds and reallocates bad blocks on SCSI
       and Fibre Channel Disks accessed using the SGI linux-xscsi
       subsystem.


SYNOPSIS

       xscsidisktest  [-V (verbose)] [-x (Expert Mode)] [-R (Read
       Test)] [-W (Write Test)]  [-C  (Write-Read-Compare  Test)]
       [-n  <No. of Times to run the Test>] [-s <Starting Block>]
       [-t <Total No. of Blocks to test>] [-z <Max No. of  Blocks
       transferred  per  command>]  [-S (Sequential Pattern)] [-B
       (Butterfly Pattern)] [-P (Display P List)] [-G (Display  G
       List)] [-L (Show Defective Block Count)] -d DEVICE


DESCRIPTION

       xscsidisktest  is  an  interactive  utility to analyze the
       disk surface of SCSI devices accessed using the SGI linux-
       xscsi  subsystem.  It  finds and reallocates bad blocks on
       the disk.  It can also be used to display the Disk  Defect
       Lists (P List and G list).

   OPTIONS
       -V Verbose Mode
              In  this mode xscsidisktest displays the block num­
              bers of the blocks being tested while the  test  is
              in progress.

       -x Expert Mode
              This  mode allows the testing process without being
              interrupted for confirmation.

       -R Read Test
              During this test,the SCSI Read(10) Command is  used
              to  read  data  blocks  from  the disk (without any
              retries).

       -W Write Test
              During this test, a random byte pattern is  written
              to the disk using the SCSI Write(10) Command (with­
              out any retries).

       -C Write-Read-Compare Test
              During this test, a random byte pattern is  written
              to the disk using the SCSI Write(10) Command (with­
              out any retries) and that pattern is read from  the
              disk  using  the SCSI Read(10) Command (without any
              retries).  The pattern read, is checked against the
              pattern written earlier to check for any discrepan­
              cies.

       -n <No. of Times to run the test>
              The test can be run for multiple times depending on


       -s <Starting Block>
              This  specifies  the starting block of the chunk of
              blocks being tested.

       -t <Total No. of Blocks to Test>
              This  specifies  the  total  no.  of  blocks  being
              tested.

       If  the  -s  <Starting Block> and -t <Total No. of Blocks>
       choices are NOT specified, then the test is carried out on
       the entire disk under consideration (Recommended).

       -z <Max No. of Blocks transferred per command>
              This  specifies the maximum data transfer size dur­
              ing the SCSI Read(10), Write(10) commands.  If  not
              specified,  a maximum of 256 blocks are transferred
              in every Read(10),  Write(10)  command  during  the
              test.

       -S Sequential Pattern
              In  this  pattern  the  disk  sectors  are  scanned
              sequentially.

       -B Butterfly Pattern
              In this pattern the user  scans  the  disk  surface
              alternately  from  the extremes of the block length
              being scanned.

       -P Display P List
              Display the defective blocks in the P List  in  the
              Physical Sector Format.

       -G Display G List
              Display  the  defective blocks in the G List in the
              Physical Sector Format.

       -L Show Defective Block Count
              Display the total number of defective blocks on the
              disk. This number includes the blocks in all Defect
              Lists.

   Interactive Mode Menus
       Scan Modes (Read | Write | Write-Read-Compare)
              In the Read Mode the user performs a SCSI  Read(10)
              (with  no  retries) on the disk.  In the Write Mode
              the user writes a random byte pattern on  the  disk
              using the SCSI Write(10) command (with no retries).
              In the Write-Read-Compare Mode the  user  writes  a
              random  byte  pattern  on  the  disk using the SCSI
              Write(10) command (with  no  retries),  performs  a
              SCSI  Read(10)  (with no retries) and then compares

              crepancies.

       The  Write-Read-Compare  Mode performs the most exhaustive
       scan of the disk surface.

       Scan Pattern (Butterfly | Random | Sequential)
              In the Butterfly Pattern the user  scans  the  disk
              surface  alternately from the extremes of the block
              length being scanned.  In the  Random  Pattern  the
              user  scans  any  random  block in the block length
              under consideration.  In the Sequential Pattern the
              user scans the disk surface sequentially.

       The  disk  surface  is  normally  scanned in chunks of 256
       blocks.  If an error is detected, the  chunk  causing  the
       error  is  scanned  again,  1  block at a time to find the
       block causing the error. That block is  then  reallocated.
       If there is no space on the disk to reallocate that block,
       a corresponding error message is displayed.

       Hardware Defect List (P List | G List)
              P (Primary Defect Type) List : P type  flawed  sec­
              tors  are  identified  at the time of shipment in a
              list of defects (permanent flaws) supplied  by  the
              manufacturer and stored on the disc in an area that
              is not directly accessible by the user. (This  list
              may  be  referred  to  as an ETF List). This defect
              list is not modified or changed by the  disc  drive
              (or initiator) after shipment.

              G (Growth Defect Type) List : G type flawed sectors
              contain medium flaws and have been reallocated as a
              result  of  receiving a Reassign Blocks command, or
              certification defects (C type) reallocated during a
              previous  Format  Unit  command, or Data Defects (D
              type) reallocated during  a  previous  Format  Unit
              command  or  defects  that  have been automatically
              reallocated by the drive. This (G) list is recorded
              on  the  disc drive media and may be referenced for
              the current (and subsequent) Format Unit  commands.
              This (G) list does not include the Primary (P) list
              of defects.

       List Display Format (Bytes From Index | Physical Sector) :
              Each  defect  descriptor  for  the Bytes from Index
              format specifies the beginning of an eight  bit  (1
              byte)  defect  location  on the medium. Each defect
              descriptor is comprised of the cylinder  number  of
              the  defect,  the head number of the defect and the
              number of bytes from Index to the defect  location.

              mat specifies a sector size  defect  location  com­
              prised  of  the  cylinder number of the defect, the
              head number of the defect  and  the  defect  sector
              number.

       Add Bad Block to the Hardware Defect List:
              This  options  allow  the  user  to add a defective
              block to the G List using the SCSI Reassign  Blocks
              Command.More  information about the Reassign Blocks
              command can be found in the SCSI-3  Block  Commands
              (SBC) document.


EXAMPLES

       Under  linux-xscsi, the device name must correspond to the
       'ds' device.

       · xscsidisktest -d /dev/xscsi/pci05.02.0/target70/lun0/ds

       In the interactive mode, xscsidisktest has to  be  invoked
       without the -RWCSBnstx options (as shown above).

       ·    xscsidisktest    -V   -d   /dev/xscsi/pci05.02.0/tar­
       get70/lun0/ds

       When invoked with the (-V) Verbose  option,  xscsidisktest
       prints  out  the block numbers being tested while carrying
       out the test (in the interactive mode).

       ·    xscsidisktest    -C     -B     -n     2     -x     -d
       /dev/xscsi/pci05.02.0/target70/lun0/ds

       In  the  non-interactive mode, xscsidisktest is invoked as
       shown above.  This causes xscsidisktest to perform a  (-C)
       Write-Read-Compare  test on the entire disk by scanning it
       in a (-B) Butterfly pattern, (-n) 2 times.

       · xscsidisktest -C  -B  -n  2  -s  100  -t  100000  -x  -d
       /dev/xscsi/pci05.02.0/target70/lun0/ds

       This  invocation  in the non-interactive mode, causes xsc­
       sidisktest to perform a (-C)  Write-Read-Compare  test  on
       (-t)100000  sectors  of the disk starting from (-s) sector
       100, by scanning it in a (-B) Butterfly  pattern,  (-n)  2
       times.

       ·  xscsidisktest  -V  -C  -B  -n  2 -s 100 -t 100000 -x -d
       /dev/xscsi/pci05.02.0/target70/lun0/ds

       This invocation in the non-interactive mode,  causes  xsc­
       sidisktest  to  perform  a (-C) Write-Read-Compare test on

       100,  by  scanning  it in a (-B) Butterfly pattern, (-n) 2
       times.  Due to the (-V) Verbose option, xscsidisktest also
       prints  out  block  numbers  while  the  blocks  are being
       tested.

       ·   xscsidisktest   -P    -d    /dev/xscsi/pci05.02.0/tar­
       get70/lun0/ds

       This invocation causes xscsidisktest to display the defec­
       tive blocks in the P list for disk in the Physical  Sector
       Format.

       ·    xscsidisktest    -L   -d   /dev/xscsi/pci05.02.0/tar­
       get70/lun0/ds

       This invocation causes xscsidisktest to display the  total
       number of defective blocks on the disk.


FILES

       /dev/xscsi/pci*/target*/lun*/ds   -  the  SGI  linux-xscsi
       driver device


SEE ALSO

       xscsicontrol(8), xscsiha(8), xscsimode(8), xscsiformat(8).


NOTE

       This  command  is  normally  usable only by the superuser,
       because  the  standard  permissions  of  the  devices   in
       /dev/xscsi restrict access to other users.


Man(1) output converted with man2html