Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Nov 2010 02:34:35 -0800
From:      perryh@pluto.rain.com
To:        bu7cher@yandex.ru
Cc:        freebsd-geom@freebsd.org
Subject:   Re: G_PART macro definitions
Message-ID:  <4cf4d33b.G2KiL4ZkiXb4Fd9g%perryh@pluto.rain.com>
In-Reply-To: <4CF379E4.8060302@yandex.ru>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
"Andrey V. Elsukov" <bu7cher@yandex.ru> 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).



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4cf4d33b.G2KiL4ZkiXb4Fd9g%perryh>