Re: Linux RAID metadata format docs?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday November 14, jgarzik@pobox.com wrote:
> Do any docs exist, that describe the on-disk md format?

Not to my knowledge, beyond source code.

> 
> I'm talking with a vendor that would like to support booting off of 
> "Linux RAID" (as they call it), from their card's BIOS, which implies
> the vendor would need to add support for the md format to their BIOS.

I don't see that knowledge of the RAID format is needed by the bios.

It might be needed by the boot sector, and certainly by the next stage
(whether that be the kernel itself, or grub or whatever).

Based on my limited understanding, the bios should only need:
  1/ to be able to try subsequent drives if the first fails,
  2/ be able to tell the boot sector which drive was used
  3/ to allow the boot sector to indicate failure
 and maybe
  4/ be able to have a dynamically determined boot order
   (so that when one drive fails, it gets put to the bottom of the 
    list).

Clearly 1,2,3 don't need the bios to know anything about RAID layout.  4
could use raid layout information, and an easy interface for the
kernel to tell it when things have changed would be a lot easier and
more general.

I think the simplest approach would be:

 Bios attempts each potential boot device in some order, loading the
 boot sector and telling the boot sector that the device is "0x80".
 If the boot sector fails (e.g. bad code, such as all zeros), it tries
 the next.

 The boot sector tries to load a kernel or second-stage off "0x80" as
 normal.   The kernel or second-stage understands raid and makes sure
 the correct root is assembled.

 Some daemon monitors drives that fail, and attempts to over-write
 sector 0 of any such drive that is a boot-candidate.

This wouldn't quite do the right thing if:
  The "first" drive goes off line for some reason.
  A new kernel/second-stage is installed on remaining drive(s).
  machine is rebooted and "first" drive comes back online during the
  boot.

The "first" drive will look OK, but will not have a current kernel on
it.

Does any of this make sense?

Were you thinking of some RAID level other than RAID1?

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux