home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / bsd / 4055 < prev    next >
Encoding:
Internet Message Format  |  1992-08-12  |  4.5 KB

  1. Path: sparky!uunet!usc!rpi!batcomputer!munnari.oz.au!asgard!mjj
  2. From: mjj@mlb.dmt.csiro.au (Murray Jensen)
  3. Newsgroups: comp.unix.bsd
  4. Subject: Re: 2nd drive file ... (Actually wd ESDI problems)
  5. Summary: bad144 area plus possible multi-sector read problem
  6. Message-ID: <193@asgard.mlb.dmt.csiro.au>
  7. Date: 12 Aug 92 14:45:15 GMT
  8. References: <Bsp5D6.B9p@obiwan.uucp> <165f2uINN6an@disaster.Germany.EU.net> <tih.713450893@barsoom>
  9. Organization: CSIRO Division of Manufacturing Technology, Melbourne, Australia
  10. Lines: 74
  11.  
  12. tih@barsoom.nhh.no (Tom Ivar Helbekkmo):
  13. > bs@Germany.EU.net (Bernard Steiner) writes:
  14. >>I noticed that with my ESDI drives I had to give disklabel one cylinder less
  15. >>than what the physical drive parameters are...
  16. > I thought of this too, but I've tried reducing the number of available
  17. > cylinders to about a fourth of the real number with no improvement...
  18.  
  19. The area bad144 uses is at the end of *partition C*. It is supposed to use
  20. only the last track + 126 sectors, but since you usually want filesystems
  21. to be whole numbers of cylinders you might as well leave the whole last
  22. cylinder free. The distributed disktab says you should leave 5 cylinders
  23. for bad sector stuff, but after looking at this a bit I decided it was
  24. wrong - can someone who knows for sure please comment?
  25.  
  26. In any case, the important thing is that it is at the end of partition C,
  27. whatever part of the disk that may cover - with DOS partitioning, it won't
  28. be the entire disk. The way you leave space for bad144 is to not have any
  29. of the A, B, E, F, G & H partitions cover that last cylinder (or last 5
  30. cylinders) of partition C. This means of course that you can't put a
  31. filesystem on partition C if you are using bad144. Think of it like this:
  32. partition C *contains* partitions A, B, E, F, G, H *and* the bad144 area,
  33. none of which should overlap if they exist.
  34.  
  35. A couple of notes - partition D *always* covers the entire physical disk
  36. and all sector offsets in the disktab entry and disk label are relative
  37. to sector zero of the physical disk. This becomes very important if you
  38. are using DOS partitioning. Let me illustrate this with an example - I
  39. have a 140Mb Micropolis 1355 ESDI drive with the first 40Mb for DOS and
  40. the rest (100Mb) for 386BSD. Disk geometry is 1021 cylinders, 8 heads and
  41. 35 sectors/track:
  42.  
  43.           size    offset    cylinders
  44.     A:     10360     80640     288- 324
  45.     B:     30800     91000   325- 434
  46.     C:    205240     80640     288-1020
  47.     D:    285880         0       0-1020
  48.     E:     80080       560       2- 287
  49.     H:    163800    121800     435-1019
  50.  
  51. The DOS partitions are set up such that the DOS5 partition covers cylinders
  52. 2-287 and the 386BSD partition covers cylinders 288-1020 (I had a bad sector
  53. in cylinder 0 or 1 so DOS had to start its partition at cylinder 2). I have
  54. set partition E up to cover the DOS area, and I should be able to use mtools
  55. on it to access my DOS files although I haven't tried it yet.
  56.  
  57. Now on to my problem: someone posted about using dd on the block device to
  58. find out where the bad sectors are. I did this, added them to the bad144
  59. table and dd would then run through without errors. (Trick - use the
  60. following: "dd if=/dev/wd0c of=/dev/null bs=512 conv=sync,noerror" and you
  61. will get all the bad blocks in one hit - though I think read-ahead may cause
  62. each bad block to be reported multiple times with incrementing numbers - just
  63. ignore all but the first bad block in a sequence and rerun it to be sure)
  64.  
  65. However, fsck would still fail - quite badly too - obviously because there
  66. were still bad sectors on the disk. But I had not got any errors from dd on
  67. the block device, so I tried fsck on the block device and it ran through
  68. perfectly!
  69.  
  70. My guess is that the BSD filesystem sector clustering code, which groups
  71. sectors together to form larger "logical blocks" (I was using 4096 byte
  72. logical blocks i.e. 8 sectors, in my filesystems - other people use 8192)
  73. is somehow avoiding the bad144 bad sector forwarding mechanism when it
  74. does the multiple sector read (or write). I am in a catch-22 situation
  75. here - I can't fix it until I fix it! So I am hoping that someone else
  76. has already run into (and fixed) this. Can anyone help me with this?
  77.                             Murray...
  78. PS: In case it matters: 386SX/25, 8Mb RAM, Mega EVA/2 (ET4000) VGA,
  79. Micropolis 1355 on Ultrastor Ultra-12F controller (no sector slipping,
  80. DOS can't handle it), QIC02 60Mb cartridge tape, 4 serial, 2 parallel,
  81. Adlib sound card, 1.44 & 1.2 Mb floppies.
  82. -- 
  83. Murray Jensen, CSIRO Div of Manufacturing Tech,     Phone: +61 3 487 9263
  84. Locked Bag No. 9, Preston, Vic, 3072, Australia.      Fax: +61 3 484 0878
  85. Internet: mjj@mlb.dmt.csiro.au               ACSnet: mjj@asgard.dmt.oz
  86.