From owner-freebsd-hackers@FreeBSD.ORG Sat Feb 26 12:57:15 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFB63106566C; Sat, 26 Feb 2011 12:57:15 +0000 (UTC) (envelope-from dnaeon@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 218D48FC0C; Sat, 26 Feb 2011 12:57:14 +0000 (UTC) Received: by wwb31 with SMTP id 31so3290177wwb.31 for ; Sat, 26 Feb 2011 04:57:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=TOdXdMepBF51gDF5sw8yntQLxmKpLvD/xYELnoP4pUs=; b=jpZHxjTwYiOHCGY1Kd+86y9QPz47xFmJv05czVzYb17DRl/YiBdYaTB2uGvl8r1FC+ IKbW3jYKmPoGpizyZ0lzALWC4L+GIG6AOmfaV10TGtbQXV5n9i2W8AarevvUVDoiH26z gQnXy2gL13HxOOYiK+Bz152Y1l1ul2RWSjlT0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=JO6jUIph2lb91xWy1CrDwvP5AgZ1o20PrKbCRrThR+B1fJR1l/ei5nEcIvaZhkJuaq U8UdrBVlyyywfqYiQcYzagqFylF49ZjWTfzbIox5dHR02u9QWWLKPMSaKQKDMr12svDR tbEuUnNhy1eTO6s4qzOHhIQjPwMsdII3bqUS0= MIME-Version: 1.0 Received: by 10.227.2.83 with SMTP id 19mr3138908wbi.115.1298723196690; Sat, 26 Feb 2011 04:26:36 -0800 (PST) Received: by 10.227.72.213 with HTTP; Sat, 26 Feb 2011 04:26:36 -0800 (PST) Date: Sat, 26 Feb 2011 14:26:36 +0200 Message-ID: From: Marin Atanasov Nikolov To: freebsd-stable@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: 8.2-RELEASE - gmirror and gpart issue. Metadata overlap? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Feb 2011 12:57:15 -0000 Hello, I updated a system from 8.1-RELEASE to 8.2-RELEASE today and now I'm having issues with gpart and gmirror. In the past I had two non-identical disks (one 250gb and one 750gb), which I wanted to create a mirror for them, so to do this, I gpart'ed them to equal sizes and then gmirror'ed them, without any issues. Of course that means that the rest 500gb of the bigger disk is not mirrored, but that wasn't a problem, since I was keeping non-important data there. Now I've got a second 750gb disk and updated to 8.2-RELEASE, and I wanted to create a full mirror of the two disks and the problems popped up. Hope you can help me a bit here. What I did is: 1. Backed up my system 2. Booted from FixIt image 3. Removed all previous partitions for gpart. 4. Did a gmirror for ad0 Fixit# gmirror label -vb round-robin gm0 /dev/ad0 5. gpart'ed the gm0 device, so I have gm0pN partitions 6. Restored everything from the backup to the gmirror'ed partitions 7. Reboot After a reboot I get this right before the FreeBSD bootloader starts: gptboot:=A0invalid GPT backup header I suppose this error simply means that gpart can't find it's backup header, because gmirror and gpart both are using the last sectors for a provider to write it's metadata. Which would mean that gmirror and gpart metadata overlap, and that's why I see this message? Anyway, I can still boot from the primary GPT header, and here's the second message I get during boot: GEOM: ad0: secondary GPT header is not in the last LBA. Why does GEOM reports ad0, and not mirror/gm0 as the provider? I've used the gmirror'ed device for gpart, not ad0. I still have another option, and that is to create partitions on the disks and then gmirror them, just like a did before without issues, and my explanation for this would be that gpart would use the last sectors of ad0 and ad1, while gmirror would use the last sectors of the partitions - ad0pN. That way I don't get any issues, but why when I want to create mirror of the whole disks I get this? Shouldn't gmirror and gpart store it's data on different sectors in that case? What would happen if I try to glabel the disks first, then gmirror and then gpart them? I guess I would mess up everything again. Should I go back to my previous setup with mirroring partitions, instead of disks? gpart now supports a `backup' option, so inserting a new disk in case of disk crash is just as simple as putting the new disk, restoring GPT tables from backup and putting the partitions in a mirror. Thanks for any feedback. Marin -- Marin Atanasov Nikolov dnaeon AT gmail DOT com daemon AT unix-heaven DOT org http://www.unix-heaven.org/