linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Albert Pauw <albert.pauw@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: mdadm ddf questions
Date: Thu, 3 Mar 2011 09:11:55 +1100	[thread overview]
Message-ID: <20110303091155.3d43314a@notabene.brown> (raw)
In-Reply-To: <4D5FA5C4.8030803@gmail.com>

On Sat, 19 Feb 2011 12:13:08 +0100 Albert Pauw <albert.pauw@gmail.com> wrote:

>   I have dabbed a bit with the standard raid1/raid5 sets and am just 
> diving into this whole ddf container stuff,
> and see how I can fail, remove and add a disk.
> 
> Here is what I have, Fedora 14, five 1GB Sata disks (they are virtual 
> disks under VirtualBox but it all seems
> to work well under the standard raid stuff. For mdadm I am using the 
> latest git version, with version nr 3.1.4.
> 
> I created a ddf container:
> 
> mdadm -C /dev/md/container -e ddf -l container -n 5 /dev/sd[b-f]
> 
> I now create a raid 5 set in this container:
> 
> mdadm -C /dev/md1 -l raid5 -n 5 /dev/md/container
> 
> This all seems to work, I also noticed that after a stop and start of 
> both the container and the raidset,
> the container has been renamed to /dev/md/ddf0 which points to /dev/md127.

That depends a bit on how you restart it.
The ddf metadata doesn't store a name for the array so if mdadm has to assign
a name it uses /dev/md/ddfNNN for some NNN.
If you list the array in /etc/mdadm.conf with the name you want, then mdadm
has a better chance of using that name.


> 
> I now fail one disk in the  raidset:
> 
> mdadm -f /dev/md1 /dev/sdc
> 
> I noticed that it is removed from the md1 raidset, and marked 
> online,failed in the container. So far so
> good. When I now stop the md1 array and start it again, it will be back
> again with all 5 disks, clean, no failure

This is not good.  I have created a fix and added it to my git tree: the
'master' branch of  git://neil.brown.name/mdadm


> although in the container the disk is marked failed. I then remove it 
> from the container:
> 
> mdadm -r /dev/md127 /dev/sdc
> 
> I clean the disk with mdadm --zero-superblock /dev/sdc and add it again.
> 
> But how do I add this disk again to the md1 raidset?

It should get added automatically.  'mdmon' runs in the background, notices
this sort of thing.  I just experimented and it didn't quite work as I
expected.  I'll have a closer look next week.

> 
> I see in the container that /dev/sdc is back, with status 
> "active/Online, Failed" and a new disk is added
> with no device file and status "Global-Spare/Online".
> 
> I am confused now.
> 
> So my question: how do I replace a faulty disk in a raidset, which is in 
> a ddf container?

You don't.  You just make sure the container has enough spares and mdmon will
sort things out ... or it will once I find and fix the bug.


> 
> Thanks and bare with me, I am relatively new to all this.
> 

Thanks for experimenting an reporting.

NeilBrown


  parent reply	other threads:[~2011-03-02 22:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-19 11:13 mdadm ddf questions Albert Pauw
2011-02-22  7:41 ` Albert Pauw
2011-02-23  6:17   ` NeilBrown
2011-02-25 17:53     ` Albert Pauw
2011-03-02 22:31       ` NeilBrown
2011-03-10  8:34         ` More ddf container woes Albert Pauw
2011-03-11 11:50           ` Albert Pauw
2011-03-14  8:02             ` NeilBrown
2011-03-14  9:00               ` Albert Pauw
2011-03-15  4:43                 ` NeilBrown
2011-03-15 19:07                   ` Albert Pauw
2011-03-02 22:26   ` mdadm ddf questions NeilBrown
2011-03-02 22:11 ` NeilBrown [this message]
2011-03-04  7:52   ` Albert Pauw

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=20110303091155.3d43314a@notabene.brown \
    --to=neilb@suse.de \
    --cc=albert.pauw@gmail.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).