Skip to contentSkip to conversation

RAID1: no resync after crash?

DISCUSSION Mario Holbe 2 participants 2 messages Mar 18, 2005 – Mar 21, 2005 MD RAID

lore
Share & tools
lore
#0 lore raw

Hello,

I'm running several 3-mirror-RAID1s in degraded mode (2 out of 3 mirrors operational) on a 2.4.27 (Debian's kernel-source-2.4.27).

The machine crashed sometimes in the past and I was always wondering why the mirrors got not resynched after startup. I always did compare the mirrors and they had only 4 different octets near the end of the devices which I consider as normal superblock differences. Therefore, I assumed the resync not happening intentional.
However, I had a crash yesterday with no resync happenig again but comparing the mirrors showed up some more differences than just the 4 at the end. So I'm wondering if the missing resync is *really* intentional.

Is there perhaps some bug that denies a resync on a degraded RAID1 even if there is more than one mirror operational?

As I said - I'm running 2.4.27, so I have none of the new 2.6 features like superblocks marked clean while runtime and things like that.

regards
Mario

Signature · 3 lines
[mod_nessus for iauth]
<delta> "scanning your system...found depreciated OS...found
        hole...installing new OS...please reboot and reconnect now"
#1 lore raw
Quoted 4 lines · On Friday March 18, [email protected] wrote:

Is there perhaps some bug that denies a resync on a degraded RAID1 even if there is more than one mirror operational?

Yes :-(

The following patch might fix it...
I guess I should double check and submit something to Marcelo. Thanks for reporting this.

NeilBrown

### Diffstat output

 ./drivers/md/raid1.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)
drivers/md/raid1.c renamed from drivers/md/raid1.c~current~ +2 -1
diff ./drivers/md/raid1.c~current~ ./drivers/md/raid1.c
@@ -1737,10 +1737,11 @@ static int raid1_run (mddev_t *mddev)
 		}
 	}
 
-	if (!start_recovery && !(sb->state & (1 << MD_SB_CLEAN)) &&
+	if (!(sb->state & (1 << MD_SB_CLEAN)) &&
 	    (conf->working_disks > 1)) {
 		const char * name = "raid1syncd";
 
+		start_recovery = 0;
 		conf->resync_thread = md_register_thread(raid1syncd, conf,name);
 		if (!conf->resync_thread) {
 			printk(THREAD_ERROR, mdidx(mddev));