linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Horsten <thomas@horsten.com>
To: linux-raid@vger.kernel.org
Subject: Driver for BIOS-based software RAIDs
Date: Mon, 13 Oct 2003 19:21:45 +0100	[thread overview]
Message-ID: <200310131921.45824.thomas@horsten.com> (raw)

Hi,

I've written a driver for the Medley software RAID using the ATARAID framework 
in 2.4 kernels (http://www.infowares.com/linux).

Now, I'm looking into writing a better driver that can also be used with 2.6. 
My thoughts are along the lines of using the MD driver infrastructure and 
adding support for "foreign" RAID superblocks (and possibly personalities).

For the Medley RAID this could be quite an elegant solution, as the Medley 
modes are identical to MD's RAID0 and RAID1 and modes (and the RAID10 mode 
identical to a RAID0 embedded in a RAID1 array).

Now, the problem is that these BIOS based software RAID's all use whole disks 
as opposed to individual partitions like the Linux MD driver.

My idea was to either reserve a new major for "md_wholedisk" mode and split it 
into drive,partition blocks of 16/32 inodes each, like the gendisk driver 
supports, or alternatively split the existing major with, say, the first 64 
minors for normal style MD devs and the upper part split like I suggested 
above (I'm not sure if this would work with gendisk though).

Another way of doing it would be to create a separate native MD RAID for each 
partition on the BIOS RAID, but this has the major drawback that the user 
wouldn't be able to repartition the device.

Brief outline of how this would work:

1) User selects CONFIG_MD_FOREIGN_SUPERBLOCKS and CONFIG_MD_WHOLEDISK_RAID, 
along with one oif the BIOS specific drivers like CONFIG_MD_FOREIGN_MEDLEY. 
Each BIOS driver has its own superblock type.

2a) If compiled into the kernel, a hook in the partition parser will first 
pass each drive to the RAID handler, before attempting to parse the partition 
table. RAID handler will call each FOREIGN_driver in turn to see if there is 
a matching RAID superblock. If there is, it will be added as a partial RAID 
and the partition checker will not try to parse the partition table (which 
will be invalid if the drive is part of a RAID).

2b) If the foreign RAID drivers are compiled as modules, upon loading they 
will walk all genhds (or devices they will support), and detect any custom 
superblocks. The drivers will then use a new hook in the genhd code to zero 
out any partitions on that device.

3) The foreign RAID driver creates mddev_s based on its detection. If 
necessary, the foreign RAID driver can also create its own personalities 
(like the special type of RAID0 that Highpoint devices use, that supports 
having a RAID0 where all disks are not of equal size, without wasting space).

Any comments and ideas so far? Is this approach viable?

Thanks :)

Regards,

Thomas


             reply	other threads:[~2003-10-13 18:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-13 18:21 Thomas Horsten [this message]
2003-10-13 18:31 ` Driver for BIOS-based software RAIDs Kevin P. Fleming
2003-10-13 19:19   ` Thomas Horsten
2003-10-13 19:03 ` Lars Marowsky-Bree
2003-10-13 19:25   ` Thomas Horsten
2003-10-13 21:17     ` Lars Marowsky-Bree
2003-10-13 21:38       ` Thomas Horsten
2003-10-14  7:18         ` Lars Marowsky-Bree

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200310131921.45824.thomas@horsten.com \
    --to=thomas@horsten.com \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).