Linux RAID subsystem development
 help / color / mirror / Atom feed
From: "bmoon" <bo@anthologysolutions.com>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: linux-raid@vger.kernel.org
Subject: Really need RESYNC at the time of RAID1&5 creation?
Date: Mon, 30 Jun 2003 14:34:51 -0700	[thread overview]
Message-ID: <00b901c33f4f$715be540$6401a8c0@bmoon> (raw)

Hi Neil & Raiders,

I am not quite sure if we really need to resync the array at the time of
RAID 1 or RAID 5 array creation. I tried and tested without RESYNC by
modifying "case1" and "case2" from MDADM source below, I could not notice
any problems or issues.

At the time of RAID creation and mke2fs, there is no valid data on the
array. It must be a file system's job to know about it.

So I want to know what is the reason for these codes(, and
what you experieced from without RESYNC.

Thanks,

Bo



------------------------------------------------------------------
The following code is from Create.c in mdadm tool.

/* If this is raid5, we want to configure the last active slot
* as missing, so that a reconstruct happens (faster than re-parity)
*/

if (force == 0 && level == 5 && first_missing >= raiddisks) {
insert_point = raiddisks-1;
sparedisks++;
array.active_disks--;
missing_disks++;                                    <----------------case1
}

/* Ok, lets try some ioctls */

array.level = level;
array.size = size;
array.raid_disks = raiddisks;

/* The kernel should *know* what md_minor we are dealing
* with, but it chooses to trust me instead. Sigh
*/

array.md_minor = 0;

if (fstat(mdfd, &stb)==0)
array.md_minor = MINOR(stb.st_rdev);
array.not_persistent = 0;

if (level == 5 && (insert_point < raiddisks || first_missing < raiddisks))
array.state = 1; /* clean, but one drive will be missing */
else
array.state = 0; /* not clean, but no errors */    <------------------case2


             reply	other threads:[~2003-06-30 21:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-30 21:34 bmoon [this message]
2003-06-30 22:03 ` Really need RESYNC at the time of RAID1&5 creation? Lars Marowsky-Bree
2003-06-30 22:11   ` Corey McGuire

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='00b901c33f4f$715be540$6401a8c0@bmoon' \
    --to=bo@anthologysolutions.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    /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