p4 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. .SH
  2. Block Devices
  3. .PP
  4. The block device I/O system is like a
  5. protocol stack of filters.
  6. There are a set of pseudo-devices that call
  7. recursively to other pseudo-devices and real devices.
  8. The protocol stack is compiled from a configuration
  9. string that specifies the order of pseudo-devices and devices.
  10. Each pseudo-device and device has a set of entry points
  11. that corresponds to the operations that the file system
  12. requires of a device.
  13. The most notable operations are
  14. .CW read ,
  15. .CW write ,
  16. and
  17. .CW size .
  18. .PP
  19. The device stack can best be described by
  20. describing the syntax of the configuration string
  21. that specifies the stack.
  22. Configuration strings are used
  23. during the setup of the file system.
  24. For a description see
  25. .I fsconfig (8).
  26. In the following recursive definition,
  27. .I D
  28. represents a
  29. string that specifies a block device.
  30. .IP "\fID\fP = (\fIDD\fP...)"
  31. .br
  32. This is a set of devices that
  33. are concatenated to form a single device.
  34. The size of the catenated device is the
  35. sum of the sizes of each sub-device.
  36. .IP "\fID\fP = [\fIDD\fP...]"
  37. .br
  38. This is the interleaving of the
  39. individual devices.
  40. If there are N devices in the list,
  41. then the pseudo-device is the N-way block
  42. interleaving of the sub-devices.
  43. The size of the interleaved device is
  44. N times the size of the smallest sub-device.
  45. .IP "\fID\fP = \f(CWp\fP\fIDN1.N2\fP"
  46. .br
  47. This is a partition of a sub-device.
  48. The sub-device is partitioned into 100 equal pieces.
  49. If the size of the sub-device is not divisible by 100,
  50. then there will be some slop thrown away at the top.
  51. The pseudo-device starts at the N1-th piece and
  52. continues for N2 pieces. Thus
  53. .CW p\fID\fP67.33
  54. will be the
  55. last third of the device
  56. .I D .
  57. .IP "\fID\fP = \f(CWf\fP\fID\fP"
  58. .br
  59. This is a fake write-once-read-many device simulated by a
  60. second read-write device.
  61. This second device is partitioned
  62. into a set of block flags and a set of blocks.
  63. The flags are used to generate errors if a
  64. block is ever written twice or read without being written first.
  65. .IP "\fID\fP = \f(CWc\fP\fIDD\fP"
  66. .br
  67. This is the cache/WORM device made up of a cache (read-write)
  68. device and a WORM (write-once-read-many) device.
  69. More on this later.
  70. .IP "\fID\fP = \f(CWo\fP"
  71. .br
  72. This is the dump file system that is the
  73. two-level hierarchy of all dumps ever taken on a cache/WORM.
  74. The read-only root of the cache/WORM file system
  75. (on the dump taken Feb 18, 1995) can
  76. be referenced as
  77. .CW /1995/0218
  78. in this pseudo device.
  79. The second dump taken that day will be
  80. .CW /1995/02181 .
  81. .IP "\fID\fP = \f(CWw\fP\fIN1.N2\fP"
  82. .br
  83. This is a SCSI disk on controller N1 and target N2.
  84. .IP "\fID\fP = \f(CWl\fP\fIN1.N2\fP"
  85. .br
  86. This is the same as
  87. .CW w ,
  88. but one block from the SCSI disk is removed for labeling.
  89. .IP "\fID\fP = \f(CWj(\fP\fID\d\s-2\&1\s+2\u\fID\d\s-2\&2\s+2\u\f(CW*)\fID\d\s-2\&3\s+2\u\f1"
  90. .br
  91. .I D\d\s-2\&1\s+2\u
  92. is the juke box SCSI interface.
  93. The
  94. .I D\d\s-2\&2\s+2\u 's
  95. are the SCSI drives in the juke box
  96. and the
  97. .I D\d\s-2\&3\s+2\u 's
  98. are the demountable platters in the juke box.
  99. .I D\d\s-2\&1\s+2\u
  100. and
  101. .I D\d\s-2\&2\s+2\u
  102. must be
  103. .CW w .
  104. .I D\d\s-2\&3\s+2\u
  105. must be pseudo devices of
  106. .CW w
  107. or
  108. .CW l
  109. devices.
  110. .PP
  111. For both
  112. .CW w
  113. and
  114. .CW r
  115. devices any of the configuration numbers
  116. can be replaced by an iterator of the form
  117. .CW <\fIN1-N2\fP> .
  118. Thus
  119. .P1
  120. [w0.<2-6>]
  121. .P2
  122. is the interleaved SCSI disks on SCSI targets
  123. 2 through 6 of SCSI controller 0.
  124. The main file system on
  125. Emelie
  126. is defined by the configuration string
  127. .P1
  128. c[w1.<0-5>.0]j(w6w5w4w3w2)l(<0-236>l<238-474>)
  129. .P2
  130. This is a cache/WORM driver.
  131. The cache is three interleaved disks on SCSI controller 1
  132. targets 0, 1, 2, 3, 4, and 5.
  133. The WORM half of the cache/WORM
  134. is 474 jukebox disks.