


SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



NNNNAAAAMMMMEEEE
     sformat - SCSI disk  formatting/partitioning/analysis/repair
     utility

SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
     ssssffffoooorrrrmmmmaaaatttt [[[[ooooppppttttiiiioooonnnnssss]]]] ttttaaaarrrrggggeeeetttt lllluuuunnnn [[[[ssssccccssssiiiibbbbuuuussss]]]]
     ssssffffoooorrrrmmmmaaaatttt [[[[ooooppppttttiiiioooonnnnssss]]]]


     The first form will select the named disk directly.  Have  a
     look at the chapter about FFFFoooolllllllloooowwwwiiiinnnngggg TTTThhhheeee MMMMaaaaiiiinnnn TTTThhhhrrrreeeeaaaadddd for more
     details.

     The second form will scan all SCSI busses and enter a selec-
     tion menu.  Have a look at the chapter about TTTThhhheeee SSSSCCCCSSSSIIII SSSSeeeelllleeeecccc----
     ttttiiiioooonnnn MMMMeeeennnnuuuu for more details.

     SSSSffffoooorrrrmmmmaaaatttt will never destroy or modify any data unless  expli-
     citly  confirmed  just  before  the  (possibly)  destructive
     action.  Have a look at the  chapter  about  HHHHoooowwww  TTTToooo  AAAAnnnnsssswwwweeeerrrr
     QQQQuuuueeeessssttttiiiioooonnnnssss first.


DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
     SSSSffffoooorrrrmmmmaaaatttt is the first SCSI disk formatting utility that  runs
     under  _S_u_n_O_S.   Long  before Sun decided that formatting and
     partitioning a disk from a stand alone program is less  con-
     venient than doing this job from a running UNIX, ssssffffoooorrrrmmmmaaaatttt has
     been available.

     SSSSffffoooorrrrmmmmaaaatttt leads the beginner through a thread menu and  allows
     the experienced user to do more things than he could do with
     other disk maintenance programs. All partitioning  jobs  can
     be done without the need for a desc calculator.

     If you want to do more than simple things, you should  care-
     fully  read  the  whole  manual.  It  contains many tips and
     tricks that will help you to recover disks that  would  have
     to  be  sent  back to the manufacturer for repair otherwise.
     SSSSffffoooorrrrmmmmaaaatttt includes the competence of more than  ten  years  in
     disk  handling  and  will  be able to repair more disks than
     other disk maintenance  programs.   SSSSffffoooorrrrmmmmaaaatttt  offers  special
     maintenance  tests  to  find  the  reason  for  complex disk
     failures.


DDDDiiiisssskkkk DDDDaaaattttaaaabbbbaaaasssseeee EEEEnnnnttttrrrriiiieeeessss
     Be  nice  to  other  users  of  ssssffffoooorrrrmmmmaaaatttt.   Create   database
     (sformat.dat)  entries  for  disks  that are not in the data
     base using the ----PPPPrrrroooottttoooo flag and  mail  them  to  the  author.
     This helps other users and you too.  See section on CCCCrrrreeeeaaaattttiiiinnnngggg
     DDDDiiiisssskkkk DDDDaaaattttaaaabbbbaaaasssseeee EEEEnnnnttttrrrriiiieeeessss below.



Joerg Schilling   Last change: 2. January 1997                  1






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



OOOOPPPPTTTTIIIIOOOONNNNSSSS
     -help, -h           Print a summary of  the  most  important
                       options for ssssffffoooorrrrmmmmaaaatttt.

     -xhelp             Print a summary of less  frequently  used
                       options for ssssffffoooorrrrmmmmaaaatttt.

     -ask               Ask again at certain  critical  sections.
                       This  will currently prompt before modify-
                       ing the disk when in repair mode.

     -auto, -a           autoformat  mode  (for  production  sys-
                       tems).   When  this  option  is in effect,
                       ssssffffoooorrrrmmmmaaaatttt will not ask whether to modify the
                       format  and  partition parameters and will
                       only format disks that are  known  in  the
                       data  base.   There will be only one ques-
                       tion to  answer.   This  will  immediately
                       start  the  formatting process.  The ----aaaauuuuttttoooo
                       option enables certain additional  verifi-
                       cations that will guarantee that the disks
                       have a known  firmware  release  and  will
                       inform  the  user  that the disk is bad if
                       certain quality tests  failed.   The  disk
                       will  not  be  formatted  if the signature
                       code in the data base is bad.  This option
                       has  not  been  verified  during  the last
                       three years.  If you need  this  mode  ask
                       the  author for additional verification of
                       the code.

     Cveri=#,C=#       Number of blocks/verify.  SSSSffffoooorrrrmmmmaaaatttt normally
                       will  try  to verify 1000 sectors with one
                       SCSI command. Some old disk  firmware  may
                       not  able  to deal with a number that will
                       imply to read a  number  of  sectors  that
                       will  not  fit  in the local memory of the
                       disk.

     CWveri=#,CW=#     Number of blocks/write-verify.  The  limi-
                       tation noted with the CCCCvvvveeeerrrriiii option applies
                       here again and even on newer disks.

     data=name         Name  of  disk  database  file   (default:
                       'sformat.dat').   Use this option to force
                       ssssffffoooorrrrmmmmaaaatttt to use a different  disk  database
                       than  the  default.   In any case, ssssffffoooorrrrmmmmaaaatttt
                       will  search  in  the  current   directory
                       first.  If no file of the appropriate name
                       was found in the current directory,  ssssffffoooorrrr----
                       mmmmaaaatttt looks in the following path:
                       /_o_p_t _s_c_h_i_l_y/_e_t_c, /_e_t_c, /_u_s_r/_e_t_c.



Joerg Schilling   Last change: 2. January 1997                  2






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



     debug=#,-d        Set  the  misc  debug  value  to  #  (with
                       debug=#) or increment the misc debug level
                       by one (with -d). If you specify -_d_d, this
                       equals to ddddeeeebbbbuuuugggg====2222....

     kdebug=#,kd=#     Tell the ssssccccgggg-driver to modify  the  kernel
                       debug  value  while SCSI commands are run-
                       ning.

     xdebug=#,xd=#     Set the debug level for the parser of  the
                       external disk database.

     -defmodes          Get default mode  parameters  from  disk.
                       Normally  ssssffffoooorrrrmmmmaaaatttt  retrieves  the  default
                       modes parameters from the disk by  default
                       when the disk is unformatted or has no sun
                       label and the current  mode  parameter  if
                       the  disk  has  a  valid  sun label.  This
                       option tells ssssffffoooorrrrmmmmaaaatttt retrieve the  default
                       mode parameters in any case.

     -dmdl              Do not use manufacturer defect list  when
                       formatting  a  disk.   This implies that a
                       disk that is formatted  with  this  option
                       will  have  bad blocks. However some disks
                       that may  not  be  formatted  because  the
                       manufacturer  defect  list  is  broken may
                       become usable again when this option is in
                       effect.

     ESDI=#            Pass ESDI command # to the drive and print
                       the  result.   This  will  only work if an
                       EMULEX MD21 SCSI/ESDI bridge controller is
                       present.

     -force             Force to continue at certain errors. This
                       will  currently  prompt  after  the format
                       command fails.

     -greassign         Reassign blocks.  This is the guru  mode,
                       don't  use  this. Read the description for
                       the -_r_e_a_s_s_i_g_n  option  for  more  details.
                       This  option  will simply prompt for block
                       numbers and then reassign them  regardless
                       of  if  they need to be reassigned or not.
                       On some disks the block  may  seem  to  be
                       defective   even   after   reassigning  it
                       because the old data is copied to the  new
                       location  without recomputing the CRC.  On
                       other disk the  old  data  will  be  lost.
                       These  problems  will not arise if you use
                       the -_r_e_a_s_s_i_g_n option instead.



Joerg Schilling   Last change: 2. January 1997                  3






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



     -ign_not_found     Ignore record not found errors while ver-
                       ifying  the  disk.   This option is useful
                       when trying  to  repair  disks  with  many
                       defects  (see  _m_a_x_b_a_d  option).  Some disk
                       errors may cause the whole track to appear
                       bad.  If the reported error in these cases
                       is rrrreeeeccccoooorrrrdddd nnnnooootttt ffffoooouuuunnnndddd, You should first  try
                       to  repair as many blocks as possible with
                       this option in effect and then repair  the
                       remaining blocks without this option.

     -inq               Retrieve and print SCSI inquiry data  for
                       any type of device. This is useful even on
                       tape drives and scanners.

     maxbad=#          When ssssffffoooorrrrmmmmaaaatttt is doing a  surface  analysis
                       after  formatting  the disk, it collects a
                       number of bad blocks (usually up to 1023),
                       then reassigns them and then reformats the
                       disk to guarantee that the disk speed will
                       not be reduced by mapped bad blocks.  Some
                       disks with many defective blocks will seem
                       to  have  more  defective blocks than they
                       really have,  but  these  false  defective
                       blocks  need  not  to be reassigned.  This
                       case may be triggered if a defective block
                       directly  follows the index.  In this case
                       the whole track seems to be bad.   If  you
                       tell  sformat  to  reformat the disk after
                       repairing one bad block  (maxbad=1),  this
                       problem will go away.

     - modes             Intercative  modesense/modeselect.  Each
                       mode page exists in 4 versions:
                       default  (PROM),  current   (RAM),   saved
                       (DISK) and changeable (BITMASK).
                       You may currently view  any  page  if  you
                       specify   the   page   number.    TTTThhhhiiiissss  iiiissss
                       ccccuuuurrrrrrrreeeennnnttttllllyyyy uuuunnnnddddeeeerrrr ccccoooonnnnssssttttrrrruuuuccccttttiiiioooonnnn....

     -noformat          Force not to format disk even  when  for-
                       matting  of  the  disk has been confirmed.
                       This option may be  used  to  modify  mode
                       parameters without formatting the disk.

     -nomap             Do not map SCSI address to  logical  disk
                       name.  WARNING:   If  you use this option,
                       ssssffffoooorrrrmmmmaaaatttt is not able to check  whether  the
                       disk has mounted partitions. This may dam-
                       age mounted file systems.

     -noparity          Try to disable  parity  checking  on  all



Joerg Schilling   Last change: 2. January 1997                  4






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



                       SCSI  commands  that  are sent by ssssffffoooorrrrmmmmaaaatttt....
                       This may not be possible in all  implemen-
                       tations of the _s_c_g-driver.

     -nowait            Do not wait after  formatting  the  disk.
                       Normally, ssssffffoooorrrrmmmmaaaatttt will prompt for a modif-
                       ication of the disk  label  and  partition
                       table  before starting to verify the disk.
                       If this option is in effect, ssssffffoooorrrrmmmmaaaatttt  will
                       immediately start to verify the disk after
                       formatting.

     -no_defaults       Do not set heuristic  defaults.  If  this
                       option  is  in effect, all disk parameters
                       must be either retrievable from  disk  or,
                       if not available, provided by the user.

     -prdefect          Get and print defect data.  This  may  be
                       used  to  print the manufacturer and grown
                       defect list that is stored on the disk.

     -prgeom            Get and print geometry data. This  is  an
                       old  option  but  it  is useful to get all
                       mode pages  that  are  supported  by  this
                       disk.

     -prcurgeom         Get and  print  geometry  data.  This  is
                       basically  the same as -_p_r_g_e_o_m except that
                       - prgeom  will  obtain  the  default  mode
                       pages,  -prcurgeom will report the current
                       values.

     -Proto             This option will cause  ssssffffoooorrrrmmmmaaaatttt  to  gen-
                       erate  a  data  base entry for the current
                       disk.  Make sure that this data base entry
                       will  be generated with the correct format
                       time. SSSSffffoooorrrrmmmmaaaatttt is able to compute a  format
                       time  from  the  disk  geometry, but newer
                       disks seem to need  more  time  than  com-
                       puted.   If  the format time is too short,
                       the formatting may be aborted and the disk
                       will  not  be  accessible  until formatted
                       again completely.

     -r                 reformat only mode (gives  less  messages
                       on label menu)

     -randrw            The random read/write test is a method to
                       find  problems  that  may  be  a result of
                       first seeking to a new place on  disk  and
                       then  writing  data  to  it  as it is fre-
                       quently done  by  the  unix  file  system.



Joerg Schilling   Last change: 2. January 1997                  5






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



                       This  is  usually  caused  by  an inode or
                       super block update.   The  above  problems
                       may  be  a  result  of bad bearings in the
                       disk.  If the disk does not produce errors
                       while  this test is running, there will no
                       harm to the data on disk. However, if  you
                       assume  that  the disk is bad, the data on
                       disk may get corrupted.  To  minimize  the
                       risk  of  data  loss, the first block con-
                       taining the disk label (partition) and the
                       last  block  containing  the sinfo data (a
                       ssssffffoooorrrrmmmmaaaatttt specific area) will never be writ-
                       ten to.

     -reassign          Reassign a list of  blocks  ssssffffoooorrrrmmmmaaaatttt  will
                       prompt for.  This is the preferred command
                       when trying to repair a block or a list of
                       blocks with already known block addresses.
                       If you don't know the address of a  defec-
                       tive block, use the -_r_e_p_a_i_r option.  SSSSffffoooorrrr----
                       mmmmaaaatttt will first try to read the old content
                       of  the  defective  block  and then try to
                       refresh the data by writing the  old  data
                       to the block.  If it fails to write to the
                       block, ssssffffoooorrrrmmmmaaaatttt will reassign the defective
                       block.  If the block does not cause errors
                       after rewriting the data  in  it,  ssssffffoooorrrrmmmmaaaatttt
                       will ask if the block should be reassigned
                       anyway.  NOTE: there  are  many  cases  in
                       which  a  block  seems to be defective but
                       actually is not.  If for any  reason,  the
                       disk will be powered off during writing or
                       if there is electro magnetic noise the CRC
                       for  a block may get corrupted without any
                       physical harm to the magnetic media. These
                       cases  can be repaired by writing again to
                       the block.

     -refresh_only      SSSSffffoooorrrrmmmmaaaatttt will not try to reassign a  block
                       that still fails after rewriting (refresh-
                       ing) the data in it.  This option is  use-
                       ful  in conjunction with the -_r_e_a_s_s_i_g_n and
                       the -_r_e_p_a_i_r option.

     -repair            This is a combination of the -_v_e_r_i_f_y and
                       -_r_e_a_s_s_i_g_n option.  SSSSffffoooorrrrmmmmaaaatttt will first ver-
                       ify the disk and then use the list of  bad
                       sectors found to repair the disk.

     RW=#              Number of random R/W loops  that  is  used
                       with  the  -_r_a_n_d_r_w option.  The default is
                       the number  of  physical  sectors  /  100.



Joerg Schilling   Last change: 2. January 1997                  6






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



                       This  will not last too long and is enough
                       to cover every cylinder of the disk.

     -scsi_compliant    Be as SCSI-compliant  as  possible.  This
                       will  some  old  disk  cause  to  fail  in
                       reporting mode pages correctly and may  be
                       used to see if a disk has these problems.

     -seek              Do _r_a_n_d_o_m or _f_u_l_l _s_t_r_o_k_e  seek  tests  on
                       the  disk.  This  is done by reading data;
                       trying to do _f_u_l_l _s_t_r_o_k_e seek tests my  be
                       impossible  because  of  the  cache of the
                       disk.

     -setmodes          Do a SCSI modeselect with all parameters,
                       that  would have been necessary for a for-
                       mat, but do not  format  the  disk.   This
                       allows  to modify the mode pages of a disk
                       without reformatting it.   If  the   ---- ssssmmmmpppp
                       option  is  used in conjunction with ----sssseeeetttt----
                       mmmmooooddddeeeessss the  mode  parameters  will  not  be
                       saved.  In  this case, the mode parameters
                       of the  disk  will  return  to  their  old
                       values if a reset or a power cycle occurs.

     -silent, -s         Do not print out the  status  of  failed
                       commands.

     -smp               Do not try to save mode  parameters  when
                       setting  them.  This option is useful if a
                       nearly totally damaged disk must be refor-
                       matted.  Some  disk  controllers,  in this
                       case will reject to format the disk if the
                       area  on  disk  where  this  data  will be
                       stored is not accessible before formatting
                       the disk.

     -start             Send a SCSI START  UNIT  command  to  the
                       device.  This  will  normally  spin up the
                       spindle motor of a disk.

     -stop              Send a SCSI STOP UNIT command to the dev-
                       ice.  This  will  normally  spin  down the
                       spindle motor of a disk.

     timeout=#         This option will set  the  default  kernel
                       timeout  for  all  SCSI  commands that are
                       send by sformat to # seconds. The  default
                       value is 20 seconds.  This option does not
                       affect the timeout for the format command.

     -tr, -t             This is an option that  is  only  useful



Joerg Schilling   Last change: 2. January 1997                  7






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



                       with  old AAAAddddaaaapppptttteeeecccc SCSI bridge controllers.
                       These controllers are  not  able  to  deal
                       with logical sector numbers in some cases.
                       Therefore  these  numbers   have   to   be
                       translated  to  the _c_y_l_i_n_d_e_r/_h_e_a_d/_b_f_i form
                       before.  This is done by  seeking  to  the
                       named block and reading the sector header.
                       It may fail if the block has a bad  sector
                       header.

     V=#               Set the number of verify passes  that  are
                       done  after  formatting  a  disk to #. The
                       default value is 5.  In write verify mode,
                       this  number  is  doubled  because ssssffffoooorrrrmmmmaaaatttt
                       will alternate write verify and read  ver-
                       ify passes in this case.

     -verbose, -v        be verbose. This options  tells  ssssffffoooorrrrmmmmaaaatttt
                       to dump all SCSI command descriptor blocks
                       and all data that is  transferred  to/from
                       the target in hexadecimal form.

     -verify            This options  starts  ssssffffoooorrrrmmmmaaaatttt  in  verify
                       disk (surface analysis) mode.  Verifying a
                       disk is a method that allows to  scan  for
                       defects  without  modifying  data  on  the
                       disk.  In this mode, the  controller  will
                       read  the  disks without transferring data
                       to the computer while all  error  recovery
                       is disabled.

     Vstart=#          Set the first block for the  - _v_e_r_i_f_y,   -
                       _r_e_p_a_i_r,  -_r_a_n_d_r_w or the -_s_e_e_k option to #.
                       This is recommended when doing  a  surface
                       analysis  on large disks where is is known
                       that the bad sector is near the end of the
                       disk.

     Vend=#            Set the last block for the   - _v_e_r_i_f_y,   -
                       _r_e_p_a_i_r,  -_r_a_n_d_r_w or the -_s_e_e_k option to #.
                       This is recommended when doing  a  surface
                       analysis  on large disks where is is known
                       that the bad sectors are not at the end of
                       the disk.

     -wrveri            If this option is used in  while  format-
                       ting  a  disk,  it  tells ssssffffoooorrrrmmmmaaaatttt to write
                       verify the disk instead of only read veri-
                       fying  it after formatting.  If it is used
                       in combination with the  - _v_e_r_i_f_y  option,
                       ssssffffoooorrrrmmmmaaaatttt will write verify the disk without
                       prior formatting.  In both cases, the  old



Joerg Schilling   Last change: 2. January 1997                  8






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



                       data on disk will be damaged.  Write veri-
                       fying a disk is recommended if the disk is
                       older   than  two  years  or  has  unusual
                       defects. Usual defects in this context are
                       recovered  read  errors  and  defects that
                       disappear  when  simply  writing  to   the
                       defect sector.


HHHHoooowwww TTTToooo AAAAnnnnsssswwwweeeerrrr QQQQuuuueeeessssttttiiiioooonnnnssss
     There are four types of questions.

     +o     Questions that can be answered with _y_e_s or _n_o. Yes may
          be  abbreviated  with  'y' or 'Y'.  These questions are
          always assumed to be answered with  _n_o  if  you  simply
          enter  _c_a_r_r_i_a_g_e  _r_e_t_u_r_n.  NOTE:  the latter is always a
          _s_a_f_e answer. All questions  that  request  confirmation
          for  actions that may damage or modify data on disk are
          formed in such a way that answering  them  with  _n_o  or
          _c_a_r_r_i_a_g_e _r_e_t_u_r_n will not harm any data.  All answers to
          this type of questions except [_y]_e_s or [_Y]_E_S are inter-
          preted as if _n_o has been entered.

     +o     Questions that need a string as input.  If you  simply
          enter  _c_a_r_r_i_a_g_e  _r_e_t_u_r_n  to  this  type of question, no
          modification of the default string will be done.

     +o     Questions that need a word selected  from  a  list  of
          valid words as input.  If you enter '?', you will get a
          list of possible input to that question.  Each word  is
          on  a separate line an (in some cases) is followed by a
          explanation how to use it.

     +o     Questions that need a number within a  certain  range.
          For  this  type  of  questions,  ssssffffoooorrrrmmmmaaaatttt  displays  the
          current value and the valid range in parenthesis.   The
          default  radix for numbers is ten. If you need to enter
          a hexadecimal number precede it with _0_x if you need  to
          enter an octal number, precede it with _0.

          ^    Entering an accent circumflex  '^'  will  set  the
               value to the smallest possible

          $    Entering an dollar sign '$' will set the value  to
               the greatest possible

          +    Entering a _p_l_u_s _s_i_g_n will  increment  the  current
               value by one.

          -    Entering a _m_i_n_u_s _s_i_g_n will decrement  the  current
               value by one.




Joerg Schilling   Last change: 2. January 1997                  9






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



          <CR> Entering a _c_a_r_r_i_a_g_e _r_e_t_u_r_n  will  not  modify  the
               current  value.   If  the default value is -1, you
               need to supply a valid  value  to  be  allowed  to
               leave the question menu.

     All questions that do not request a  simple  string  (second
     type of question) will accept a question mark '?' to display
     online help.


TTTThhhheeee SSSSCCCCSSSSIIII SSSSeeeelllleeeeccccttttiiiioooonnnn MMMMeeeennnnuuuu
     When SSSSffffoooorrrrmmmmaaaatttt is started without or with insufficient parame-
     ters,  the  SCSI  menu mode is entered.  A typical output in
     this case looks like:

     sparky joerg > sformat
     sformat SCSI format/analysis/repair utilities
     Release 3.1, Copyright J. Schilling

     scg0 at esp0 initiator id 7
     scg1 at esp1 initiator id 7
     scsibus0:
     c0t0d0           0) 'Quantum ' 'XP34300         ' 'F76D' Disk
     c0t1d0           1) 'SEAGATE ' 'ST11200N        ' '8334' Disk
                      2) *
     c0t3d0           3) 'TOSHIBA ' 'MK537FB/        ' '6258' Disk
                      4) 'WANGTEK ' '5150ES SCSI-36  ' 'ESB6' Removable Tape
                      5) 'EXABYTE ' 'EXB-8500-85QUE  ' '0428' Removable Tape
                      6) 'TOSHIBA ' 'XM-3401TASUNSLCD' '3593' Removable CD-ROM
                      7) HOST ADAPTOR
     scsibus1:
     c1t0d0,c1t0d1   10) 'EMULEX  ' 'MD21/S2     ESDI' 'D00 ' Disk
                     11) *
     c1t2d0          12) 'Maxoptix' 'T3-1304         ' '1.1c' Removable Disk
                     13) *
                     14) *
                     15) *
                     16) *
                     17) HOST ADAPTOR
     Select target -1 (0 - 12)/<cr>:

     The line:

     c0t0d0           0) 'Quantum ' 'XP34300         ' 'F76D' Disk

     shows the canonical logical disk name (in this case cccc0000tttt0000dddd0000),
     the  menu  number, the SCSI inquiry string and a description
     of the device type that was found on this SCSI target.   The
     menu number is directly related to the SCSI target id of the
     device and the SCSI bus number.  Number 3 is SCSI target # 3
     on SCSI bus # 0.  Number 12 is SCSI target # 2 on SCSI bus #
     1.  SSSSffffoooorrrrmmmmaaaatttt is currently not able to deal with more  than  8



Joerg Schilling   Last change: 2. January 1997                 10






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



     targets on a bus.

     When selecting a target (.e.g. # 0), a logical  unit  selec-
     tion menu will be displayed.

     Select target -1 (0 - 6)/<cr>:0
     scsibus0 target 0:
     c0t0d0           0) 'Quantum ' 'XP34300         ' 'F76D' Disk
                      1) 'Quantum ' 'XP34300         ' 'F76D' unsupported
                      2) 'Quantum ' 'XP34300         ' 'F76D' unsupported
                      3) 'Quantum ' 'XP34300         ' 'F76D' unsupported
                      4) 'Quantum ' 'XP34300         ' 'F76D' unsupported
                      5) 'Quantum ' 'XP34300         ' 'F76D' unsupported
                      6) 'Quantum ' 'XP34300         ' 'F76D' unsupported
                      7) 'Quantum ' 'XP34300         ' 'F76D' unsupported
     Select lun -1 (0 - 7)/<cr>:

     The logical unit menu has the same  structure  as  the  SCSI
     target  menu.   If  the device description contains the word
     _u_n_s_u_p_p_o_r_t_e_d, the controller is not able to support a logical
     unit of this number.  If the device description contains the
     word _u_n_i_t _n_o_t _p_r_e_s_e_n_t, the controller is able to  support  a
     logical  unit of this number but there is actually no device
     connected.

     When selecting a specific logical unit, the main  thread  is
     entered  as if a complete SCSI target specification has been
     entered from the command line.


FFFFoooolllllllloooowwwwiiiinnnngggg TTTThhhheeee MMMMaaaaiiiinnnn TTTThhhhrrrreeeeaaaadddd
     If the main formatting  thread  is  entered,  the  following
     stages are encountered:

     Mapping and checking
                         The first thing ssssffffoooorrrrmmmmaaaatttt does, is to  map
                         the SCSI target/lun/busid triplet into a
                         logical disk name and to check  if  some
                         part  of  the disk is currently mounted.
                         This mapping will be skipped if  the   -
                         _n_o_m_a_p options is specified.  If the disk
                         is mounted, the user will be asked if it
                         is ok to continue.
                         Note: this is currently the one and only
                         question.

     Inquiry             The second action is getting the inquiry
                         data  from  the device.  The device type
                         is determined from this data.

     Test if device is ready
                         The next action is to test  whether  the



Joerg Schilling   Last change: 2. January 1997                 11






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



                         device is ready and to wait for the dev-
                         ice to become ready.  When the device is
                         ready, it is recalibrated.

     Exit for wrong device type
                         When the device is not a  disk,  a  worm
                         media  or  optical  memory, ssssffffoooorrrrmmmmaaaatttt ter-
                         minates.

     Read sinfo data     When the device is a disk, ssssffffoooorrrrmmmmaaaatttt tries
                         to  read  the  ssssiiiinnnnffffoooo data from the disk.
                         This allows the user to see if the  dev-
                         ice  has  been  formatted  with  ssssffffoooorrrrmmmmaaaatttt
                         before. If so, ssssffffoooorrrrmmmmaaaatttt  will  print  out
                         the  number of reformats and the date of
                         the first and last format.  SSSSiiiinnnnffffoooo is  .B
                         sformat  specific  data  that is hold on
                         the last block of the disk.

     Process special commands
                         If options tell ssssffffoooorrrrmmmmaaaatttt to take  special
                         actions (like -_s_t_a_r_t or -_p_r_d_e_f_e_c_t), they
                         are done here.  SSSSffffoooorrrrmmmmaaaatttt terminates after
                         processing them.

     The formatting procedure starts
                         The next actions are in preparation  for
                         formatting   the  disk.   Several  other
                         things can be  done  from  this  thread.
                         Modifying  the  disk  label  will be one
                         example.  You need not  to  be  in  fear
                         that  following  this thread will modify
                         or harm data on the disk. There will  be
                         extra questions that secure this case.

     Test whether the disk is formatted
                         Several procedures differ if the disk is
                         already formatted and has a valid label.

     The next parts of the main thread will give you  some  ques-
     tions  to answer.  You may skip most of the questions if you
     do not want to modify anything.

     If some data that is definitely needed by ssssffffoooorrrrmmmmaaaatttt can not be
     determined  from  the  disk  or  the data base, ssssffffoooorrrrmmmmaaaatttt will
     force you to answer all questions of a group.  SSSSffffoooorrrrmmmmaaaatttt  will
     only  ask question for parameters that are definitely needed
     or may be changed on the current disk. The  content  of  the
     menus differ from disk to disk.

     Read mode data
          Several mode pages of the disk are read.  This data and



Joerg Schilling   Last change: 2. January 1997                 12






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



          the  inquiry  data  is  used to search in the disk data
          base.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _I_g_n_o_r_e _d_a_t_a_b_a_s_e _d_i_s_k _p_a_r_a_m_e_t_e_r_s _f_r_o_m '_s_f_o_r_m_a_t._d_a_t'?
          If you don't want the data from the  data  base  to  be
          used,  negotiate  the appropriate question.  Some disks
          cannot be determined from the fetchable data.  This are
          mainly  disks that are connected to a bridge controller
          e.g.  a controller from ESDI to SCSI.  SSSSffffoooorrrrmmmmaaaatttt is  able
          to  detect  the  right  data in the data base for disks
          with changeable media e.g. optical disks  that  support
          different  media  with different capacity and geometry.
          If there is more than one possible entry for this  disk
          in the data base,
          ssssffffoooorrrrmmmmaaaatttt asks:
          _S_e_l_e_c_t _a_l_t_e_r_n_a_t_e _d_i_s_k _t_y_p_e?
          If the disk type menu is  entered,  all  possible  data
          base  entries  are  displayed.   The  current  entry is
          marked with '*', the default entry is marked  with  '+'
          and  the  entry  most  similar  to  the current disk is
          marked with '~'.  A matching  factor  is  displayed  in
          parenthesis.  Higher  values  are  indicating  a better
          match.

     Read in label data
          If the disk is already formatted, ssssffffoooorrrrmmmmaaaatttt reads in  the
          label and ask whether to remember this data.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _I_g_n_o_r_e _o_l_d _d_i_s_k _L_a_b_e_l?
          I you confirm this question and reformat the disk,  the
          old partitioning information will be lost.

     Disk Parameters Menu
          If you want to modify some disk parameters  answer  the
          next question with 'y'.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _M_o_d_i_f_y _D_i_s_k _G_e_o_m_e_t_r_y _P_a_r_a_m_e_t_e_r_s?
          This enables to modify  basic  data  on  geometry,  the
          interleaving  factor  and the defect management system.
          If you want to do spindle synchronization, activate  it
          here.

     Error Recovery
          Error  recovery  parameters  include  read/write  retry
          count and similar.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _M_o_d_i_f_y _E_r_r_o_r _r_e_c_o_v_e_r_y _P_a_r_a_m_e_t_e_r_s?

     Disconnect Parameter
          Disconnect parameters are buffer full/empty  ratio  and
          bus inactivity limit.
          SSSSffffoooorrrrmmmmaaaatttt asks:



Joerg Schilling   Last change: 2. January 1997                 13






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



          _M_o_d_i_f_y _D_i_s_c_o_n_n_e_c_t _P_a_r_a_m_e_t_e_r_s

     Alternate Label
          If you want to use an alternate label that  may  be  in
          the data base go into the next menu.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _S_e_l_e_c_t _a_l_t_e_r_n_a_t_e _L_a_b_e_l?
          The current entry is marked with '*', the default entry
          is marked with '+'.

     Logical Label Geometry
          SSSSffffoooorrrrmmmmaaaatttt uses an abstract geometry in  the  label.  This
          allows  to  have  one  label  for a group of disks. The
          label geometry menu  allows  to  modify  this  abstract
          geometry.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _M_o_d_i_f_y _L_a_b_e_l _G_e_o_m_e_t_r_y _P_a_r_a_m_e_t_e_r_s?

     SCSI Parameters
          This menu contains  questions  about  command  queuing,
          defect list format and similar.  Some disks do not sup-
          port the default  block  defect  list  format.  Specify
          another  format in this case here. If the disk does not
          support the SCSI write-verify command,  ssssffffoooorrrrmmmmaaaatttt  allows
          to  split this into a SCSI write and a SCSI verify com-
          mand.  The data cannot be compared in  this  case.   If
          the  disk type is generally flaky a data base entry can
          be set up to do write verify as default  after  format-
          ting.  If the disk will not handle 1000 blocks per ver-
          ify command because of a firmware bug, a smaller  value
          may be specified here.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _M_o_d_i_f_y _S_C_S_I _P_a_r_a_m_e_t_e_r_s?

     Grown Defect List
          If a disk has not been formatted  before  or  has  been
          refurbished, you should clear the old grown defect list
          to get a clean start. If the disk has bad blocks, ssssffffoooorrrr----
          mmmmaaaatttt  will  find  them  after formatting while doing the
          surface analysis.  If the disk has  known  defects  you
          should  negotiate  the next question to keep the defect
          list.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _C_l_e_a_r _o_l_d _g_r_o_w_n _d_e_f_e_c_t _l_i_s_t?

     Mode pages
          If you want to format the disk, you  need  to  set  the
          mode pages before.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _S_e_t _m_o_d_e _p_a_g_e_s (_n_e_e_d_e_d _f_o_r _f_o_r_m_a_t)?
          However, if you do not want to format the disk, you may
          negotiate  this  question and will be lead to the label



Joerg Schilling   Last change: 2. January 1997                 14






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



          modification menu.

     Formatting the disk
          The next question is the last one  you  will  be  asked
          before  starting to format the disk.  If formatting has
          started, you will see  the  progress  of  this  process
          indicated  in  the  used up percentage of the estimated
          time.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _F_o_r_m_a_t _D_i_s_k _d_e_s_t_r_o_y_s _a_l_l _D_a_t_a. _R_e_a_l_l_y?
          If you only want to set the mode pages,  you  may  this
          question with 'n'.

     Creating and modifying the disk label
          After the disk has been formatted or if the  formatting
          has been denied, the label menu is entered.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _P_r_i_n_t _d_i_s_k _l_a_b_e_l?
          If you want to see  the  current  layout  of  the  disk
          label, enter 'y'.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _M_o_d_i_f_y _d_i_s_k _l_a_b_e_l?
          If you want to modify the disk label enter 'y'.

     Inside the label modification menu
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _L_a_b_e_l: <_Q_u_a_n_t_u_m _X_P_3_4_3_0_0> _c_h_a_n_g_e ?
          If you want to retain the old label name,  enter  <CR>,
          else  enter  'y'.  SSSSffffoooorrrrmmmmaaaatttt  will  ask for the new Label
          name.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _E_n_t_e_r _d_i_s_k _l_a_b_e_l: _Q_u_a_n_t_u_m _X_P_3_4_3_0_0
          You are left in the tty line edit mode and  may  modify
          the input line (see termio(7) manual page).
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _V_o_l_u_m_e _N_a_m_e: <> _c_h_a_n_g_e ?
          If you want to retain the old label name,  enter  <CR>,
          else  enter  'y'.  SSSSffffoooorrrrmmmmaaaatttt  will ask for the new Volume
          name.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _C_h_a_n_g_e _p_a_r_t_i_t_i_o_n _t_a_b_l_e?
          If you want to change the partition table enter 'y'.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _P_a_r_t      _T_a_g  _F_l_a_g   _C_y_l_i_n_d_e_r_s  _S_t_a_r_t_s_e_c  #   _o_f   _S_e_c
          _S_i_z_e    _B_l_o_c_k_s
          _0        _r_o_o_t  _w_m      _0  -    _3_0          _0      _6_7_5_8_0
          _3_2._9_9_M_B (_3_1/_0/_0)
          _C_h_a_n_g_e ?
          If you want to modify this partition enter 'y',  other-
          wise  enter  <CR>  until ssssffffoooorrrrmmmmaaaatttt asks for the partition
          you want to change.
          SSSSffffoooorrrrmmmmaaaatttt asks:



Joerg Schilling   Last change: 2. January 1997                 15






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



          _E_n_t_e_r _p_a_r_t_i_t_i_o_n _i_d _T_a_g [_r_o_o_t]:
          Enter <CR> if the partition tag is ok for  this  parti-
          tion, otherwise enter '?' to get a list of valid parti-
          tion tags or enter the new partition tag.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _E_n_t_e_r _p_a_r_t_i_t_i_o_n _p_e_r_m_i_s_s_i_o_n _F_l_a_g_s [_w_m]:
          Enter <CR> if the partition flag is ok for this  parti-
          tion, otherwise enter '?' to get a list of valid parti-
          tion flags or enter the new partition flag.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _E_n_t_e_r _s_t_a_r_t_i_n_g _c_y_l_i_n_d_e_r _0 (_0 - _3_8_5_1)/<_c_r>:
          Enter <CR> if the starting cylinder is ok for this par-
          tition,  otherwise  enter '?' to get a list of possible
          input.  XXX
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _E_n_t_e_r   _n_u_m_b_e_r   _o_f   _b_l_o_c_k_s   _6_7_5_8_0,   _3_1/_0/_0   (_0   -
          _8_3_9_5_1_8_0)/<_c_r>:
          Enter <CR> if the size is ok for this partition, other-
          wise enter '?' to get a list of possible input.  XXX
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _P_a_r_t      _T_a_g  _F_l_a_g   _C_y_l_i_n_d_e_r_s  _S_t_a_r_t_s_e_c  #   _o_f   _S_e_c
          _S_i_z_e    _B_l_o_c_k_s
          _0        _r_o_o_t  _w_m      _0  -    _3_0          _0      _6_7_5_8_0
          _3_2._9_9_M_B (_3_1/_0/_0)
          _O_k ?
          Enter <CR> if you still want to  modify  the  partition
          record.   You  then will be asked again for all parame-
          ters of this partition.  Enter 'y' if this partition is
          now ok.

          If all partitions  are  cycled  through,  ssssffffoooorrrrmmmmaaaatttt  will
          display the current label.
          SSSSffffoooorrrrmmmmaaaatttt asks:
          _U_s_e _t_h_i_s _l_a_b_e_l?
          If you enter 'y', ssssffffoooorrrrmmmmaaaatttt will update the label on disk
          and  go  into  the verify mode.  Anything else will put
          you into the label modification mode again.

     Disk Verification
          In disk verification mode, ssssffffoooorrrrmmmmaaaatttt will  do  a  surface
          analysis.   If a bad block is encountered, ssssffffoooorrrrmmmmaaaatttt will
          reassign this bad block.  XXX


HHHHoooowwww TTTToooo FFFFoooorrrrmmmmaaaatttt AAAA DDDDiiiisssskkkk
     The number of defects that SCSI disks can handle depends  on
     the defect mapping system they use. There are several possi-
     ble systems:

     The mapping system depends on the # of tracks  per  zone  in
     the  SCSI disk parameters.  Mapping area in this table means
     spare location.



Joerg Schilling   Last change: 2. January 1997                 16






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



     1)   One mapping area at the end of the disk. (tpz == 0)

     2)   One mapping area per track.         (tpz == 1)

     3)   One mapping area per cylinder.           (tpz == nhead)

     4)   Some mapping areas on on the disk   (tpz > nhead)

     If all the space in the defect spare locations above is used
     up, there still may be an additional mapping area at the end
     of the disk.  This is controlled by the alternate tracks per
     volume parameter.

     If your disk says _n_o _d_e_f_e_c_t _s_p_a_r_e _l_o_c_a_t_i_o_n, you may be  able
     to  get extra space by going into the disk parameter menu of
     sformat and change a value. Note: some disks tell  you  that
     some  of  the  values  are  changeable  (there is a range in
     parenthesis) but actually ignore the  new  value.  You  will
     have  to  read the values after formatting to see if the new
     parameters are in effect.


HHHHoooowwww TTTToooo MMMMooooddddiiiiffffyyyy AAAA LLLLaaaabbbbeeeellll
     Remember, don't panic. You need no desc calculator to create
     or modify a partition table.

     The alternate cylinders are historic  relics.  In  good  old
     days  (1982)  when SMD disks that were not able to do defect
     mapping have been used, these alternates were  added  to  do
     the  defect  mapping in the driver.  In these days the space
     occupied by these spare cylinders really has  been  used  as
     alternate (spare) space.

     Currently they are only used for some copies of the  primary
     disk  label  and an outdated copy of the defect list is only
     able to hold 127 defects :-(.


     The label geometry cannot be changed in the partition  menu.
     It must be set before from the LLLLaaaabbbbeeeellll PPPPaaaarrrraaaammmmeeeetttteeeerrrrssss menu.

     Print disk label?             If this question  is  answered
                                   with 'y', the label and parti-
                                   tioning    info    will     be
                                   displayed.

     Modify disk label?            If this question  is  answered
                                   with  'y', the label modifica-
                                   tion menu will be entered.

     Label: <Toshiba 1015MB> change ?
                                   If this question  is  answered



Joerg Schilling   Last change: 2. January 1997                 17






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



                                   with  'y',  the  name  of  the
                                   label nay be modified.

     Volume Name: <5.3> change ?   If this question  is  answered
                                   with  'y', the system V volume
                                   name may be altered.

     Change partition table?       If this question  is  answered
                                   with  'y',  a  partition  menu
                                   will be displayed.

     Use this label?

GGGGrrrraaaapppphhhhiiiiccccaaaallll LLLLaaaabbbbeeeellll DDDDiiiissssppppllllaaaayyyy
     When printing the label or partition data,  ssssffffoooorrrrmmmmaaaatttt  uses  a
     simple  ASCII  graphical  display to visualize the layout of
     the partitions.  The symbols used in  this  graphic  display
     are described below.

     Example:

     a I--/
     b    /-----------/
     c I----------------------------------------------------------------------I
     d partition not defined
     e             <--/
     f                /--------/
     g                                        <-------------------------------I
     h                         /----------------------------------------------I
     WARNING:
     part 'e' has unaligned start.
     part 'g' has unaligned start.

     Used symbols:

     I         Used to mark the start end the end of the disk (no
               error).

     X         Partition starts before zero  or  exceeds  end  of
               disk.

     /         Partition  has  an  adjacent  start  or  end  with
               another partition (no error).

     +         Two or mode partitions have the start or  the  end
               at the same position on the disk but no other par-
               tition connects to this point.  This is  an  error
               that  indicates  that there may be unused space on
               the disk.

     <         This partition does not connect to another  parti-
               tion  on  it's  beginning.   This is an error that



Joerg Schilling   Last change: 2. January 1997                 18






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



               indicates that there may be unused  space  on  the
               disk.

     >         This partition does not connect to another  parti-
               tion on it's end.  This is an error that indicates
               that there may be unused space on the disk.

     *         Internal error in the check routines (should never
               happen).

     Errors:

     ends behind lncyl   Partition is bigger than possible.

     One or more parts are not within range of part 'c'!
                         Partition 'c' (2) should  be  the  whole
                         disk.   This  warning  indicates  a disk
                         that deviates from this rule.

     Warnings:

     unaligned start     The partition starts not in  conjunction
                         to another partition.

     unaligned end       The partition ends not in conjunction to
                         another partition.

     space before start  There is  no  partition  that  uses  the
                         space  between the beginning of the disk
                         and the beginning of this partition.

     space after end     There is  no  partition  that  uses  the
                         space  between the end of this partition
                         and the end of the disk.


CCCCrrrreeeeaaaattttiiiinnnngggg DDDDiiiisssskkkk DDDDaaaattttaaaabbbbaaaasssseeee EEEEnnnnttttrrrriiiieeeessss
EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
FFFFIIIILLLLEEEESSSS
SSSSEEEEEEEE AAAALLLLSSSSOOOO
DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
NNNNOOOOTTTTEEEESSSS
BBBBUUUUGGGGSSSS
     This is a draft of the manual changes may be daily.











Joerg Schilling   Last change: 2. January 1997                 19






SFORMAT draft(1L)    Schily's USER COMMANDS     SFORMAT draft(1L)



AAAAUUUUTTTTHHHHOOOORRRR
     Joerg Schilling
     Seestr. 110
     D-13353 Berlin
     Germany

     Mail bugs and suggestions to:

     jjjjooooeeeerrrrgggg@@@@sssscccchhhhiiiillllyyyy....iiiissssddddnnnn....ccccssss....ttttuuuu----bbbbeeeerrrrlllliiiinnnn....ddddeeee or jjjjssss@@@@ccccssss....ttttuuuu----bbbbeeeerrrrlllliiiinnnn....ddddeeee














































Joerg Schilling   Last change: 2. January 1997                 20



