All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Chmielewski <mangoo@wpkg.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: replacing failed disks in RAID-1 (kernel BUG)?
Date: Mon, 13 Jul 2009 15:35:48 +0200	[thread overview]
Message-ID: <4A5B3834.1040003@wpkg.org> (raw)
In-Reply-To: <1247491413.19180.172.camel@macbook.infradead.org>

David Woodhouse wrote:
> On Mon, 2009-07-13 at 12:28 +0200, Tomasz Chmielewski wrote:
>> How do I replace failed disks in RAID-1 mode?
> 
> I don't think you can. In theory you can remove the broken one, and you
> can add a _new_ empty one -- I say 'in theory' because you seem to have
> demonstrated both of those actions failing.
> 
> But I don't believe we have yet implemented anything to let you
> _replace_ a failed disk and recreate its original contents.
> 
> I had that on my TODO list for some time after I get the basic RAID[56]
> operation working.

It would be also interesting to have a tool to monitor the state of the 
RAID (i.e. similar to what /proc/mdstat provides for md).


I also tried to compare what happens when we do writes to md-raid and to 
btrfs-raid (RAID-1 in both cases) and it looks... strange for btrfs. Or 
perhaps this is how RAID-1 works in btrfs?

I used iostat to monitor the writes on both devices.


With md RAID-1, when we do:

# dd if=/dev/zero of=/mnt/md-raid-1/testfile

and

# iostat -dk 1


We can see the write speed on both devices is more or less the same.


With btrfs RAID-1, when we do the same, I can see that writes go to one 
drive, while the second drive receives 0 kb/s writes; then it changes 
(one drive is written to, the second isn't). Only sometimes, writes 
happen concurrently to both drives, like with md RAID-1.

Is it intended?


-- 
Tomasz Chmielewski
http://wpkg.org

  reply	other threads:[~2009-07-13 13:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-13 10:28 replacing failed disks in RAID-1 (kernel BUG)? Tomasz Chmielewski
2009-07-13 13:23 ` David Woodhouse
2009-07-13 13:35   ` Tomasz Chmielewski [this message]
2009-07-14  3:54 ` Roger Bumgarner
2009-07-14  8:36   ` Tomasz Chmielewski
2009-07-14 17:27 ` Chris Mason
2009-07-14 17:29   ` Tomasz Chmielewski

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=4A5B3834.1040003@wpkg.org \
    --to=mangoo@wpkg.org \
    --cc=dwmw2@infradead.org \
    --cc=linux-btrfs@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 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.