home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / wizards / 3785 < prev    next >
Encoding:
Internet Message Format  |  1992-09-03  |  3.0 KB

  1. Path: sparky!uunet!olivea!decwrl!pa.dec.com!nntpd2.cxo.dec.com!nabeth!alan
  2. From: alan@nabeth.enet.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.)
  3. Newsgroups: comp.unix.wizards
  4. Subject: Re: Disk bad block
  5. Message-ID: <1992Sep3.230616.24058@nntpd2.cxo.dec.com>
  6. Date: 3 Sep 92 23:06:16 GMT
  7. References: <1992Sep2.191247.1253@tamsun.tamu.edu>
  8. Sender: alan@nabeth (Alan Rollow - Alan's Home for Wayward Tumbleweeds.)
  9. Reply-To: alan@nabeth.enet.dec.com (Alan Rollow - Alan's Home for Wayward Tumbleweeds.)
  10. Distribution: usa
  11. Organization: Digital Equipment Corporation
  12. Lines: 61
  13.  
  14.  
  15. In article <1992Sep2.191247.1253@tamsun.tamu.edu>, pnarayan@cs.tamu.edu (P S Narayan) writes:
  16. >
  17. >Hello,
  18. >Could any one tell me how does the file manager in the Unix File System
  19. >detect a bad block and keep a track of it so that it is never allocated
  20. >to any file. What is badness in a block ?
  21. >I imagine the bad block list  is kept in the zeroth block of the  filesystem.
  22. >
  23. As Dave Olson mentioned, it depends.
  24.  
  25. Some possible answers:
  26.  
  27. 1.  Some UNIX systems will expect perfect media and not cope with
  28.     bad blocks at all.  If you happen to have an underlying I/O
  29.     that does cope well with them this might be alright.  Unless
  30.     the subsystem expect help from the operating system.
  31.  
  32. 2.  Others acknowledge that bad blocks occur, but know they have
  33.     I/O subsystems that will take care of them.  They are willing
  34.     to help the I/O subsystem perform this task.
  35.  
  36. 3.  Other make no assumption that the subsystem is going to do
  37.     anything interest and take care of themselves.  The methods
  38.     probably vary from a "bad block file" that has the bad
  39.     blocks allocated to it, to systems that hide real disk
  40.     under a layer that maps out the bad blocks.  All you ever
  41.     see is the perfect surface presented by this layer.
  42.  
  43. On the nature "badness" in a block.
  44.  
  45. To various degrees the disks you're using have error detection
  46. (and correction) codes stored with the data on the disk.  When
  47. it reads a block it compares runs the data through whatever
  48. firmware or hardware that calculates the error detection code
  49. to see if they match.  If not the block is consider bad.
  50.  
  51. If the disk or controller supports error correction it will
  52. try to fix the error.  Way down in the operating system it may
  53. present this state as "Data corrected, but it was X badly broken".
  54. The host may then be responsible for telling the controller what
  55. do with the block; replace it and write the still good data back
  56. to the new block.  The controller may decide to do this itself.
  57. and will just tell the host "here's a good copy.  I fixed it."
  58.  
  59. Sometimes it won't be able to correct the data and still reports
  60. a bad block.  The controller may still go off and replace the bad
  61. block, writting the bad data to a now good block.  Unfortunately
  62. it may not have any way to differentiate between a bad block
  63. and a good block with known corrupt data.  What the host does
  64. in these cases depends on how paranoid they are about data
  65. reliability.
  66.   
  67. >Regards
  68. >Narayan
  69. >pnarayan@cs.tamu.edu
  70. >Texas A&M University
  71. >
  72. >
  73. --
  74. Alan Rollow                alan@nabeth.cxo.dec.com
  75.