Thinking about student projects to advise; I'm an OK C develepor and C++ developer/architect. Not done much Linux kernel development beyond "write your first module".
The thing I want to rudimentarily implement (before advising students doing it properly as a team project) is:
- Take existing block device, say
/dev/sda
- add second block device, say
/dev/fec0
, which implements wrapper around first, providing error-correction onread
and writing data + error coding information onwrite
This implies that the size of fec0 is smaller than that of sda. Also, note that this is somewhat different to the RAID5 approach, as there's no split of parity data to secondary data groups or similar.
Now, I'm trying to get an overview of how to do this. It's clear that it will be necessary, aside from implementing the block device interface itself, to implement a control interface to define things like "use /dev/sda
to create fec0
", "shut down fec0
".
The questions that arise are:
- Is there a preferred framework to integrate this into? Goal is finding the sensible place to put this. To mind come:
- dmraid and
- lvm2, or
- just a plain block device driver
- How to implement control interfacing?
- Specific
ioctl
s? /sys/*
pseudofile interface?- framework-specific ways?
- Specific