All of lore.kernel.org
 help / color / mirror / Atom feed
* Really need RESYNC at the time of RAID1&5 creation?
@ 2003-06-30 21:34 bmoon
  2003-06-30 22:03 ` Lars Marowsky-Bree
  0 siblings, 1 reply; 3+ messages in thread
From: bmoon @ 2003-06-30 21:34 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-raid

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Really need RESYNC at the time of RAID1&5 creation?
  2003-06-30 21:34 Really need RESYNC at the time of RAID1&5 creation? bmoon
@ 2003-06-30 22:03 ` Lars Marowsky-Bree
  2003-06-30 22:11   ` Corey McGuire
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Marowsky-Bree @ 2003-06-30 22:03 UTC (permalink / raw)
  To: bmoon, Neil Brown; +Cc: linux-raid

On 2003-06-30T14:34:51,
   bmoon <bo@anthologysolutions.com> said:

> 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.

It's necessary to ensure consistency of the RAID, so that later, you can
detect whether the RAID has scrambled some of your disk.

Otherwise, you'd never know whether it wouldn't still be an artifact
leftover from the creation of the array.

Another option would be a bitmap of used chunks so you could tell one
from the other, but that wouldn't make as much sense on a heavily used
array. So just initialize it once.


Sincerely,
    Lars Marowsky-Brée <lmb@suse.de>

-- 
SuSE Labs - Research & Development, SuSE Linux AG
  
"If anything can go wrong, it will." "Chance favors the prepared (mind)."
  -- Capt. Edward A. Murphy            -- Louis Pasteur
-
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Really need RESYNC at the time of RAID1&5 creation?
  2003-06-30 22:03 ` Lars Marowsky-Bree
@ 2003-06-30 22:11   ` Corey McGuire
  0 siblings, 0 replies; 3+ messages in thread
From: Corey McGuire @ 2003-06-30 22:11 UTC (permalink / raw)
  To: linux-raid


Just my 2 cents but were it not for the initial resync last week, I may
have never known that my RAID was shafted.

sure, once it synced, it took two hours, but that is a price I am willing
to pay...

*********** REPLY SEPARATOR  ***********

On 7/1/2003 at 12:03 AM Lars Marowsky-Bree wrote:

>On 2003-06-30T14:34:51,
>   bmoon <bo@anthologysolutions.com> said:
>
>> 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.
>
>It's necessary to ensure consistency of the RAID, so that later, you can
>detect whether the RAID has scrambled some of your disk.
>
>Otherwise, you'd never know whether it wouldn't still be an artifact
>leftover from the creation of the array.
>
>Another option would be a bitmap of used chunks so you could tell one
>from the other, but that wouldn't make as much sense on a heavily used
>array. So just initialize it once.
>
>
>Sincerely,
>    Lars Marowsky-Brée <lmb@suse.de>
>
>-- 
>SuSE Labs - Research & Development, SuSE Linux AG
>  
>"If anything can go wrong, it will." "Chance favors the prepared (mind)."
>  -- Capt. Edward A. Murphy            -- Louis Pasteur
>-
>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




/\/\/\/\/\/\ Nothing is foolproof to a talented fool. /\/\/\/\/\/\

coreyfro@coreyfro.com
http://www.coreyfro.com/
http://stats.distributed.net/rc5-64/psummary.php3?id=196879
ICQ : 3168059

-----BEGIN GEEK CODE BLOCK-----
GCS d--(+) s: a-- C++++$ UBL++>++++ P+ L+ E W+++$ N+ o? K? w++++$>+++++$
O---- !M--- V- PS+++ PE++(--) Y+ PGP- t--- 5(+) !X- R(+) !tv b-(+)
Dl++(++++) D++ G+ e>+++ h++(---) r++>+$ y++*>$ H++++ n---(----) p? !au w+
v- 3+>++ j- G'''' B--- u+++*** f* Quake++++>+++++$
------END GEEK CODE BLOCK------

Home of Geek Code - http://www.geekcode.com/
The Geek Code Decoder Page - http://www.ebb.org/ungeek//

-
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-06-30 22:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-30 21:34 Really need RESYNC at the time of RAID1&5 creation? bmoon
2003-06-30 22:03 ` Lars Marowsky-Bree
2003-06-30 22:11   ` Corey McGuire

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.