From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KOwSF-0002Zc-IW for mharc-grub-devel@gnu.org; Fri, 01 Aug 2008 11:22:07 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KOwSD-0002XN-Kt for grub-devel@gnu.org; Fri, 01 Aug 2008 11:22:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KOwSA-0002Tv-U5 for grub-devel@gnu.org; Fri, 01 Aug 2008 11:22:05 -0400 Received: from [199.232.76.173] (port=38879 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KOwSA-0002Th-QJ for grub-devel@gnu.org; Fri, 01 Aug 2008 11:22:02 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:56962) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KOwSA-00019U-1o for grub-devel@gnu.org; Fri, 01 Aug 2008 11:22:02 -0400 Received: from [85.180.39.34] (e180039034.adsl.alicedsl.de [85.180.39.34]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1KOwS90vPa-0004xC; Fri, 01 Aug 2008 17:22:01 +0200 From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: <20080801133648.GA14359@thorin> References: <1217286307.4016.107.camel@fz-deb.local> <20080730103708.GA17771@thorin> <1217417950.6234.6.camel@fz-deb.local> <1217430684.6234.14.camel@fz-deb.local> <20080801133648.GA14359@thorin> Content-Type: text/plain Date: Fri, 01 Aug 2008 17:22:03 +0200 Message-Id: <1217604123.4354.18.camel@fz-deb.local> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX18hVXiP6GSj2oNbzI+sX8MWvCxMqFtInfquD7S cNsiIhdCF25s7tM9C1rv0xuqWQvq2R5BCUyHKcQEhLwTfdS98a MUrvHsGFfCwuv/DHrIGBaYy30mDLAbm X-detected-kernel: by monty-python.gnu.org: Linux 2.6? (barebone, rare!) Subject: Re: [PATCH] show an error instead of segfaulting on grub-probe -t partmap on a unsynced raid X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Aug 2008 15:22:05 -0000 Am Freitag, den 01.08.2008, 15:36 +0200 schrieb Robert Millan: > The existing code is confusing. What is total_devs for? If we need to > iterate up to 32, sounds like this variable is pointless? > > If it's useless, it should be removed (but maybe it isn't!). > total_devs is a fast check if the array is readable. On fully synced raids the disks should be always in linear continues order starting with 0 in the mdraid superblock. If I added the sdb1 back to the md0 then mdadm did reassemble them to 0 and 1 Whereas when I removed it then disk 1 was the working one and disk 2 the removed one. So at least for raid1 it's not safe to just check disk 0 if the array has only one device (which is totally legal on raid1) For raid0 you always must have a fully synced raid. On raid5 one disk can be missing, thanks to VMware and that I have enoug time I can find it out how it works with raid5 By the way, this 32 seems to be oversafe mdadm(8) says super 0.90 supports only 28 devices in one array With implementing super 1.X this will be a problem because mdadm(8) doestn't say any limit at all.