From owner-freebsd-stable@FreeBSD.ORG Mon Feb 28 17:31:24 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F36B1106567A for ; Mon, 28 Feb 2011 17:31:23 +0000 (UTC) (envelope-from dnaeon@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 8519C8FC20 for ; Mon, 28 Feb 2011 17:31:23 +0000 (UTC) Received: by wyb32 with SMTP id 32so4578062wyb.13 for ; Mon, 28 Feb 2011 09:31:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=vZrRhv6F6r0pGk1REoWxYHokRJm0hulQpvTI4g9B9jo=; b=w6a478CNcHpw7YvkjIl+6nNIuo1zGolFmfmsqUlzLdBAztYJEE4h7Qx3IngyA8QPXg Y0b21Mi/tkLhvFt45uh9ZeU4/5NGd8nWHbKTypJqFfX55TR1clFGOH/ytKz+hLO1gTxY g7itGkbUBBwxeXlvqQw8w0Hby4PCaRFsw1LNc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=aVROs/JgCJ2dvNnGSCP3Vx/AGDYmdxxXHIraFiVVFj9Jnzj1Wt0NCv4HXD3TUZf9/c Di1rzYs4hK31fVBmQjACXN+15BcX8htTij0PErjlN1h0JDqat3YyeR3fOm5N5VtaTHSP 2VyoI5jsMNMmED9XJxUYeIR/ebzE5CBXFULLM= MIME-Version: 1.0 Received: by 10.227.154.74 with SMTP id n10mr5145208wbw.116.1298914282394; Mon, 28 Feb 2011 09:31:22 -0800 (PST) Received: by 10.227.72.213 with HTTP; Mon, 28 Feb 2011 09:31:22 -0800 (PST) In-Reply-To: <4D6BD634.5070602@yandex.ru> References: <4D694336.3090203@yandex.ru> <57200BF94E69E54880C9BB1AF714BBCBDD318F@w2003s01.double-l.local> <4D6B96E4.1050709@yandex.ru> <4D6BD634.5070602@yandex.ru> Date: Mon, 28 Feb 2011 19:31:22 +0200 Message-ID: From: Marin Atanasov Nikolov To: "Andrey V. Elsukov" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Johan Hendriks , freebsd-stable@freebsd.org Subject: Re: 8.2-RELEASE - gmirror and gpart issue. Metadata overlap? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2011 17:31:24 -0000 @Johan Hendriks > As far as i know there is no warning anywhere that you can not use gpart > and gmirror the whole disk. Well, there is actually :) >From gpart(8): NOTE: The GEOM class PART can detect the same partition table on diffe= r- ent GEOM providers and some of them will marked as corrupt. Be careful when choising a provider for recovering. If you did incorrect choise y= ou can destroy metadata of another GEOM class, e.g. GEOM MIRROR or GEOM LABEL. @Cliffton Royston > I think this only ever worked accidentally at best. It would work > fine with the older fdisk-style disk partition because that doesn't > touch the end of the disk, but any time you tell two different programs > that they both have absolute control over the last sector on the disk > and can write critical data there - which is what this is doing - > that's begging for trouble. I think I've tried this with bsdlabel(8) and gmirror(8) some time ago, and didn't have any issues, but that of course should be because bsdlabel does not touch the last sectors, so gmirror would work. @Freddie Cash > The above process is operator error, as both your gpart and gmirror > commands are working on the same GEOM (ad0). You need to stack / > layer your GEOMs (ie, do one operation on the disk, the other > operations on the sub-parts). You are right. Typo mistake I made in my previous mail :) What you describe is what I actually did. gmirror'ed the disk, and then gpart'ed it. See my very first mail, for exact steps I made to do this. @Andrey V. Elsukov > What do you mean when you said 'gpart the first disk'? > gpart(8) is the default tool to make any type of partitions and > partition tables. The list of exact commands and at least a photo of > screen with the panic message will be good. Please check my first mail for all the details. I'm currently running the system with mirrored partitions, instead of disks= . I'll setup a test system as well in the following days and give you all the details of the steps, commands and output of them.. screenshot will be made as well :) Regards, Marin 2011/2/28 Andrey V. Elsukov : > On 28.02.2011 19:23, Marin Atanasov Nikolov wrote: >> I can confirm as well that I get kernel panic =A0if I gpart and then >> gmirror a disk on 8.2-RELEASE. >> >> To reproduce it, I just did the following: >> >> 1) Boot a system with a Fixit image >> 2) Remove all gpart partitions >> 3) gpart the first disk (ad0) >> 4) Restored my data to the partitions from backups >> 5) Reboot >> 6) gmirror the ad0 disk >> >> And that's where I got kernel panic. >> >> gpart'ing the disk and the mirroring the partitions works just as >> fine, but not when you mirror the whole disk. > > What do you mean when you said 'gpart the first disk'? > gpart(8) is the default tool to make any type of partitions and > partition tables. The list of exact commands and at least a photo of > screen with the panic message will be good. > > -- > WBR, Andrey V. Elsukov > > --=20 Marin Atanasov Nikolov dnaeon AT gmail DOT com daemon AT unix-heaven DOT org http://www.unix-heaven.org/