Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757312AbYKWANr (ORCPT ); Sat, 22 Nov 2008 19:13:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754352AbYKWANi (ORCPT ); Sat, 22 Nov 2008 19:13:38 -0500 Received: from yw-out-2324.google.com ([74.125.46.31]:28728 "EHLO yw-out-2324.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753724AbYKWANh (ORCPT ); Sat, 22 Nov 2008 19:13:37 -0500 Message-ID: Date: Sat, 22 Nov 2008 18:13:35 -0600 From: "Jon Nelson" To: "Justin Piszcz" Subject: Re: Why does the md/raid subsystem does not remap bad sectors in a raid array? Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1442 Lines: 36 There are a few reasons but my guess is this: md tries to use the entire available storage (of the smallest element) in a given set of devices, which means there is no room for remappery. However, if MD could be told to set aside some percentage of this value, or some fixed amount (like, say, 10MB) then the *possibility* of remapping blocks becomes possible. However, to add this functionality one would have to consider the following: 1. how much to set aside? 2. where? beginning, end, middle, staggered in chunks? 3. how to tell MD that block A maps to block B on device C? Should it be done as an exception list (all blocks not in list X refer to their actual block, otherwise they refer to a redirected block)? or as a direct map (or something else)? Perhaps an alternative would be to add a new block layer which takes an existing block device X and exposes a new, automatic block remapper-y block device Y (bad reads might continue to return errors but writes to a previous bad read might go to a new block and so would subsequent reads) and so on. Perhaps the easiest way to test this would be to hack NBD or AoE and build a raid out of such devices. Just ramblin' here. -- Jon -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/