Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] defect management block device
Date: Tue, 25 Mar 2008 08:57:56
Message-Id: 200803251056.44193.alan.mckinnon@gmail.com
In Reply to: Re: [gentoo-user] defect management block device by Enrico Weigelt
1 On Tuesday 25 March 2008, Enrico Weigelt wrote:
2 > * Alan McKinnon <alan.mckinnon@×××××.com> wrote:
3 > > If SMART (or something conceptually similar) detects that a drive
4 > > might be failing and be beyond the range of the drive's ability to
5 > > cope, it could raise an event and move the blocks used to another
6 > > disk.
7 >
8 > And it even would get funnier if the drive's relocation table
9 > could be accessed (no idea if this is possible):
10 > The LVM would notice if the drive has relocated an (LBA) block,
11 > move it out of the way (somewhere else in the LV) and then
12 > remove the relocation (never access that LBA block anymore).
13 > This way an slowly dying disk can be used for quite a long time.
14 > Think of boxes with very limited physical access (eg. outoor field
15 > systems) or huge archives w/ non-critical/regeneratable data
16 > (eg. media collections w/ originals available, mirrors, etc).
17 >
18 > The idea of using even old and damaged disks at really low costs
19 > (not counting the power consumption ;-P) is seems quite fascinating
20 > to me :)
21
22 The tricky part is to figure out where a concept like this fits in the
23 various abstraction layers. You couldn't build it into LVM, as LVM
24 doesn't really know about individual blocks on the disk, it only works
25 with it's own segments. The disk driver itself only really understands
26 it's own IDE/SCSI commands and manipulates the data at the sector
27 level. The file system can work at the block level.
28
29 So there are at least 3 different allocation unit sizes and no obvious
30 way to write one driver that spans all three. The one idea that keeps
31 coming back to me is a new function in the kernel where a driver for a
32 physical storage device can fire an event if it detects a failing unit,
33 and other drivers can register to receive those events. When it gets
34 one, the high level driver can decide if it should move it's own blocks
35 of data around. In a way, conceptually similar to a GUI event
36 framework.
37
38 Could be very useful to a niche market - Linux already has 1000s of
39 those :-) - but would require very careful design to not break
40 everything else in the system
41 --
42 Alan McKinnon
43 alan dot mckinnon at gmail dot com
44
45 --
46 gentoo-user@l.g.o mailing list