


SD(4S)           DEVICES AND NETWORK INTERFACES            SD(4S)



NAME
     sd - driver for SCSI disk devices

CONFIG - SUN-3, SUN-3x, and SUN-4 SYSTEMS
     controller si0 at vme24d16 ? csr 0x200000 priority 2 vector siintr 0x40
     controller si0 at obio ? csr 0x140000 priority 2
     disk sd0 at si0 drive 0 flags 0
     disk sd1 at si0 drive 1 flags 0
     disk sd2 at si0 drive 8 flags 0
     disk sd3 at si0 drive 9 flags 0
     disk sd4 at si0 drive 16 flags 0
     disk sd6 at si0 drive 24 flags 0

     controller sc0 at vme24d16 ? csr 0x200000 priority 2 vector scintr 0x40
     disk sd0 at sc0 drive 0 flags 0
     disk sd1 at sc0 drive 1 flags 0
     disk sd2 at sc0 drive 8 flags 0
     disk sd3 at sc0 drive 9 flags 0
     disk sd4 at sc0 drive 16 flags 0
     disk sd6 at sc0 drive 24 flags 0

     The first two controller lines above specify the  first  and
     second  SCSI  host adapters for Sun-3, Sun-3x, and Sun-4 VME
     systems.  The third controller line specifies the first  and
     only SCSI host adapter on Sun-3/50 and Sun-3/60 systems.

     The four lines following the controller specification  lines
     define the available disk devices, sd0 - sd6.

     The flags field is used to specify the SCSI device  type  to
     the  host  adapter.  flags must be set to 0 to identify disk
     devices.

     The drive value is calculated using the formula:
          8*_t_a_r_g_e_t + _l_u_n
     where _t_a_r_g_e_t is the SCSI target, and _l_u_n is the SCSI logical
     unit number.

     The next configuration block, following si0 and  si1  above,
     describes  the configuration for the older sc0 host adapter.
     It uses the same configuration description as the  si0  host
     adapter.

CONFIG - SPARCsystem 330 and SUN-3/80 SYSTEMS
     controller sm0 at obio ? csr 0xfa000000 priority 2
     disk sd0 at sm0 drive 0 flags 0
     disk sd1 at sm0 drive 1 flags 0
     disk sd2 at sm0 drive 8 flags 0
     disk sd3 at sm0 drive 9 flags 0
     disk sd4 at sm0 drive 16 flags 0
     disk sd6 at sm0 drive 24 flags 0




Sun Release 4.1    Last change: 7 October 1990                  1






SD(4S)           DEVICES AND NETWORK INTERFACES            SD(4S)



     The SPARCsystem 330 and Sun-3/80 use an on-board  SCSI  host
     adapter,  sm0.  It follows the same rules as described above
     for the Sun-3, Sun-3x, and Sun-4 section.

CONFIG - SUN-4/110 SYSTEM
     controller sw0 at obio 2 csr 0xa000000 priority 2
     disk sd0 at sw0 drive 0 flags 0
     disk sd1 at sw0 drive 1 flags 0
     disk sd2 at sw0 drive 8 flags 0
     disk sd3 at sw0 drive 9 flags 0
     disk sd4 at sw0 drive 16 flags 0
     disk sd6 at sw0 drive 24 flags 0

     The Sun-4/110 uses an on-board SCSI host adapter,  sw0.   It
     follows the same rules as described above for the Sun-3, and
     Sun-4 section.

CONFIG - SUN-3/E SYSTEM
     controller se0 at vme24d16 ? csr 0x300000 priority 2 vector se_intr 0x40
     disk sd0 at se0 drive 0 flags 0
     disk sd1 at se0 drive 1 flags 0
     disk sd2 at se0 drive 8 flags 0
     disk sd3 at se0 drive 9 flags 0

     The Sun-3/E uses a VME-based SCSI  host  adapter,  se0.   It
     follows  the same rules as described above for the Sun-3 and
     Sun-4 section.

CONFIG - Sun386i
     controller wds0 at obmem ? csr 0xFB000000 dmachan 7 irq 16 priority 2
     disk sd0 at wds0 drive 0 flags 0
     disk sd1 at wds0 drive 8 flags 0
     disk sd2 at wds0 drive 16 flags 0

     The Sun386i configuration follows the same  rules  described
     above under the Sun-3 and Sun-4 configuration section.  con-
     figuration section.

CONFIG - Desktop SPARCsystems
     device-driver esp
     scsibus0 at esp
     disk sd0 at scsibus0 target 3 lun 0
     disk sd1 at scsibus0 target 1 lun 0
     disk sd2 at scsibus0 target 2 lun 0
     disk sd3 at scsibus0 target 0 lun 0

     The Desktop SPARCsystem configuration files specify a device
     driver (esp), and a SCSI bus attached to that device driver,
     and then disks on that SCSI bus at the SCSI Target and Logi-
     cal Unit addresses are specified.





Sun Release 4.1    Last change: 7 October 1990                  2






SD(4S)           DEVICES AND NETWORK INTERFACES            SD(4S)



DESCRIPTION
     Files with minor device numbers 0 through 7 refer to various
     portions  of  drive 0.  The standard device names begin with
     "sd" followed by the drive number and then a letter a-h  for
     partitions  0-7  respectively.   The character ? stands here
     for a drive number in the range 0-6.

     The block-files access the disk using  the  system's  normal
     buffering  mechanism and are read and written without regard
     to physical disk records.  There is also a  "raw"  interface
     that  provides  for direct transmission between the disk and
     the user's read or write buffer.  A  single  read  or  write
     call usually results in one I/O operation; raw I/O is there-
     fore  considerably  more  efficient  when  many  bytes   are
     transmitted.   The  names  of  the  raw files conventionally
     begin with an extra `r.'

     I/O requests (such as lseek (2V)) to the SCSI disk must have
     an  offset  that  is a multiple of 512 bytes (DEV_BSIZE), or
     the driver returns an EINVAL error.  If the transfer  length
     is  not  a  multiple  of  512  bytes,  the transfer count is
     rounded up by the driver.

  Disk Support
     This driver handles the Adaptec ACB-4000 disk controller for
     ST-506  drives,  the  Emulex  MD21  disk controller for ESDI
     drives, and embedded, CCS-compatible SCSI disk drives.

     On Sun386i and Desktop SPARCsystems,  this  driver  supports
     the  CDC  Wren III half-height, and Wren IV full-height SCSI
     disk drives.

     The type of disk drive is determined using the SCSI  inquiry
     command  and  reading  the volume label stored on block 0 of
     the drive.  The volume label describes the disk geometry and
     partitioning;  it  must  be  present  or  the disk cannot be
     mounted by the system.

     The sd?a partition is normally used for the root file system
     on  a disk, the sd?b partition as a paging area (e.g. swap),
     and the sd?c partition for pack-pack copying.  sd?c normally
     maps the entire disk and may also be used as the mount point
     for secondary disks in the system.  The rest of the disk  is
     normally the sd?g partition.  For the primary disk, the user
     file system is located here.

FILES
     /dev/sd[0-6][a-h]   block files
     /dev/rsd[0-6][a-h]  raw files

SEE ALSO
     dkio(4S), directory(3V), lseek(2V), read(2V), write(2V)



Sun Release 4.1    Last change: 7 October 1990                  3






SD(4S)           DEVICES AND NETWORK INTERFACES            SD(4S)



     Product Specification for Wren IV SCSI Model 94171
     Product Specification for Wren III SCSI Model 94161
     Product Specification for Wren III SCSI Model 94211
     Emulex MD21 Disk Controller Programmer Reference Manual
     Adaptec ACB-4000 Disk Controller OEM Manual

DIAGNOSTICS
     sd?:  sdtimer: I/O request timeout
          A tape I/O operation has taken too long to complete.  A
          device or host adapter failure may have occurred.

     sd?:  sdtimer: can't abort request
          The driver is unable to find the request in the discon-
          nect  queue  to  notify  the  device driver that it has
          failed.

     sd?:  no space for inquiry data
     sd?:  no space for disk label
          The driver was unable to get enough space for temporary
          storage.  The driver is unable to open the disk device.

     sd?:  <%s>
          The driver has found a SCSI disk device and  opened  it
          for  the  first  time.   The disk label is displayed to
          notify the user.

     sd?:  SCSI bus failure
          A host adapter error was detected.  The system may need
          to be rebooted.

     sd?:  single sector I/O failed
          The driver attempted to  recover  from  a  transfer  by
          writing  each  sector,  one at a time, and failed.  The
          disk needs to be reformatted to map out the new  defect
          causing this error.

     sd?:  retry failed
     sd?:  rezero failed
          A disk operation failed.  The  driver  first  tries  to
          recover  by  retrying  the  command, if that fails, the
          driver rezeros the heads to cylinder 0 and repeats  the
          retries.   A  failure  of  either  the  retry or rezero
          operations results in these warning messages; the error
          recovery  operation  continues until the retry count is
          exhausted.  At that time a hard error is posted.

     sd?:  request sense failed
          The driver was attempting to determine the cause of  an
          I/O  failure  and  was  unable to get more information.
          This implies that the disk device may have failed.





Sun Release 4.1    Last change: 7 October 1990                  4






SD(4S)           DEVICES AND NETWORK INTERFACES            SD(4S)



     sd?:  warning, abs. block %d has failed %d times
          The driver is warning the user that the specified block
          has failed repeatedly.

     sd?:  block %d needs mapping
     sd?:  reassigning defective abs. block %d
          The specified block has failed repeatedly and may  soon
          become  an  unrecoverable  failure.  If the driver does
          not map out the specified block  automatically,  it  is
          recommend that the user correct the problem.

     sd?:  reassign block failed
          The driver attempted to map out a block  having  exces-
          sive  soft  errors  and  failed.  The user needs to run
          format and repair the disk.

     sd?%c: cmd how blk %d (rel. blk %d)
            sense key(0x%x): %s, error code(0x%x): %s
          An I/O operation (cmd), encountered an error  condition
          at  absolute  block  (blk  %d),  partition (sd?%c:), or
          relative block  (rel.  block%d).   The  error  recovery
          operation   (how)   indicates   whether   it  _r_e_t_r_y'ed,
          _r_e_s_t_o_r_e_d, or _f_a_i_l_e_d.  The sense key and error  code  of
          the  error  are displayed for diagnostic purposes.  The
          absolute blk of the the error is used for  mapping  out
          the  defective  block.  The rel. blk is the block (sec-
          tor) in error, relative to the beginning of the  parti-
          tion  involved.   This is useful for using icheck(8) to
          repair a damaged file structure on the disk.

  Destop SPARCsystems Diagnostics
     The diagnostics for Desktop SPARCsystems are much like those
     above.   Below are some additional diagnostics you might see
     on a Desktop SPARCsystem:

     sd?:  SCSI transport failed: reason 'xxxx': {retrying|giving up}
          The host adapter has failed to transport a  command  to
          the  target  for  the  reason  stated.  The driver will
          either retry the command or, ultimately, give up.

     sd?:  disk not responding to selection
          The  target  disk  isn't  responding.  You   may   have
          accidently kicked a power cord loose.

     sd?:  disk ok
          The target disk is now responding again.

     sd?:  disk offline
          The driver has decided  that  the  target  disk  is  no
          longer there.





Sun Release 4.1    Last change: 7 October 1990                  5






SD(4S)           DEVICES AND NETWORK INTERFACES            SD(4S)



BUGS
     These disk drivers assume  that  you  don't  have  removable
     media  drives, and also that in order to operate normally, a
     valid Sun disk label must be in sector zero.

     A logical block size of 512 bytes is assumed  (and  enforced
     on Desktop SPARCsystem).
















































Sun Release 4.1    Last change: 7 October 1990                  6



