Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932195AbWHLJNN (ORCPT ); Sat, 12 Aug 2006 05:13:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751161AbWHLJNN (ORCPT ); Sat, 12 Aug 2006 05:13:13 -0400 Received: from lucidpixels.com ([66.45.37.187]:52906 "EHLO lucidpixels.com") by vger.kernel.org with ESMTP id S1751136AbWHLJNM (ORCPT ); Sat, 12 Aug 2006 05:13:12 -0400 Date: Sat, 12 Aug 2006 05:13:11 -0400 (EDT) From: Justin Piszcz X-X-Sender: jpiszcz@p34.internal.lan To: Chuck Ebbert <76306.1226@compuserve.com> cc: linux-raid , Neil Brown , linux-kernel Subject: Re: [bug?] raid1 integrity checking is broken on 2.6.18-rc4 In-Reply-To: <200608120252_MC3-1-C7DD-BA91@compuserve.com> Message-ID: References: <200608120252_MC3-1-C7DD-BA91@compuserve.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2165 Lines: 57 On Sat, 12 Aug 2006, Chuck Ebbert wrote: > Doing this on a raid1 array: > echo "check" >/sys/block/md0/md/sync_action > > On 2.6.16.27: > Activity lights on both mirrors show activity for a while, > then the array status prints on the console. > > On 2.6.18-rc4 + the below patch: > Drive activity light blinks once on one drive, then the > array status prints (obviously no checking takes place.) > > > Applied hotfix on 2.6.18-rc4: > > --- .prev/drivers/md/md.c 2006-08-08 09:00:44.000000000 +1000 > +++ ./drivers/md/md.c 2006-08-08 09:04:04.000000000 +1000 > @@ -1597,6 +1597,19 @@ void md_update_sb(mddev_t * mddev) > > repeat: > spin_lock_irq(&mddev->write_lock); > + > + if (mddev->degraded && mddev->sb_dirty == 3) > + /* If the array is degraded, then skipping spares is both > + * dangerous and fairly pointless. > + * Dangerous because a device that was removed from the array > + * might have a event_count that still looks up-to-date, > + * so it can be re-added without a resync. > + * Pointless because if there are any spares to skip, > + * then a recovery will happen and soon that array won't > + * be degraded any more and the spare can go back to sleep then. > + */ > + mddev->sb_dirty = 1; > + > sync_req = mddev->in_sync; > mddev->utime = get_seconds(); > if (mddev->sb_dirty == 3) > -- > Chuck > > - > 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 > Is there a doc for all of the options you can echo into the sync_action? I'm assuming mdadm does these as well and echo is just another way to run work with the array? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/