|
|
1.1 ! root 1: .so /usr/lib/tmac/tmac.s ! 2: .so /usr/lib/tmac/tmac.cs ! 3: .tr ~ ! 4: .\" .RP here gives release paper (no cs) ! 5: .\" following arg should be removed so itds can get their jollies ! 6: .TI ! 7: Using the SONY WORM drive and jukebox ! 8: .AH "Andrew Hume" MH 11271 6262 2C-471 research!andrew "" ! 9: .SA ! 10: .FP palatino ! 11: This note describes the software available for handling ! 12: Write-Once-Read-Many (WORM) optical disks. ! 13: Some of the software is applicable to most devices with a SCSI interface. ! 14: .SE ! 15: .KW "optical disk" "SCSI" "" "" ! 16: .TY IM y ! 17: .NU 11271 880913 01 39199-11 "" ! 18: .MY "" "" y "" "" "" "" ! 19: .PR 0 ! 20: .RL y ! 21: .CO y ! 22: Paul Glick ! 23: Ted Kowalski ! 24: Marty Shannon ! 25: M J Sheehan ! 26: E J Sitar ! 27: .CE ! 28: .CV y ! 29: .CE ! 30: .SC 11 ! 31: .SH ! 32: .FP palatino ! 33: Introduction ! 34: .de CS ! 35: .DS ! 36: .nf ! 37: .ft CW ! 38: .ps 8 ! 39: .vs 9.5 ! 40: .ta 8n +8n +8n +8n +8n ! 41: .in 10n ! 42: .. ! 43: .de CE ! 44: .DE ! 45: .. ! 46: .PP ! 47: Optical drives are quite trendy nowadays (mid 1988). ! 48: The AT&T Bell Laboratories Computation Centers are doing ! 49: cost and performance evaluations of available hardware. ! 50: There even plans for an official AT&T file backup product based on WORMs. ! 51: For now and the next several years, WORM disks are the dominant ! 52: optical disk technology. ! 53: .PP ! 54: WORM disks range in size from 3.5 to 13 inches in diameter ! 55: and have capacities between a few hundred megabytes to a few gigabytes. ! 56: They can either be double-sided or single-sided ! 57: (but in general drives are single-sided; ! 58: double-sided disks must be ejected and then turned over ! 59: in order to access the second side). ! 60: There is also a tradeoff between capacity and speed of access. ! 61: Disks which spin at a constant angular velocity (CAV) are much faster ! 62: (a factor of 2\-3) at moving the heads to a given spot than disks ! 63: which spin at a constant linear velocity at the reading head (CLV). ! 64: On the other hand, the CLV disks typically have a 50% greater capacity ! 65: than the CAV disks. ! 66: All other characteristics are about the same, including transfer rate. ! 67: For example, the disks we use are ! 68: .TS ! 69: center; ! 70: c l. ! 71: disk type WDM-3DL0 (CLV) ! 72: disk size 12in ! 73: disk capacity 3.2GB (1.6GB/side) ! 74: seek time 600ms (1/3 stroke?) ! 75: read rate ~200KB/s ! 76: write rate ~75KB/s ! 77: .TE ! 78: I/O rates are measured on a multi-user timesharing system; ! 79: dedicated systems can do about 40% better. ! 80: .PP ! 81: Most WORM disks interface to computers by the SCSI bus. ! 82: Our computing environment (VAXen) doesn't support SCSI directly; ! 83: we use SCSI controllers that attach to the Unibus. ! 84: This is not as bad as it seems because for once, DEC had a good idea and ! 85: designed and implemented a device independent protocol ! 86: (Mass Storage Control Protocol or MSCP) for its mass storage devices. ! 87: The protocol handles arbitrary sized disks and views mass storage ! 88: as a virtual array of 512 byte blocks with no errors. ! 89: The lucky break for us is that third party vendors sell controllers ! 90: that take a SCSI disk on one side and on the other appear as a MSCP disk, ! 91: hiding dirty laundry such as bad block replacement and so on. ! 92: The end result is that we describe these controllers as regular DEC disks ! 93: and everything just works; at least, in theory. ! 94: I describe some rude exceptions below. ! 95: .PP ! 96: The software is divided into two parts. ! 97: The main body of code implements a file system within an arbitrary Unix file. ! 98: Normally, the file is a raw optical disk but it can be a regular Unix file. ! 99: In this latter guise, the software is much like a faster analog of ! 100: .I tar (1). ! 101: The other bunch of code is specific to SCSI and takes advantage of ! 102: SONY functionality beyond the basic disk functions. ! 103: .SH ! 104: The WORM software ! 105: .PP ! 106: The WORM file system code is both extensive and uninteresting. ! 107: It is adequately described in the manual entry. ! 108: The data layout on disk is a little peculiar, at least to the WORM manufacturers. ! 109: It is a linked list of segments, every ! 110: .CW "worm write" ! 111: command generating a new segment. ! 112: Each segment has the name, address, ! 113: .I stat ! 114: information, and data for a list of files. ! 115: The only trick here is that the pointer to the next segment ! 116: must be preallocated. ! 117: The main advantages of the design are robustness, simplicity ! 118: and efficiency. ! 119: The main disadvantage is that as more of the disk gets used, ! 120: it requires more CPU time to build the internal directory ! 121: as it is built by processing each segment in turn. ! 122: (This is fixed by the ! 123: .CW "worm btree" ! 124: command which build converts the directory into ! 125: .I cbt (1) ! 126: form and stores this at the end of the disk.) ! 127: .PP ! 128: The other disadvantage is that we need to recognize a block ! 129: that we have never written (the end of the linked list). ! 130: Regrettably, the WORM manufacturers regard this as an error ! 131: and so it is important that the MSCP-SCSI controller allows ! 132: the user to distinguish between this kind of error ! 133: (called a blank check in WORMland) ! 134: and a real read error (failing to read data we wrote). ! 135: In our environment, which admittedly deals poorly with errors of any kind, ! 136: this entails the driver in the operating system returning a different error ! 137: code (say, ! 138: .CW ENXIO ! 139: rather than the normal ! 140: .CW EIO ). ! 141: Every controller manufacturer signals blank check differently! ! 142: Emulex doesn't want you to know; they maintain that the mapping ! 143: from SCSI error codes to MSCP error codes, that is, how a blank check ! 144: is reported, is proprietary and won't tell you. ! 145: U.S. Design does exactly the right thing by returning ! 146: the MSCP ``forced data error'' code. ! 147: The MSCP standard says this is a special data error ! 148: whose meaning is controller-specific. ! 149: T.D. Systems returns a ``header compare'' data error, ! 150: rationalizing that no SCSI disk would ever return such an error. ! 151: (There is also a rumor that this is compatible with Emulex ! 152: but I am unable to verify.) ! 153: Unfortunately, other MSCP devices might so we are forced to handle ! 154: this special case in the MSCP driver. ! 155: .SH ! 156: The SCSI software ! 157: .PP ! 158: There are two programs: ! 159: .I scsish ! 160: and ! 161: .I "worm mount" . ! 162: The former is a shell with many commands to manipulate SCSI devices ! 163: although I have only tried it on SONY disks. ! 164: There is more than a little dependence on SONY specifics. ! 165: The latter does some jukebox specific stuff conveniently. ! 166: .PP ! 167: Caveat: ! 168: be careful about doing direct SCSI manipulation of a drive ! 169: you are accessing via MSCP. ! 170: The MSCP controllers have strong beliefs that they are the sole master of the drive ! 171: and are sensitive to changes in the state of the drive. ! 172: Unexpected changes are often rewarded by a hung controller, ! 173: cured only by a system reboot. ! 174: .PP ! 175: The command grammar for ! 176: .I scsish ! 177: is available via the ! 178: .CW help ! 179: command; this listing is generated from the ! 180: .I yacc (1) ! 181: grammar and is always correct. ! 182: Before discussing individual commands, we need to absorb some SCSI basics. ! 183: SCSI transactions are between an initiator and a target. ! 184: Both have bus ID's, a number between 0 and 7. ! 185: Typically, the host controller bus ID is 7 and the jukebox is 2. ! 186: The target is considered to have up to 8 logical units, each with a distinct ! 187: Logical Unit Number (LUN). ! 188: These numbers are typically set via DIP switches on the drives used. ! 189: Transactions have a SCSI status; the most common are ! 190: .I good ! 191: (the transaction succeeded), ! 192: .I busy ! 193: (the target did not respond) ! 194: and ! 195: .I check ! 196: (the command failed). ! 197: In the latter, a ! 198: .CW sense ! 199: command can be used to find out why it failed. ! 200: Normally, ! 201: .I scsish ! 202: reports errors rather than retrying. ! 203: (It will retry a few times on receiving a busy.) ! 204: In general, commands only take a LUN (or drive). ! 205: The target bus ID is set by the ! 206: .CW id ! 207: command (it defaults to the jukebox). ! 208: The following is a description of ! 209: .I some ! 210: of the commands. ! 211: An effort has been made to make the output somewhat self-explanatory; ! 212: if in doubt, consult the jukebox manual. ! 213: A basic checkout consists of ! 214: .CW sense~0 , ! 215: .CW config , ! 216: .CW status , ! 217: and perhaps the diagnostics (see the ! 218: .CW internal ! 219: command). ! 220: Some commands accept shortened forms (like ! 221: .CW rel ! 222: for ! 223: .CW release ). ! 224: .de GG ! 225: .IP "\\fB\\$1\\f1" 20n ! 226: .if \w"\\fB\\$1\\f1"-20n \{ ! 227: .br \} ! 228: .. ! 229: .ne 1i ! 230: .GG alternate ! 231: gives the bad block replacement numbers. ! 232: .GG capacity ! 233: gives the capacity of the disk; both the number and size of blocks ! 234: in decimal and hexadecimal. ! 235: .CS ! 236: capacity 0 ! 237: drive 0: capacity 1638000x1024 (18fe70x400) ! 238: .CE ! 239: .GG config ! 240: describes the configuration of your jukebox, controllers, ! 241: and drives. ! 242: It gives the numbers of drives and controllers, their versions (ROM IDs) ! 243: and the type of Unibus controller. ! 244: .CS ! 245: config ! 246: config(2,0): WORM device, ' SONY WDA-3000-10 2.D', 1 controller, 2 drives ! 247: Unibus-SCSI controller=T.D. Systems Viking ! 248: ROMS: upper controller=x2, IF-129=x24, SY-46=x24, SS-30=x24 ! 249: .CE ! 250: .GG copy ! 251: does third party copying between two drives. ! 252: (Third party means the initiator just says go; ! 253: the data only goes between the drives.) ! 254: I have copied an entire side of a disk in this way ! 255: at about 75KB/s independent of host speed.) ! 256: .GG disk~eject~\f4drive ! 257: eject the disk in the given drive. ! 258: .GG disk~release~\f4drive~shelf~side ! 259: release the disk in ! 260: .I drive ! 261: to ! 262: .I shelf . ! 263: The side (specified as ! 264: .CW a ! 265: or ! 266: .CW b ) ! 267: means whether or not to invert the disk on the way to the shelf ! 268: (say ! 269: .CW b ! 270: to invert). ! 271: If the shelf and side are missing, it returns to wherever it came from. ! 272: .CS ! 273: disk rel 0 34 a ! 274: .CE ! 275: .GG disk~set~\f4shelf~side~drive ! 276: the opposite of ! 277: .CW disk~release . ! 278: New disks are loaded from shelf ! 279: .CW 127~a . ! 280: Note that 127 is a virtual shelf; the disks will reside on any shelf ! 281: which hasn't been the destination of a ! 282: .CW disk~release ! 283: command. ! 284: In general, the disk won't be moved to a physical drive until it needs to. ! 285: Thus, to ensure physical loading a disk, you need to follow a ! 286: .CW disk~set ! 287: by (say) a ! 288: .CW start ! 289: command. ! 290: Also, to even the load, logical units alternate between physical drives. ! 291: This is transparent unless one drive has a problem, in which case ! 292: (in a two drive system) the problems will only appear every second time ! 293: you use the disk. ! 294: .GG id~\f4number ! 295: set the target bus ID to ! 296: .I number . ! 297: The jukebox, and default, is 2. ! 298: .GG inquiry~\f4drive ! 299: give a simple status for the the given drive or if no drive is given, all drives. ! 300: .CS ! 301: inq ! 302: drive 2,0: disk,write protect,,,ready (0x9) ! 303: drive 2,1: disk,writable,,,not ready (0x0) ! 304: drive 2,2: no disk,writable,,,not ready (0x40) ! 305: drive 2,3: no disk,writable,,,not ready (0x40) ! 306: drive 2,4: no disk,writable,,,not ready (0x40) ! 307: drive 2,5: no disk,writable,,,not ready (0x40) ! 308: drive 2,6: no disk,writable,,,not ready (0x40) ! 309: drive 2,7: no disk,writable,,,not ready (0x40) ! 310: .CE ! 311: .GG internal~\f4n ! 312: there are several internal diagnostics; the full list is given by ! 313: .CS ! 314: internal ! 315: internal 0: internal command table ! 316: internal 1: error information table ! 317: internal 2: arm controller diagnostics ! 318: internal 3: scsi control board diagnostics ! 319: internal 4: drive controller diagnostics ! 320: internal 5: jukebox status ! 321: .CE ! 322: The arm controller diagnostics take about 4 minutes, ! 323: the drive controller diagnostics take about 100 seconds. ! 324: The others are quite short. ! 325: The drive controller diagnostic needs a LUN. ! 326: .CS ! 327: internal 3 ! 328: scsi control board diagnostics: ! 329: ended normally (time: 7s) ! 330: internal 4 0 ! 331: drive 0[upper]: drive controller diagnostics ! 332: diagnostic result: no faults (time: 97s) ! 333: test 0[drive on/off]: good ! 334: test 1[read disk id]: good ! 335: test 2[move]: good ! 336: test 3[seek]: good ! 337: test 4[blank sector search]: good ! 338: test 5[written sector search]: good ! 339: test 6[search writable area]: good ! 340: test 7[write]: diagnostic could not be done ! 341: test 8[ECC margin check]: diagnostic could not be done ! 342: test 9[read data compare]: diagnostic could not be done ! 343: diagnostic count (drive:avail): 0:199 1:0 2:0 3:0 4:0 5:0 6:0 7:0 ! 344: internal 5 ! 345: jukebox status: component(fatal err/err/cmds) ! 346: upper drive(0/0/38) lower drive(0/0/65) sys control(0/0/115) backup mem(0/4/4454) ! 347: .CE ! 348: The ! 349: .CW internal~4 ! 350: diagnostic requires a LUN with a disk in it. ! 351: .GG media~\f4drive~start~nblocks ! 352: do a media reliability check for the given blocks ! 353: (it does about 200 blocks/sec). ! 354: Prefixing the media command with ! 355: .CW ext ! 356: gives details for every funny block. ! 357: You can also dump the information to a disk file. ! 358: .CS ! 359: media 1 0 1000 ! 360: drive 1: media check for 1000 blocks [0-999], lower drive ! 361: 999 good, 1 unwritten, ! 362: ext media 1 0 1000 ! 363: drive 1: detailed media check for 1000 blocks [0-999], lower drive ! 364: lbn 0: unwritten ! 365: 999 good, 1 unwritten, ! 366: .CE ! 367: .GG read~id~\f4drive ! 368: gives the id as used by the ! 369: .I worm ! 370: commands. ! 371: .CS ! 372: read id 1 ! 373: id='backupdb2a' ! 374: .CE ! 375: .GG reset ! 376: resets the controller. ! 377: The behavior depends on the controller type. ! 378: The T.D. Systems controller resets quickly and reliably. ! 379: The U.S. Design controller causes a SCSI bus reset which resets the jukebox. ! 380: This takes about 90 seconds. ! 381: .GG sense~\f4drive ! 382: gives the sense data for the last operation. ! 383: A prefix of ! 384: .CW ext ! 385: gives the extended sense. ! 386: .CS ! 387: sense 0 ! 388: sa=0x0 mscp=0x0 status=0x0(good) (ext: no sense) ! 389: 70 0 0 0 dd dd dd dd dd dd dd dd dd dd dd dd ! 390: sense 1 ! 391: sa=0x0 mscp=0x0 status=0x0(good) (ext: illegal request) ! 392: 70 0 5 0 dd dd dd dd dd dd dd dd dd dd dd dd ! 393: .CE ! 394: .GG sleep~\f4number ! 395: sleep for ! 396: .I number ! 397: seconds. ! 398: This gives you time to rush to the hardware! ! 399: .GG start~\f4drive ! 400: start the given drive. ! 401: This is necessary before most commands for a disk. ! 402: .GG status ! 403: tells you all sorts of stuff, some of it interesting. ! 404: .CS ! 405: status ! 406: drive 0: ready,disk in LUN,power on,disk in drive 0, return shelf 18a (36) ! 407: drive 1: not ready,no disk in LUN,power on,disk in shelf 0 ! 408: drive 2: not ready,no disk in LUN,power on,disk in shelf 0 ! 409: drive 3: not ready,no disk in LUN,power on,disk in shelf 0 ! 410: drive 4: not ready,no disk in LUN,power on,disk in shelf 0 ! 411: drive 5: not ready,no disk in LUN,power on,disk in shelf 0 ! 412: drive 6: not ready,no disk in LUN,power on,disk in shelf 0 ! 413: drive 7: not ready,no disk in LUN,power on,disk in shelf 0 ! 414: 0: disk, ! 415: 5: disk, ! 416: 6: disk, ! 417: 8: disk, ! 418: 18: no disk ! 419: 21: disk, ! 420: I/O shelf: no disk ! 421: carrier: disk shelf=8a (16) ! 422: upper drive: disk, LUN=0 ! 423: lower drive: no disk ! 424: .CE ! 425: .GG stop~\f4drive ! 426: stop the drive from spinning. ! 427: .GG test~\f4drive ! 428: does a Test Unit Ready. ! 429: It simply returns a good/check answer. ! 430: .SH ! 431: Reliability ! 432: .PP ! 433: My WORM experience covers four pieces of hardware: ! 434: WORM drive, WORM controller, jukebox and the UNIBUS-SCSI controller. ! 435: .PP ! 436: The WORM drives have proved fairly reliable. ! 437: Two of the six drives in our installation have required service. ! 438: One has an intermittent loading problem where the disk being loaded ! 439: is continually inserted and ejected. ! 440: The other was a brand new drive in the jukebox. ! 441: It gave no overt signs of trouble but media quality diagnostics ! 442: done in that drive always gave terrible results. ! 443: The drives in the jukebox can be used by themselves; ! 444: the only difference is a DIP switch setting ! 445: (which regrettably requires taking off the drive's front panel). ! 446: .PP ! 447: The WORM controllers had an early problem with infant mortality ! 448: (two of four were D.O.A.). ! 449: There has been no trouble since then. ! 450: .PP ! 451: The jukebox really has two parts. ! 452: One is the robotics section and the other is a smart controller ! 453: which makes the jukebox look like 8 logical drives ! 454: independent of how many physical drives there are. ! 455: (In fact, SONY measures the time to change disks by mounting two ! 456: disks in a one drive jukebox and then copying from one to another.) ! 457: The controller has worked flawlessly. ! 458: In fact, be warned; ! 459: it has battery backup and remembers where disks were and are! ! 460: The mechanical parts have been pounded on and so far have not had problems. ! 461: All in all, our jukebox experience is limited but positive. ! 462: The maintenance contract on the jukebox is relatively inexpensive. ! 463: .PP ! 464: The UNIBUS-SCSI controller has been the most exasperating piece of the puzzle. ! 465: The first attempt was the Emulex UC13 controller. ! 466: It never really worked quite right and Emulex ! 467: refused to say how a blank check was returned. ! 468: The second attempt was the U.S. Design 1158. ! 469: After four or five months, ! 470: they were able to decide exactly what the switch settings ! 471: were supposed to be and the MSCP emulation worked just fine. ! 472: The SCSI controller (that is, an 1158 acting as a pure SCSI controller) ! 473: seems to work okay (apart from not working in single user mode). ! 474: Unfortunately, the combination of the two controllers ! 475: (necessary for controlling the jukebox) is still flaky. ! 476: The MSCP controller has a tendency to hang and the SCSI controller ! 477: generates stray interrupts. ! 478: .PP ! 479: The third and most successful controller has been the T.D. Systems ! 480: Viking UDD controller. ! 481: This combines both controllers on one quad high board ! 482: (as opposed to two hex high boards for the U.S. Design setup) ! 483: for the same price as one U.S. Design board. ! 484: Despite some unpleasantness from the manufacturer (or more exactly, its president), ! 485: these boards have worked and worked well. ! 486: .SH ! 487: Ordering information ! 488: .PP ! 489: The SONY WORMS and my software are deployed at three sites within Area 112. ! 490: The distinct configurations are listed below; ! 491: the total number of WORM drives is 9. ! 492: .TS ! 493: center; ! 494: c c c ! 495: c a l. ! 496: Site Machine Configuration ! 497: _ ! 498: 1121 8550 1 controller/1 drive ! 499: 1122 11/750 1 controller/1 drive ! 500: 1122 11/750 jukebox (1 controller/1 drive) ! 501: 1127 11/750 1 controller/2 drives ! 502: 1127 11/750 jukebox (1 controller/2 drives) ! 503: .TE ! 504: .PP ! 505: The WORM hardware was purchased from U.S. Design ! 506: because they offered the UNIBUS controller. ! 507: If you want to buy from someone closer than Maryland, call SONY for a list ! 508: of distributers. ! 509: All costs are approximately correct as of mid-1988. ! 510: .TS ! 511: center; ! 512: c c c c ! 513: l a l. ! 514: Part Part # Cost Supplier ! 515: _ ! 516: SONY disk controller WDA-3000 controller $10K U.S. Design ! 517: SONY disk drive WDA-3000 disk drive $12.5K U.S. Design ! 518: SONY jukebox WDA-3000-10 Auto Changer $75K U.S. Design ! 519: 1158 controller B58V-3B $1895 U.S. Design ! 520: T.D. Systems UDD controller Viking UDD controller $1800 Trimarchi ! 521: .TE ! 522: You will need a converter to connect the 50 pin Berg connector on the ! 523: controller boards to the 50 pin D connector on the SONY gear. ! 524: We use ones that came with the U.S. Design controller. ! 525: It is not hard to make your own. ! 526: .TS ! 527: center; ! 528: c s ! 529: a l. ! 530: Phone numbers ! 531: _ ! 532: (201) 930-6030 SONY (Bart Connors) ! 533: (617) 937-9465 T.D. Systems ! 534: (800) 356-6638 Trimarchi Inc (distributor for T.D. Systems in NJ) ! 535: (301) 577-2880 U.S. Design (Harry Garonzik) ! 536: .TE ! 537: .SG ! 538: .sp 2 ! 539: Att. ! 540: .br ! 541: manual pages ! 542: .bp ! 543: worm(1) ! 544: scsi(4)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.