The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: bakul@bitblocks.com (Bakul Shah)
Subject: [TUHS] Disk data layout (was: /dev/drum)
Date: Wed, 25 Apr 2018 14:55:29 -0700	[thread overview]
Message-ID: <E3553ABD-DABC-4C8E-B4C8-61044408D288@bitblocks.com> (raw)
In-Reply-To: <CABH=_VRWFy7wESGkTNLnZTWmyc3XR0zDKG4hS1TzZfqT6j8YPg@mail.gmail.com>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1309 bytes --]

@Fortune Systems we kept a forwarding map of bad blocks. This was
stored in a file at inode#1 IIRC. To read/write block n you check if n was in
the list. If not, you read/write disk block n. Else you use the mapped block.
The last N blocks were reserved for this. Actually we had to keep some
state. A block that gave an error on read was marked bad so that further
reads errored out. But a write to such a block would allocate a new block and
add an entry in the bad block forwarding map. Further read/writes would then
Go to this block. I also kept soft (correctable) error stats. These blocks were
more likely to go bad so periodically a background task would preemptively
forward these blocks. To test this logic I used to build the v7 kernel on a very unreliable disk! But this slowed things down a lot - having to seek to the end
zone and then back for the next block. I think in later disk drives an extra block
per track was reserved for this and the drive took care of this.

It would’ve made more sense to avoid this forwarding by exposing bad blocks
to the file system layer so that it can avoid allocating them but this would’ve
complicated the interface.

> On Apr 25, 2018, at 2:17 PM, Paul Winalski <paul.winalski at gmail.com> wrote:
> 
> How does/did Unix handle bad block replacement?



  reply	other threads:[~2018-04-25 21:55 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-20 15:02 [TUHS] /dev/drum Tim Bradshaw
2018-04-20 15:58 ` Clem Cole
2018-04-20 16:00 ` David Collantes
2018-04-20 16:12   ` Dan Cross
2018-04-20 16:21     ` Clem Cole
2018-04-20 16:33     ` Warner Losh
2018-04-20 19:17       ` Ron Natalie
2018-04-20 20:23         ` Clem Cole
2018-04-20 22:10         ` Dave Horsfall
2018-04-22 17:01     ` Lars Brinkhoff
2018-04-22 17:37       ` Clem Cole
2018-04-22 19:14         ` Bakul Shah
2018-04-22 20:58         ` Mutiny
2018-04-22 22:37           ` Clem cole
2018-04-22 21:51         ` Dave Horsfall
2018-04-25  1:27           ` Dan Stromberg
2018-04-25 12:18             ` Ronald Natalie
2018-04-25 13:39               ` Tim Bradshaw
2018-04-25 14:02                 ` arnold
2018-04-25 14:59                   ` tfb
2018-04-25 14:33               ` Ian Zimmerman
2018-04-25 14:46                 ` Larry McVoy
2018-04-25 15:03                   ` ron minnich
2018-04-25 20:29               ` Paul Winalski
2018-04-25 20:45                 ` Larry McVoy
2018-04-25 21:14                   ` Lawrence Stewart
2018-04-25 21:30                     ` ron minnich
2018-04-25 23:01                 ` Bakul Shah
2018-04-23 16:42         ` Tim Bradshaw
2018-04-23 17:30           ` Ron Natalie
2018-04-23 17:51             ` Clem Cole
2018-04-23 18:30               ` Ron Natalie
2018-04-25 14:02                 ` Tom Ivar Helbekkmo
2018-04-25 14:38                   ` Clem Cole
2018-04-23 20:47               ` Grant Taylor
2018-04-23 21:06                 ` Clem Cole
2018-04-23 21:14                   ` Dan Mick
2018-04-23 21:27                     ` Clem Cole
2018-04-24  3:28                       ` [TUHS] 3330s, 3340s, Winchesters... (was: /dev/drum) Greg 'groggy' Lehey
2018-04-24 11:43                         ` Paul Winalski
2018-04-24 13:13                           ` Clem Cole
2018-04-25  0:52                             ` Greg 'groggy' Lehey
2018-04-25 20:54                               ` Paul Winalski
2018-04-23 22:07                 ` [TUHS] /dev/drum Tim Bradshaw
2018-04-23 22:15                   ` Warner Losh
2018-04-23 23:30                     ` Grant Taylor
2018-04-24  9:37                       ` Michael Kjörling
2018-04-24  9:57                         ` Dave Horsfall
2018-04-24 13:01                           ` Nemo
2018-04-24 13:03                         ` Arthur Krewat
2018-04-25  1:31                       ` [TUHS] Disk data layout (was: /dev/drum) Greg 'groggy' Lehey
2018-04-25  6:43                         ` Hellwig Geisse
2018-04-25 21:17                         ` Paul Winalski
2018-04-25 21:55                           ` Bakul Shah [this message]
2018-04-27 15:47                           ` Dave Horsfall
2018-04-27 18:16                             ` Paul Winalski
2018-04-27 18:37                               ` Clem Cole
2018-04-23 23:45                   ` [TUHS] /dev/drum Arthur Krewat
2018-04-24  8:05                     ` tfb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E3553ABD-DABC-4C8E-B4C8-61044408D288@bitblocks.com \
    --to=bakul@bitblocks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).