Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ badspots(1M) — sysv — mips UMIPS RISC/os 4.52

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

format(1M)

dvhtool(1M)



BADSPOTS(1M-SysV)   RISC/os Reference Manual    BADSPOTS(1M-SysV)



NAME
     badspots - map out bad spots on hard disks

SYNOPSIS
     /etc/badspots [-a -clogfile [-mmaxretries] [-pscanpasses]
     [-d] [-e] [-rrange]]
      | [-s -vvolume -b(block[,block] | c/h/s[,c/h/s])] -mmaxre-
     tries] [-e]] | [-t -vvolume] | [-i]

DESCRIPTION
     badspots is used to display and map out bad spots on hard
     disks. There are four modes in which badspots can be
     invoked.  If badspots is invoked without any arguments, -i
     is assumed.

     -a   badspots will scan the console log file specified with
          the -clogfile flag.  All disk error message must be in
          one of the following formats to be accepted:


          Since the reported block (sector) number isn't neces-
          sarily the one containing the defect, either -rrange
          blocks or 16 blocks on each side of the reported blocks
          will be scanned for defects. It may take a number of
          attempts to find the defects if the error happens
          intermittently.  badspots will try 3 times unless
          -pscanpasses is specified, in which case that number is
          used. If -d is specified, the defective sectors will be
          displayed, but won't be mapped out.  If -e is speci-
          fied, the defect(s) will be mapped out, even if an
          error occurred that could possible cause data integrity
          to be lost.  Otherwise, badspots will only map out the
          defects(s) if it can verify data integrity.  It will
          attempt to read the data 5 times unless -mmaxretries is
          specified.

     -s   Map out specific blocks.  On SCSI disks, the list of
          logical blocks is specified as
          -bblocknumber[,blocknumber]...  On SMD disks, either a
          list of logical blocks can be specified, or the list
          can be in in the form of
          -bcyl/head/sector[,cyl/head/sector]...  If -e is speci-
          fied, all of the blocks in the list will be mapped out
          even if errors occur while checking for data integrity,
          and the number of retries has been exhausted.

     -l   List the defects on the specified volume.  If the
          volume is an SMD disk, badspots will list those defects
          specified on the bad sector table stored in the volume
          header partition of the disk.  For SCSI drives, the
          primary and growth defects that are stored on the drive
          will be listed.



                         Printed 1/15/91                   Page 1





BADSPOTS(1M-SysV)   RISC/os Reference Manual    BADSPOTS(1M-SysV)



     -i   Starts an interactive session, beginning with the fol-
          lowing prompt:

          Enter path to /dev entry for entire volume [q to quit]
          :

          The full path name of the raw partition containing the
          entire volume should be entered.  This is usually par-
          tition 10.

          (l)ist defect table,(a)dd defects,(s)can for
          defects,(q)uit [q] :

          (l)  Lists the defects, similar to the -t mode.

          (a)  For an SMD disk, badspots will first prompt for
               the format in which the defects will be entered
               (blockno or c/h/s).

               For either SMD or SCSI disks, badspots will then
               ask for a list of defects. Only those defects that
               had no data errors will be mapped. To map out the
               disk even when errors occur, invoke badspots in -s
               mode and specify the -e flag.

          (s)  After prompting for the number of scan passes, the
               beginning and ending block numbers, a read-only
               scan of the drive is done to check for ECC errors.
               Those defects are then displayed.

     In addition to the four command line options to specify in
     which mode to run badspots, the following is a list of the
     additional flags which can also be used in conjuction with
     the mode flags.

     -clogfile specifies the name of the file containing the con-
               sole log that will be scanned by the -a option.

     -rrange   Since data transfers through the filesystem are
               done 8 Kbytes at a time, the block reported as
               being in error isn't necessarily the exact block
               in which the error is occuring. Usually it is the
               first block of the transfer. When the -a option is
               used, range sectors on each side of the reported
               block are also scanned for errors. If range isn't
               specified, a value of 16 is used.

     -mmaxretries
               If an error occurs when trying to map out the
               defects, badspots will retry up to maxretries
               times before aborting. The default value is 5.




 Page 2                  Printed 1/15/91





BADSPOTS(1M-SysV)   RISC/os Reference Manual    BADSPOTS(1M-SysV)



     -d        Once bad spots have been found while scanning the
               errors reported in the console log, specifying -d
               will only display the defects, and not map them
               out.

     -e        Map out bad spots even when errors occur.  Nor-
               mally, the bad spots aren't mapped out if errors
               occur.

     -bblockno[,blockno...] or -bc/h/s[,c/h/s...]
               List of block numbers to map out under the -s
               option.

     -vvolume  The name of the raw partition which contains the
               entire disk.  This is usually partition 10.

     -pscanpasses
               The number of times to scan the range of blocks
               found when the -a option is specified.  The
               default when this isn't specified is 3.

SEE ALSO
     format(1M), dvhtool(1M).

NOTES
     Defects are only added, and never modified or deleted on
     SCSI drives. Therefore, each time a logical block number is
     added, it gets reassigned.  No checking is done to see if
     the block number was previously entered, since that informa-
     tion isn't stored anywhere.

     For SMD drives, when a logical block number is entered that
     is already on the list, it assumes that it is a duplicate.
     However, since format deals in logical blocks, it could pos-
     sibly happen that the sector immediately before this sector
     had previously gone bad, and the entire track needs to be
     mapped. If this is the case, run badspots under -s mode, and
     map out the block immediately after it.

     There also exists a corresponding case for bad sectors
     occuring on a track that has already been remapped. format
     assumes that the defect is on the logical track that was
     specified, when in fact the defect now exists on the track
     in the replacement partition to which it was mapped.  If
     this occurs, dump the bad sector list to determine which
     track in the replacement partition is was mapped to, and
     then map out a block on the mapped track.  Caution must be
     taken when doing this, since badspots doesn't correctly
     reconfigure the replacment partition to prevent that mapped
     track from erroneously being mapped to yet another track in
     the replacement partition.




                         Printed 1/15/91                   Page 3



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026