OpenBSD Journal

Major rewrite of Softraid needs testing

Contributed by paul on from the department-of-redundancy-in-software dept.

Marco Peereboom (marco@) has just completed a major step in rewriting the metadata component of the software raid stack in OpenBSD (softraid(4)), and he needs your help to test it sufficiently so it will make the next release.

Update (Sat Jul 12 2008, 18:13:00 CEST): As pointed out by Lawrence Teo (thanks!) Marco has posted a new version of the diff here.

Marco explains the diff:

This is a full rewrite of the metadata code. This change does several things:

1. Eliminate bad checksums being caused by power failures or crashes
2. Unravel metadata code so that we can support multiple formats
3. Clean up name space
4. Merge thib's (thib@) pool diff

The missing portion right now is autoassemble. I'll work on that when this is in good enough shape to go in.

Even though I am not aware of any bugs at this point I suspect that something silly might have snuck in.

So please give it a twirl and let me know how it goes.

Please note: previous versions of metadata are not supported going forward; please back up your data before updating.

The Diff can be found at http://code.freedaemon.com/diffs/metadatarewrite.diff

Thanks to Marco for his continued contributions to OpenBSD. After you have completed the testing, feel free to show your appreciation by making a donation and asking your employers to help too

(Comments are closed)


Comments
  1. Comments
    1. By sthen (2a01:348:108:155:216:41ff:fe53:6a45) on

      > Marco just posted a new diff at:
      >
      >
      >

      it's in the tree now. people already using softraid who upgrade will need to dump+restore.

  2. By foo (88.90.37.49) on

    $ wc -l /usr/src/sys/dev/raidframe/*.[ch]
    ...
       46252 total
    
    $ wc -l /usr/src/sys/dev/softraid*.[ch]
    ...
        4877 total
    
    Not exactly comparable yet with regards to features, but this is definitely a good start. We're talking kernel code here, after all. I just love how the OpenBSD developers throw away things that do work (to some extent) and replace it with something more elegant and simplistic.

    Comments
    1. By Anonymous Coward (2a01:348:108:155:216:41ff:fe53:6a45) on

      > $ wc -l /usr/src/sys/dev/raidframe/*.[ch]
      > 46252 total
      >
      > $ wc -l /usr/src/sys/dev/softraid*.[ch]
      > 4877 total

      You miss something here: softraid presents as a SCSI device, which means it can make use of existing well-tested code in the SCSI layer which raidframe cannot.

      > Not exactly comparable yet with regards to features, but this is definitely a good start.

      If you just want to mirror your disks (and even though raidframe is a whole framework for RAID prototyping, I'm pretty sure the most common reason people want it is so they can mirror their disks), you don't need a whole stack of features. I think there are only really a couple of useful features missing (scrub/rebuild, though you can manually rebuild with "dd", and assembly of a partial RAID set), and you can see that the metadata has to be fixed first.

      softraid already has a few things raidframe doesn't: crypto support, it's in GENERIC, and (this makes it a lot easier to use), it's in bsd.rd for many arch.

      Comments
      1. By Anonymous Coward (76.250.126.209) on

        > You miss something here: softraid presents as a SCSI device, which means it can make use of existing well-tested code in the SCSI layer which raidframe cannot.

        That's not accurate. RaidFrame presents itself as a block device which uses the same well tested code. softraid just sits lower in the stack because I believe it is a more natural fit.

        /marco

Latest Articles

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]