* A simple, generic DM-API, for codecs/transcoders to use?
@ 2009-03-18 8:58 Navid Zamani
2009-06-22 15:08 ` Konrad Rzeszutek
2009-06-22 23:13 ` Wes Felter
0 siblings, 2 replies; 4+ messages in thread
From: Navid Zamani @ 2009-03-18 8:58 UTC (permalink / raw)
To: dm-devel
Hello DM mailing list.
I a have a simple question:
Is there a way to use the device-mapper to hang an arbitrary program
in-between a real block device, and the virtual device created by the
device-mapper?
Like with LUKS. Only that I do not want to compress or encrypt. I want
to hang an error-correcting transcoder in between, so I can put ECC on
any block device I want.
The optimal thing would be a simple API, that is implemented in many
languages. (Like FUSE is available in many languages.)
Something like this would really be a powerful abstraction to have.
In case you are interested in the reasons: Modern consumer HDDs do not
have any ECC, but they get less and less reliable. It went so far, that
I saw random corruption without SMART telling me of any errors. (Of
course I eliminated the software as a cause.) RAID, backups and all that
stuff, does not help. Because this is a consumer case, and frankly, I do
not have the money for a RAID. Backups do not help, because you back up
your corrupt files with everything else, and only notice it, when it’s
too late.
So I decided to put my whole archive on a partititon with software-based
ECC. And because I could not find something that resembled this, I chose
to implement it myself.
I will program it in Haskell, and use cross-interleaved Reed-Solomon
codes (much like those on CDs) as a ECC. Is is a must-have to 1. fix
corruption on read (and re-write the fixed data), 2. report any tiny
problem to the user (log, mail, console message. all at once if
possible), and 3. protect the whole partition (else I would have used FUSE).
I bet there are more people out there who could use something like that.
Most certainly certain government agencies or scientists.
I wonder, what you have to say about this. Is there something like this
out there? Is there a better way? How would I implement it with the
device-mapper.
Navid
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: A simple, generic DM-API, for codecs/transcoders to use?
2009-03-18 8:58 A simple, generic DM-API, for codecs/transcoders to use? Navid Zamani
@ 2009-06-22 15:08 ` Konrad Rzeszutek
2009-06-23 5:30 ` Martin K. Petersen
2009-06-22 23:13 ` Wes Felter
1 sibling, 1 reply; 4+ messages in thread
From: Konrad Rzeszutek @ 2009-06-22 15:08 UTC (permalink / raw)
To: device-mapper development
On Wed, Mar 18, 2009 at 09:58:02AM +0100, Navid Zamani wrote:
> Hello DM mailing list.
>
> I a have a simple question:
> Is there a way to use the device-mapper to hang an arbitrary program
> in-between a real block device, and the virtual device created by the
> device-mapper?
> Like with LUKS. Only that I do not want to compress or encrypt. I want
> to hang an error-correcting transcoder in between, so I can put ECC on
> any block device I want.
> The optimal thing would be a simple API, that is implemented in many
> languages. (Like FUSE is available in many languages.)
> Something like this would really be a powerful abstraction to have.
>
> In case you are interested in the reasons: Modern consumer HDDs do not
> have any ECC, but they get less and less reliable. It went so far, that
I thought that the more recent patches by Oracle to support DIF/DIX (Data
Integrity Extensions):
http://oss.oracle.com/projects/data-integrity/dist/documentation/linux-hba.pdf
Are addressing this by adding a checksum for each block sector that is
checked by each device. So the firmware on the hard-drive, along with
the SAS controller would carry out the checksumming?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: A simple, generic DM-API, for codecs/transcoders to use?
2009-03-18 8:58 A simple, generic DM-API, for codecs/transcoders to use? Navid Zamani
2009-06-22 15:08 ` Konrad Rzeszutek
@ 2009-06-22 23:13 ` Wes Felter
1 sibling, 0 replies; 4+ messages in thread
From: Wes Felter @ 2009-06-22 23:13 UTC (permalink / raw)
To: dm-devel
Navid Zamani wrote:
> Hello DM mailing list.
>
> I a have a simple question:
> Is there a way to use the device-mapper to hang an arbitrary program
> in-between a real block device, and the virtual device created by the
> device-mapper?
http://static.danplanet.com/dm-userspace/
> In case you are interested in the reasons: Modern consumer HDDs do not
> have any ECC, but they get less and less reliable.
I don't think this is correct. All disks use ECC; cheap disks just don't
use strong enough ECC. 4K sectors may fix this in the distant future.
> So I decided to put my whole archive on a partititon with software-based
> ECC. And because I could not find something that resembled this, I chose
> to implement it myself.
Honestly I would use RAID + Btrfs instead of software ECC. But if you're
determined to go down this path, you may want to investigate LDPC
instead of RS.
Wes Felter - wesley@felter.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: A simple, generic DM-API, for codecs/transcoders to use?
2009-06-22 15:08 ` Konrad Rzeszutek
@ 2009-06-23 5:30 ` Martin K. Petersen
0 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2009-06-23 5:30 UTC (permalink / raw)
To: device-mapper development
>>>>> "Konrad" == Konrad Rzeszutek <konrad@virtualiron.com> writes:
Konrad> I thought that the more recent patches by Oracle to support
Konrad> DIF/DIX (Data Integrity Extensions):
Konrad> Are addressing this by adding a checksum for each block sector
Konrad> that is checked by each device.
The DIX/DIF checksum is a CRC, not an ECC. It is mostly aimed at
detecting in-flight corruption, not latent sector corruption. Latent
sector corruption is btrfs territory as far as I'm concerned.
The problem as I see it with the proposed ECC scheme is that once a
drive gives up on a sector you lose all of it. It's not like only a
portion of the sector becomes unreadable to the OS. So the ECC scheme
will have to be quite potent because at the very minimum it must be able
to withstand losing 512 bytes of data. Drives with 4KB sectors are
right around the corner making things even more fun.
Once you start working around sector atomicity issues I think it's only
a matter of time before you end up reinventing RAID and its various
reliability vs. space efficiency trade-offs...
Konrad> So the firmware on the hard-drive, along with the SAS controller
Konrad> would carry out the checksumming?
We'll generate the checksum and the other protection information in the
application if it supports it or otherwise once the I/O gets inside the
kernel. The HBA, the array firmware, and the drive firmware are all
able to verify that the protection information matches the data.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-06-23 5:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-18 8:58 A simple, generic DM-API, for codecs/transcoders to use? Navid Zamani
2009-06-22 15:08 ` Konrad Rzeszutek
2009-06-23 5:30 ` Martin K. Petersen
2009-06-22 23:13 ` Wes Felter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.