Annotation of researchv10dc/man/man4/ra.4, revision 1.1.1.1

1.1       root        1: .TH RA 4
                      2: .CT 2 sa
                      3: .SH NAME
                      4: ra \- DEC MSCP disks (RA60, RA80, RA81, RA90)
                      5: .SH DESCRIPTION
                      6: .I Ra
                      7: devices occupy disk drives conforming to
                      8: DEC's Mass Storage Control Protocol standard:
                      9: drives such as the RA81
                     10: connected via controllers such as the UDA50.
                     11: Files with minor device numbers 0 through 7
                     12: refer to different sections of drive 0,
                     13: minor devices 8 through 16 refer to drive 1,
                     14: and so on up to 63 (8 drives).
                     15: .PP
                     16: Normally the disk is accessed in 1024-byte blocks (1K).
                     17: If 64 is added to the minor device number,
                     18: 4096-byte blocks (4K) are used instead.
                     19: A 4K device mounted as a file system is bitmapped; see
                     20: .IR filsys (5).
                     21: .PP
                     22: Conventionally the files are given names like
                     23: .L ra37
                     24: for section 7 of drive 3.
                     25: There are no name rules distinguishing 1024-byte files
                     26: from 4096-byte files;
                     27: in practice the files are almost always the 4096-byte kind.
                     28: .PP
                     29: The start and size
                     30: of the sections of each drive
                     31: are as follows.
                     32: Sizes are measured in
                     33: 512-byte hardware sectors.
                     34: .PP
                     35: .nf
                     36: .ta .5i +\w'000000    'u +\w'000000    'u
                     37:        disk    start   length
                     38:        0       0       10240
                     39:        1       10240   20480
                     40:        2       30720   249848
                     41:        3       280568  249848
                     42:        4       530416  249848
                     43:        5       780264  arbitrarily large
                     44:        6       30720   749544
                     45:        7       0       arbitrarily large
                     46: .DT
                     47: .fi
                     48: .PP
                     49: The `arbitrarily large'
                     50: sections reach to the end of the disk.
                     51: .I Rarct
                     52: will display disk sizes; see
                     53: .IR rarepl (8).
                     54: For example,
                     55: an RA81 has 891072 sectors,
                     56: so section 7 is that size,
                     57: and section 5 is
                     58: 891072\(mi780264=110808 sectors.
                     59: An RA90 has 2376153 sectors;
                     60: section 7 is that size,
                     61: section 5 is
                     62: 2376153\(mi780264=1595889 sectors.
                     63: For other disks,
                     64: run
                     65: .I rarct
                     66: and do the arithmetic.
                     67: .PP
                     68: The
                     69: .I ra
                     70: files
                     71: discussed above access the disk via the system's normal
                     72: buffering mechanism
                     73: and may be read and written without regard to
                     74: physical disk records.
                     75: There is also a `raw' interface
                     76: which provides for direct transmission between the disk
                     77: and the user's read or write buffer.
                     78: A single read or write call results in exactly one I/O operation
                     79: and therefore raw I/O is considerably more efficient when
                     80: many words are transmitted.
                     81: The names of the raw files
                     82: begin with
                     83: .L rra
                     84: and end with a number which selects the same disk
                     85: as the corresponding
                     86: .L ra
                     87: file.
                     88: .PP
                     89: In raw I/O the buffer must begin on a word boundary,
                     90: and counts should be a multiple of 512 bytes
                     91: (a disk block).
                     92: Likewise
                     93: .IR lseek (2)
                     94: calls should specify a multiple of 512 bytes.
                     95: .PP
                     96: Several
                     97: .IR ioctl (2)
                     98: calls
                     99: apply to the raw devices.
                    100: .TF UIORRCT
                    101: .TP
                    102: .B UIOCHAR
                    103: The third argument to
                    104: .I ioctl
                    105: points to an object 
                    106: to be filled with drive parameters:
                    107: .EX
                    108: .ta .5i +\w'daddr_t 'u +\w'radsize   'u
                    109: struct ud_unit {
                    110:        daddr_t radsize;        /* disk size, sectors */
                    111:        daddr_t rctsize;        /* RCT size, including pad */
                    112:        long    medium; /* medium id */
                    113:        short   tracksz;        /* sectors per track */
                    114:        short   groupsz;        /* tracks per group */
                    115:        short   cylsz;  /* groups per cylinder */
                    116:        char    rbns;   /* RBNs per track */
                    117:        char    copies; /* number of RCT copies */
                    118: };
                    119: .EE
                    120: .TF UIORRCT
                    121: .TP
                    122: .B UIORRCT
                    123: The third argument points to an object of type
                    124: .EX
                    125: struct ud_rctbuf {
                    126:        caddr_t buf;
                    127:        int     lbn;
                    128: };
                    129: .EE
                    130: .IP
                    131: .B buf
                    132: points to a 512-byte buffer,
                    133: into which block
                    134: .B lbn
                    135: of the replacement and caching table
                    136: (RCT)
                    137: is read.
                    138: As many copies of the RCT
                    139: as necessary
                    140: are examined to find a readable copy
                    141: of the block.
                    142: .TP
                    143: .B UIOWRCT
                    144: The third argument is like that of
                    145: .BR UIORRCT .
                    146: Block
                    147: .B lbn
                    148: of the RCT is written
                    149: in all copies.
                    150: .TP
                    151: .B UIOREPL
                    152: The third argument points to an object of type:
                    153: .EX
                    154: struct ud_repl {
                    155:        daddr_t replbn; /* good block */
                    156:        daddr_t lbn;    /* bad block */
                    157:        short   prim;   /* nonzero if primary replacement */
                    158: };
                    159: .EE
                    160: .IP
                    161: A `replace' command
                    162: is sent to the controller,
                    163: requesting that attempts to access logical block
                    164: .I lbn
                    165: henceforth be revectored to replacement block
                    166: .IR replbn .
                    167: .I Prim
                    168: should be set nonzero
                    169: if and only if
                    170: .I replbn
                    171: is the primary replacement block for
                    172: .IR lbn .
                    173: .TP
                    174: .B UIOSPDW
                    175: Arrange that the disk drive will spin down
                    176: when the last file using it is closed.
                    177: .TP
                    178: .B UIORST
                    179: Reset the controller
                    180: to which this disk is connected.
                    181: Any pending operations are abandoned and return an error.
                    182: .SH FILES
                    183: .F /dev/ra*
                    184: .br
                    185: .F /dev/rra*
                    186: .SH SEE ALSO
                    187: .IR rarepl (8)
                    188: .br
                    189: MSCP Basic Disk Functions Manual
                    190: .br
                    191: DEC Standard Disk Format Specification
                    192: .SH BUGS
                    193: In raw I/O
                    194: .IR read (2)
                    195: and
                    196: .IR write 
                    197: truncate file offsets to 512-byte block boundaries,
                    198: and
                    199: .I write
                    200: scribbles on the tail of incomplete blocks.
                    201: Thus,
                    202: in programs that are likely to access raw devices,
                    203: .I read, write
                    204: and
                    205: .IR lseek (2)
                    206: should always deal in 512-byte multiples.
                    207: .PP
                    208: .B UIORRCT
                    209: and
                    210: .B UIOWRCT
                    211: will misbehave if invoked on a section
                    212: that doesn't start
                    213: at the beginning of the disk.
                    214: Section 7
                    215: (the whole disk)
                    216: is the best choice.
                    217: .PP
                    218: The 1K/4K flag bit in the device number is unfortunate.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.