From owner-freebsd-geom@FreeBSD.ORG Tue Nov 30 10:41:28 2010 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDCD2106564A for ; Tue, 30 Nov 2010 10:41:28 +0000 (UTC) (envelope-from perryh@pluto.rain.com) Received: from agora.rdrop.com (agora.rdrop.com [IPv6:2607:f678:1010::34]) by mx1.freebsd.org (Postfix) with ESMTP id 811118FC17 for ; Tue, 30 Nov 2010 10:41:28 +0000 (UTC) Received: from agora.rdrop.com (66@localhost [127.0.0.1]) by agora.rdrop.com (8.13.1/8.12.7) with ESMTP id oAUAfR1O001419 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 30 Nov 2010 02:41:27 -0800 (PST) (envelope-from perryh@pluto.rain.com) Received: (from uucp@localhost) by agora.rdrop.com (8.13.1/8.12.9/Submit) with UUCP id oAUAfRFN001417; Tue, 30 Nov 2010 02:41:27 -0800 (PST) Received: from fbsd61 by pluto.rain.com (4.1/SMI-4.1-pluto-M2060407) id AA11299; Tue, 30 Nov 10 02:34:56 PST Date: Tue, 30 Nov 2010 02:34:35 -0800 From: perryh@pluto.rain.com To: bu7cher@yandex.ru Message-Id: <4cf4d33b.G2KiL4ZkiXb4Fd9g%perryh@pluto.rain.com> References: <4cf21cd3.UbQ57eYkszW60Ww4%perryh@pluto.rain.com> <4CF34297.4070300@yandex.ru> <4cf35138.VleaJCYj4z5kd9WX%perryh@pluto.rain.com> <4CF35809.6050704@yandex.ru> <4cf367ff.58BO71PlaI7w0e4r%perryh@pluto.rain.com> <4CF379E4.8060302@yandex.ru> In-Reply-To: <4CF379E4.8060302@yandex.ru> User-Agent: nail 11.25 7/29/05 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-geom@freebsd.org Subject: Re: G_PART macro definitions X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2010 10:41:28 -0000 "Andrey V. Elsukov" wrote: > > I'm trying to figure out why my disk partitions are not being > > recognized correctly. There's a description of what I currently > > think is happening at > > http://lists.freebsd.org/pipermail/freebsd-questions/2010-November/224466.html > > Can you show detailed log of what you did (all commands with output)? Most of it is already in the archives :) Mirror creation http://lists.freebsd.org/pipermail/freebsd-questions/2010-September/221253.html Unexpected, and apparently bogus, messages from gmirror http://lists.freebsd.org/pipermail/freebsd-questions/2010-September/221283.html Journal creation, newfs, install (incl. /boot/loader.conf and /etc/fstab created before rebooting) http://lists.freebsd.org/pipermail/freebsd-geom/2010-November/004479.html but I think the essence of the problem can be reproduced without involving gjournal at all: 1. Slice & bsdlabel a disk, creating (for example) ad0s2a and ad0s2b. 2. Create a gmirror (gm0) with ad0s2a as its provider. 2a. Load gmirror.ko, if not already loaded, so that /dev/mirror/gm0 exists. 3. Bsdlabel gm0, creating gm0a, gm0d, gm0e; examine /dev/mirror and find them in existence. 4. Reboot, ensuring that gmirror.ko is loaded. After the reboot, we _should_ still have: /dev/ad0 /dev/ad0s1 /dev/ad0s2 /dev/ad0s2a /dev/ad0s2b /dev/mirror/gm0 /dev/mirror/gm0a /dev/mirror/gm0d /dev/mirror/gm0e but what I got was /dev/ad0 /dev/ad0s1 /dev/ad0s2 /dev/ad0s2a /dev/ad0s2d /dev/ad0s2e /dev/ad0s2b is missing, and the partitions that should be on /dev/mirror/gm0 show up as partitions of ad0s2 instead. I think Marcel Moolenaar is very likely correct that the confusion arises from the two bsdlabels appearing to be nested, but it's not yet clear how I _should_ go about partitioning the mirror, so as to avoid this while still enabling the loader to find the kernel (on a system whose BIOS is too old to understand GPT).