Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dc(7) — CLIX 3.1r7.6.28

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ioctl(2)

diskpar(4)



  dc(7)                               CLIX                               dc(7)



  NAME

    dc - SCSI disk driver

  DESCRIPTION

    The dc driver is the Small Computer System Interface (SCSI) disk driver.
    It controls SCSI busses connected to I/O processor (IOP) boards and quad-
    SCSI (QS) boards.  It supports seven SCSI controllers, each with two
    logical units, for a maximum of 14 physical disks.

    A disk may be logically divided into sections called partitions.  Each
    partition has a unique partition number and modifier number.  A disk
    partition header precedes each disk partition (see the diskpar file
    format).  Using the size information in each partition's header, dc builds
    partition tables for each hard disk.

    The /dev/dsk/s1u0p7.3 file is a typical special file to access a disk
    partition.  The SCSI address for the controller is 1, the logical unit
    number is 0, the partition number is 7, and the modifier number is 3.  The
    format of the major and minor device mask for dc is shown below.  For
    disks connected to a QS, QS defines a quad-SCSI board number and CHAN
    defines a bus, or channel number.

    Major Device Format for Disks Connected to an IOP:

                 ________________________________________________
                |  7 |   6 |   5 |   4 |   3 |   2 |   1 |   0  |
                |____|_____|___________|_________________|______|
                |    |     |           |                 |      |
                |  0 |   1 |     IOP   |      SCSI ID    |  UNIT|
                |____|_____|___________|_________________|______|

    Major Device Format for Disks Connected to a QS:

                 ________________________________________________
                |  7 |   6 |   5 |   4 |   3 |   2 |   1 |   0  |
                |____|_____|___________|_________________|______|
                |    |     |           |                 |      |
                |  1 |  QS |    CHAN   |      SCSI ID    |  UNIT|
                |____|_____|___________|_________________|______|

    Minor Device Format:

                 _______________________________________________
                |  7 |   6 |   5 |   4 |   3 |   2 |   1 |   0 |
                |______________________|_______________________|
                |                      |                       |
                |       PARTITION      |        MODIFIER       |
                |______________________|_______________________|




  2/94 - Intergraph Corporation                                              1






  dc(7)                               CLIX                               dc(7)



                |______________________|_______________________|

    The block special files /dev/dsk/s?u?p?.? provide buffered access to the
    specified disk.  The kernel buffers disk data in the system buffer cache
    and uses dc only if data needs to be read or written to the disk.

    The character special files /dev/rdsk/s?u?p?.? provide direct access to
    the specified disk.  Data is transferred from the disk directly to user
    memory.  Transfer requests to disk character special files must be in
    block multiples.

    The ioctl(fildes, request, arg) function can be used for the following
    requests.  The structures below are defined in <sys/dc.h>.

    DC_PARSIZE
           Gets the size of a device.  The arg parameter points to an integer
           location updated with the size of the device in blocks.

    DC_REPAR
           Forces dc to read the partitions on a disk.  The arg parameter is
           not used.

    DC_SETPAR
           Establishes a soft disk partition.  This command allows a process
           to modify or create a software partition entry without actually
           writing the partition headers on the disk.  The arg parameter
           points to a dc_softpar structure shown below and defined in the
           <sys/dc.h> header file.

           struct dc_softpar {
                unsigned char par; /* partition number */
                unsigned char mod; /* modifier number */
                int      start;    /* starting block */
                int      size;     /* size in blocks */
           };


    DC_GETPAR
           Gets the disk partition header information.  The arg parameter
           points to a dc_softpar structure.

    DC_GETBLKSIZE
           Gets the logical block size of a device.  The arg parameter points
           to an integer location that is updated with the size in bytes.

    DC_READ_RESERVED
           Reads/writes the reserved volume area of a read/write optical disk.
           Both the partition and modifier of the device must be zero.  The
           arg parameter points to the dc_reserve structure shown below and
           defined in the <sys/dc.h> header file.




  2                                              Intergraph Corporation - 2/94






  dc(7)                               CLIX                               dc(7)



           struct dc_reserve {
                char *addr;
                int size;
           };

           The addr member points to a volume information buffer, and the size
           variable contains the number of bytes to be read or written.  The
           size variable must be greater than 2048 bytes and the device's
           logical block size.

  NOTES

    A device file with a partition number of 0 and a modifier number of 0
    corresponds to the entire disk specified by the SCSI address for the
    controller and the logical unit number.

  FILES

    /dev/dsk/s?u?p?.?   Block special file for accessing a SCSI disk.

    /dev/rdsk/s?u?p?.?  Character special file for accessing a SCSI disk.

  ERRORS

    On failure, errno is set to one of the following values:

    [EINVAL]   The request parameter is not one of the listed commands.

    [EFAULT]   The arg parameter points to an invalid location.

  RELATED INFORMATION

    Functions:  ioctl(2)

    Files:  diskpar(4)



















  2/94 - Intergraph Corporation                                              3




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