linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Wilck <mwilck@arcor.de>
To: linux-raid@vger.kernel.org
Subject: Re: How does md(adm) work with fake-raid ?
Date: Fri, 19 Jul 2013 00:03:50 +0200	[thread overview]
Message-ID: <51E86646.8020107@arcor.de> (raw)
In-Reply-To: <CAC9WiBjU_A0jsB4KoX4B9ohT4TD3cYuDdioM6hSWfK13Otjs-Q@mail.gmail.com>

On 07/18/2013 10:37 PM, Francis Moreau wrote:
> Hello,
> 
> Sorry if the question is stupid but I'm a rookie in md things, but I'd
> like to understand the big picture here.
> 
> I've been told to use mdadm whenever possible even if my raid is
> handled by the bios (fake raid) which use the ddf metadata format.
> (unfortunately it seems that I can't desactive this fake raid in
> favour of linux soft raid). It's RAID1 BTW.
> 
> So my question is rather simple: in my understanding the bios is doing
> the mirroring, but when setting up the md device, linux (kernel or
> userspace, I don't really know) also handles the mirroring for RAID1
> personnality. Is Linux clever enough to see that the mirroring is done
> by the bios in my case ?
> 
> Could anybody teach me the big picture ?

Fake RAID uses a part of every disk to record information about the RAID
arrays. This is called meta data, and your BIOS uses it for setting up
the drives.

Under Linux, first you need a low level SATA or SAS driver that detects
your physical drives, e.g. the ahci driver.

md can then detect the DDF meta data on your disk just like the BIOS,
assemble the array(s), mirror the data, and do other RAID operations.

Distributions can set this up automatically. Currently most distros
don't do this for DDF (they do it only for fake RAID using the Intel
Matrix (IMSM) format). For DDF, for historical reasons, most
distributions will setup a mapping using dmraid (device mapper based
mirroring). That will also basically work, but it isn't a
fully-functional RAID implementation such as MD. The magic to set up
either MD or dmraid automatically as disks are detected is hidden in the
distro's udev rules, and possibly in the distro's installer logic.

The DDF functionality in mdadm is not quite as complete as for other
meta data formats, in particular IMSM. I am currently working on
improving it, because I want to use just a similar fake RAID under Linux
as you, and fully benefit from MD's feature set.

Before doing real work with DDF on your system, make sure that the BIOS
still detects your drives correctly after MD/DDF has written its meta
data (this happens when an array is shut down, for example).
There is a small but non-zero risk that the BIOS may reject the
configuration as written by MD. The same may happen e.g. for a Windows
fake RAID driver.

If you experience any problems, be sure to report them here.

DDF metadata is always at the end of the disks. Thus you can save your
configuration by backing up the last sectors. The size of the meta data
is at least 32MB but may be larger depending on the BIOS implementation.

Hope this helps.
Martin

> 
> Thanks a lot.
> --
> Francis
> --
> 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


  reply	other threads:[~2013-07-18 22:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-18 20:37 How does md(adm) work with fake-raid ? Francis Moreau
2013-07-18 22:03 ` Martin Wilck [this message]
2013-07-18 23:35   ` Dmitrijs Ledkovs
2013-07-19 15:58     ` Jiang, Dave
2013-07-19 18:58     ` Martin Wilck
     [not found] ` <51E85949.2020107@gmail.com>
2013-07-19  7:02   ` Francis Moreau
     [not found] ` <51E86613.9050505@arcor.de>
2013-07-19  7:08   ` Francis Moreau
2013-07-19 18:52     ` Martin Wilck
2013-07-21 13:41       ` Francis Moreau
2013-07-21 17:10         ` Martin Wilck

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=51E86646.8020107@arcor.de \
    --to=mwilck@arcor.de \
    --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).