[PATCH] Add metadata writing and hot spare processing to hostraid driver in dmraid
Darrick J. Wong
djwong at us.ibm.com
Sat Mar 4 00:57:20 UTC 2006
Now that dmraid supports Adaptec HostRAID, I've turned my attention to
enabling support for writing metadata back to the disks, and
implementing rudimentary spare handling in RAID1 configurations.
The attached patch (which is admittedly very rough) does two key things.
First, it implements asr_write in a more meaningful manner than what's
in rc10 right now; with that part of the patch, dmraid gains the ability
to reconfigure an array while the system is running and save the changes
out to disk. To do this, I had to change a struct to a pointer to a
struct in asr_reservedblock to to get write_metadata to work properly.
Also, it turns out that a few more things in asr_write had to happen
(and in the correct order) for writes to succeed. If we fail to write
the metadata correctly, the HostRAID BIOS wipes the entire sector during
the next reboot.
The second part of the patch stores spare devices in a dummy .asr_spares
array. When an I/O error is noticed (via event_io), a suitable spare
drive is pulled from the spare pool and inserted into the failing array.
I haven't had a chance to test this code rigorously yet, because the
dmeventd portions of dmraid aren't implemented yet.
So, there are two things that I'd like to see added: online
reconfiguration support in dmraid (which I can now test via asr_write)
and online spare handling. Heinz, are you working on either of these
features, or should I start writing them?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 20726 bytes
Desc: not available
More information about the Ataraid-list