OpenBSD Journal

RAID0 in softraid(4)

Contributed by dwc on from the disciplinary dept.

Johan M:son Lindman writes:

Marco Peereboom (marco@) has committed RAID0 support to softraid(4). This means that softraid is now capable of doing RAID0 and RAID1. As always when a new feature is committed it is greatly appreciated if users test the code. One way of doing so is to use the tool iogen which is available through ports or packages.

So please update your system to current and help test RAID0.

Marco has published a todo-list for softraid in order to emphasize on the yet missing features. This way you have the possibility to help develop missing features.

The following is an example of what a large RAID0 array can look like:


  sd19 at scsibus5 targ 0 lun 0:  SCSI20/direct fixed
  sd19: 2622604MB, 41219 cyl, 511 head, 255 sec, 512 bytes/sec, 5371093223 sec total

# df -h
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/sd0a     1008M   46.0M    912M     5%    /
/dev/sd0e     1008M    6.0K    958M     0%    /tmp
/dev/sd0d      3.9G    497M    3.3G    13%    /usr
/dev/sd0f      2.0G    6.5M    1.9G     0%    /var
/dev/sd19a     2.4T    1.3T    976G    59%    /mnt

# bioctl -h sd19
Volume  Status               Size Device
softraid0 1 Online               2.5T sd19    RAID0
       0 Online               279G 1:0.0   noencl 
       1 Online               279G 1:1.0   noencl 
       2 Online               279G 1:2.0   noencl 
       3 Online               279G 1:3.0   noencl 
       4 Online               279G 1:4.0   noencl 
       5 Online               279G 1:5.0   noencl 
       6 Online               279G 1:6.0   noencl 
       7 Online               279G 1:7.0   noencl 
       8 Online               233G 1:8.0   noencl 
       9 Online               233G 1:9.0   noencl 

(Comments are closed)


  1. By Brian () on

    Is this intended to eventually be usable for mirroring root partitions?

    1. By Lennie () leen@wirehub.nl on

      > Is this intended to eventually be usable for mirroring root partitions?

      Raid 0 is not mirroring, it's striping. So I have my doubts.

      1. By Anonymous Coward () on

        > > Is this intended to eventually be usable for mirroring root partitions?
        >
        > Raid 0 is not mirroring, it's striping. So I have my doubts.
        >

        From the post above:

        "This means that softraid is now capable of doing RAID0 and RAID1."

        That says RAID1 too, so I think the question is still relevant.

        And great work! Can't wait to test it and get rid of RAIDFRAME!

      2. By e4ea () on

        > Raid 0 is not mirroring, it's striping. So I have my doubts.
        >
        I have read the man page and this thread, but for me it is still not clear what is ment by striping.

        Could someone explain in a few lines what is ment by striping and what the functionality of RAID0 is?

        Thanks,
        Jan

        1. By Anonymous Coward () on

          http://en.wikipedia.org/wiki/Redundant_array_of_independent_disks

          1. By e4ea () on

            > http://en.wikipedia.org/wiki/Redundant_array_of_independent_disks

            Thanks, this was very helpfull ;-)

      3. By Brian () on

        > > Is this intended to eventually be usable for mirroring root partitions?
        >
        > Raid 0 is not mirroring, it's striping. So I have my doubts.
        >

        Yes, I was referring to softraid in general, with its RAID 1 support, not the RAID 0.

    2. By Martin Toft () mt@martintoft.dk on

      > Is this intended to eventually be usable for mirroring root partitions?

      I have no problem mirroring my root partition using raidframe. You just need a small partition outside your raid with the second-stage boot program and the kernel:

      $ mount | grep wd0a
      /dev/wd0a on /mnt type ffs (local)
      $ ls -l
      total 13048
      -rw-r--r-- 1 root wheel 43060 Oct 24 22:33 boot
      -rwxr-xr-x 1 root wheel 6617017 Nov 2 23:33 bsd*

      Remember to have an equivalent partition on your other disk, i.e. /dev/wd1a. These two partitions must be kept in sync manually. Use /usr/mdec/installboot to make the disks bootable (see installboot(8)). You will need to configure your raid with "raidctl -A root" to make it auto-configurable and eligible to contain the root partition (see raidctl(8)). Good luck! :-)

      1. By Anonymous Coward () on

        you can do this with softraid too

      2. By Brad () brad at comstyle dot com on

        > I have no problem mirroring my root partition using raidframe. You just need a small partition outside your raid with the second-stage boot program and the kernel:

        RAIDframe will be removed in good time.

        1. By Frank DENIS () on http://00f.net

          > > I have no problem mirroring my root partition using raidframe. You just need a small partition outside your raid with the second-stage boot program and the kernel:
          >
          > RAIDframe will be removed in good time.

          What does it mean for raidframe users? Will softraid be a drop-in replacement?

          1. By henning () on

            > > > I have no problem mirroring my root partition using raidframe. You just need a small partition outside your raid with the second-stage boot program and the kernel:
            > >
            > > RAIDframe will be removed in good time.
            >
            > What does it mean for raidframe users? Will softraid be a drop-in replacement?

            no.
            you know, there is a reason raidframe was never enabled in generic...

            1. By Anonymous Coward () on

              > > > > I have no problem mirroring my root partition using raidframe. You just need a small partition outside your raid with the second-stage boot program and the kernel:
              > > >
              > > > RAIDframe will be removed in good time.
              > >
              > > What does it mean for raidframe users? Will softraid be a drop-in replacement?
              >
              > no.
              > you know, there is a reason raidframe was never enabled in generic...

              Lack of space?!

              Seriously: I personly don't know why it wasn't enabled but if you tell me that softraid works better (quicker?) and is even smaler I'll be happy anyway.

              But why was raidframe never enabled by default? (no bitching, I realy don't know this)

              1. By tedu () on

                >
                > But why was raidframe never enabled by default? (no bitching, I realy don't know this)

                because nobody wanted to really have to support it.

              2. By Anonymous Coward () on

                RAIDFrame is a bit of a monstrosity. It is very hard to read and maintain. Classical academic code that is supposed to do a lot more than practical. On the other hand softraid(4) is not 100% done. Use it wisely.

              3. By Anonymous Coward () on

                > > you know, there is a reason raidframe was never enabled in generic...
                >
                > Lack of space?!
                >
                > Seriously: I personly don't know why it wasn't enabled but if you tell me that softraid works better (quicker?) and is even smaler I'll be happy anyway.
                >
                > But why was raidframe never enabled by default? (no bitching, I realy don't know this)

                IIRC, there also was a licensing issue about redistributing any kernel that had raidframe enabled.

    3. By Igor Sobrado () sobrado@ on

      > Is this intended to eventually be usable for mirroring root partitions?

      If you just want to back up your root partition, an alternative approach (perhaps more simple) may be making an /altroot filesystem of the same size as root, mount it "xx" in /etc/fstab and set ROOTBACKUP to 1. Look for the ROOTBACKUP string in /etc/daily if you are interested in details.

      Cheers,
      Igor.

  2. By Anonymous Coward () on

    I don't use any forms of software RAID, but what's the differences or advantages of this over say ccd and/or RAIDFrame (assuming later on when it does RAID levels).

    Don't get me wrong, I'm glad to see things like this in OpenBSD, looks very good so far.

  3. By Bayu Krisna () krisna@versalite.com on http://www.InfoBSD.org

    Thanks to OpenBSD Developer Team.

    Look at what OpenBSD Developer do, they doing something and walking to OpenEnterprise Solution.

    Nice..

    1. By Anonymous Coward () on

      > Thanks to OpenBSD Developer Team.
      >
      > Look at what OpenBSD Developer do, they doing something and walking to OpenEnterprise Solution.
      >
      > Nice..

      What?

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.]