All of lore.kernel.org
 help / color / mirror / Atom feed
From: SandeepKsinha <sandeepksinha@gmail.com>
To: NeilBrown <neilb@suse.de>
Cc: lrhorer@satx.rr.com, Linux RAID <linux-raid@vger.kernel.org>
Subject: Re: Requesting replace mode for changing a disk
Date: Wed, 13 May 2009 11:01:43 +0530	[thread overview]
Message-ID: <37d33d830905122231p28e86b31y21ace4668d1697e7@mail.gmail.com> (raw)
In-Reply-To: <b9218ba81e2428201586f3d740e7ad2f.squirrel@neil.brown.name>

On Wed, May 13, 2009 at 10:51 AM, NeilBrown <neilb@suse.de> wrote:
> On Wed, May 13, 2009 3:07 pm, SandeepKsinha wrote:
>> On Wed, May 13, 2009 at 10:24 AM, Neil Brown <neilb@suse.de> wrote:
>>> On Wednesday May 13, sandeepksinha@gmail.com wrote:
>>>> Hi,
>>>>
>>>> On Wed, May 13, 2009 at 10:01 AM, Neil Brown <neilb@suse.de> wrote:
>>>> > On Tuesday May 12, lrhorer@satx.rr.com wrote:
>>>> >>
>>>> >> But doesn't creating the array with the drive wipe the contents?  If
>>>> so, it
>>>> >> doesn't seem to me this provides much redundancy.
>>>> >
>>>> > No.  Creating an array does not wipe the contents.
>>>> > It might cause a resync which will copy contents from one drive to
>>>> the
>>>> > other and I don't promise which one.
>>>> > However if you:
>>>> >
>>>> Now, my question is that what if I create a RAID1 with 100 disks on
>>>> each side.
>>>> Do you mean to say that there will be unnecessary resync happening
>>>> there as well, that too for unallocated/written data.
>>>
>>> I'm not sure what "100 disks on each side" means.
>>> Do you mean a raid1 across 100 devices?  i.e. 100 copies of each
>>> block?
>>>
>>
>> I meant we have two copies of 100 disks on each side of the mirror.
>> Sorry, I am not very sure how md would handle it but say, I created
>> two logical volumes of 100 disks and try to make a raid1 out of it.
>
> for example, two raid0 array, each out of 100 drives.  Then a raid1
> joining them.
> Yes, you could do that (though it would generally be better to create
> 100 raid1 pairs, and make a raid0 of them, but that is beside the point
> I think).
>
>>
>>> In any case, md has no concept of unallocated/written data.  Every
>>> block is potentially meaningful and needs to be copied for resync.
>>>
>>
>> So, while creation it is always guaranteed that a resync will always
>> happen. I believe this can be avoided by just adding some flags. The
>> user can specify its intention.
>
> You can get the resync not to happen by using the "--assume-clean"
> flag when you create the array.
> However that doesn't really save a lot and it will still have to do
> a complete copy if you ever fail a drive and replace it.
> So it is a small optimisation.
>
>
>>>>
>>>> If thats the case, we surely need to handle these two situations
>>>> differently (1) which neil mentioned (2) the one I mentioned above.
>>>>
>>>> Remember I referring to the case of creation.
>>>>
>>>> >   mdadm -C /dev/md0 --level 1 -n 2 /dev/foo missing
>>>> >   mdadm /dev/md0 --add /dev/bar
>>>> >
>>>> > then the contents on /dev/foo will not be changed (except for a few K
>>>> > at the end for the metadata) and then all of foo will be copied to
>>>> > bar.
>>>> >
>>>>
>>>> Will the create happen at the first place?
>>>
>>> I don't understand this question, sorry.
>>>
>> Actually I could not understand, what did you mean by "missing" in the
>> above line, which creates the array.
>
> Read the manpage for mdadm.
>
> The word "missing" means create the array without any device in this slot.
> It will be as though the device in that slot had failed and been removed.
>

Thanks but I am still confused. Here is what I see on the console.


[10:55:16 sinhas]$ sudo mdadm -C /dev/md0 --level 1 -n 2 /dev/sda5 missing
mdadm: /dev/sda5 appears to contain an ext2fs file system
    size=19535008K  mtime=Sun Apr  5 21:34:00 2009
mdadm: /dev/sda5 appears to be part of a raid array:
    level=raid1 devices=2 ctime=Wed May 13 10:06:33 2009
Continue creating array? y
mdadm: RUN_ARRAY failed: Invalid argument
mdadm: stopped /dev/md0

> NeilBrown
>
>



-- 
Regards,
Sandeep.





 	
“To learn is to change. Education is a process that changes the learner.”
--
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:[~2009-05-13  5:31 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-08 22:15 Requesting replace mode for changing a disk Goswin von Brederlow
2009-05-09 11:41 ` John Robinson
2009-05-09 23:07 ` Bill Davidsen
2009-05-10  1:22   ` Goswin von Brederlow
2009-05-10  2:20   ` Guy Watkins
2009-05-10  7:02     ` Goswin von Brederlow
2009-05-10 14:33     ` Bill Davidsen
2009-05-10 15:55       ` Guy Watkins
2009-05-13  1:21   ` Leslie Rhorer
2009-05-13  3:27     ` Goswin von Brederlow
2009-05-13  4:36       ` Neil Brown
2009-05-13  7:37         ` Goswin von Brederlow
2009-05-13 11:02           ` Neil Brown
2009-05-14 10:44         ` David Greaves
2009-05-14 12:00           ` Neil Brown
2009-05-13  4:31     ` Neil Brown
2009-05-13  4:37       ` SandeepKsinha
2009-05-13  4:54         ` Neil Brown
2009-05-13  5:07           ` SandeepKsinha
2009-05-13  5:21             ` NeilBrown
2009-05-13  5:31               ` SandeepKsinha [this message]
2009-05-13 10:51                 ` Neil Brown
2009-05-13  7:28       ` Goswin von Brederlow
2009-05-13  4:08 Sandeep K Sinha

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=37d33d830905122231p28e86b31y21ace4668d1697e7@mail.gmail.com \
    --to=sandeepksinha@gmail.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=lrhorer@satx.rr.com \
    --cc=neilb@suse.de \
    /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.