All of lore.kernel.org
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: martin f krafft <madduck@madduck.net>
Cc: linux-raid mailing list <linux-raid@vger.kernel.org>
Subject: Re: [patch 3/4] fastboot: make the raid autodetect code wait for all devices to init
Date: Tue, 22 Jul 2008 09:24:36 +1000	[thread overview]
Message-ID: <18565.6836.784228.255912@notabene.brown> (raw)
In-Reply-To: message from martin f krafft on Monday July 21

On Monday July 21, madduck@madduck.net wrote:
> also sprach Neil Brown <neilb@suse.de> [2008.07.21.0106 +0200]:
> > The "real" solution here involves assembling arrays in userspace using
> > "mdadm --incremental" from udevd, and using write-intent-bitmaps so
> > that writing to an array before all the component devices are
> > available can be done without requiring a full resync.  There is still
> > a bit more code needed to make that work really smoothly.
> 
> It was my understanding that write-intent bitmaps slow down all
> operations and are not suggested on e.g. workstations. No?

Well, they don't slow down reads.
If you have a separate root filesystem (i.e. /home and /var are
elsewhere), it is likely to be read-mostly, so bitmaps probably won't
hurt much.
And an external bitmap on a dedicated device has minimal performance
cost.

However I neither suggest having nor not-having bitmaps.  The choice to
use them involves a trade-off which I cannot make for other people.

They would, however, be very useful to cover the gap when assembling
arrays incrementally.
If, for example, you have a 6 disk raid5 array and 5 disks have been
found, what do you do?  
  - wait for the 6th, that might never arrive
  - start degraded and if a write happens before the 6th disk arrives,
    have to rebuild the 6th disk completely.

Neither is a good option.
An alternate is
  - add an internal bitmap, and remove it after the 6th disk has
    arrived, or after we are sure there are no more disks to find.

Doing this means that if a recovery is needed when the 6th disk
arrives, it will be very fast.

It's not hard to notice that the bitmap proposed here does not need to
be on stable storage.  It is not protecting against a crash, just
against a window when the array is degraded.  So if we could support
bitmaps on a tmpfs, we could use an external bitmap in /tmp instead of
an internal bitmap.
Or even - we could enhance the md code to always use a bitmap, but
simply not write it to storage if no such was configured.

(If a crash happens during that window between writing to the degraded
array and recovering the few blocks needed on the final device, then
you would be in an unfortunate position.  For raid1/10 you would just
need a full resync, which you would have needed anyway, so no loss.
For raid4/5/6, you have a potential for dataloss, so I probably would
not make this behaviour the default for those levels...)

NeilBrown

  reply	other threads:[~2008-07-21 23:24 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080720151140.4aa7c682@infradead.org>
2008-07-20 22:12 ` [patch 1/4] fastboot: make fastboot a config option Arjan van de Ven
2008-07-30 15:23   ` Randy Dunlap
2008-07-31 10:53     ` Ingo Molnar
2008-07-20 22:13 ` [patch 2/4] fastboot: retry mounting the root fs if we can't find init Arjan van de Ven
2008-07-21  1:35   ` Daniel Walker
2008-07-20 22:13 ` [patch 3/4] fastboot: make the raid autodetect code wait for all devices to init Arjan van de Ven
2008-07-20 23:06   ` Neil Brown
2008-07-20 23:12     ` david
2008-07-20 23:19     ` Arjan van de Ven
2008-07-20 23:31     ` Arjan van de Ven
2008-07-21  4:30       ` Neil Brown
2008-07-20 21:33         ` Arjan van de Ven
2008-07-21 11:34     ` martin f krafft
2008-07-21 23:24       ` Neil Brown [this message]
2008-07-22 10:36         ` martin f krafft
2008-07-20 22:14 ` [patch 4/4] fastboot: remove "wait for all devices before mounting root" delay Arjan van de Ven

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=18565.6836.784228.255912@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=madduck@madduck.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.