Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Jun 2009 10:38:53 +0100
From:      Anton Shterenlikht <mexas@bristol.ac.uk>
To:        Marcel Moolenaar <xcllnt@mac.com>
Cc:        freebsd-current@freebsd.org, freebsd-questions@freebsd.org, freebsd-ia64@freebsd.org
Subject:   Re: gmirror gm0 destroyed on shutdown; GPT corrupt
Message-ID:  <20090629093853.GA44061@mech-cluster238.men.bris.ac.uk>
In-Reply-To: <10FCC74D-6D46-4112-AD89-BBB4C5933957@mac.com>
References:  <20090625110253.GA31443@mech-cluster238.men.bris.ac.uk> <10FCC74D-6D46-4112-AD89-BBB4C5933957@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 25, 2009 at 09:41:13AM -0700, Marcel Moolenaar wrote:
> 
> On Jun 25, 2009, at 4:02 AM, Anton Shterenlikht wrote:
> > dev_taste(DEV,mirror/gm0)
> > g_part_taste(PART,mirror/gm0)
> >
> > GEOM: mirror/gm0: the secondary GPT table is corrupt or invalid.
> > GEOM: mirror/gm0: using the primary only -- recovery suggested.
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> You created the mirror after the GPT, which means you destroyed
> the GPT backup header. gmirror uses the last sector on the disk
> for metadata and that by itself is a cause for various problems.

So, gmirror cannot be used on ia64 to mirror the boot disk?

Because on ia64 the last sector always contains secondary GPT.
I take it the RAID1 section, 19.4, in FBSD user manual,
was written with i386 or alpha architecture in mind.

> It's better to use gmirror per partition.

how? Is it in the manual? any link?


> > #echo 'geom_mirror_load="YES"' >> /boot/loader.conf
> 
> Is /boot a symlink for /efi/boot?

yes,

lrwxr-xr-x   1 root  wheel         8 Jun 25 10:44 boot -> efi/boot


> > And when the system is rebooted, there is no /dev/mirror anymore.
> 
> You could run into a race condition between GPT and gmirror and
> GPT winning (again the result of gmirror using the last sector
> on a disk for metadata).
> 
> Alternatively, make sure gmirror got loaded at boot.

# kldstat
Id Refs Address            Size     Name
 1    3 0xe000000004000000 ff9c08   kernel
 2    1 0xe000000004ffa000 3c830    geom_mirror.ko
#

It's not that I desperately need to mirror a boot disk, it just that
gmirror looked so easy in the manual, I wanted to give it a go.

Perhaps I can just do a block copy to the second disk, say once a day,
and have it as a backup.

Could you also possibly comment on gvinum on ia64?

many thanks
anton

-- 
Anton Shterenlikht
Room 2.6, Queen's Building
Mech Eng Dept
Bristol University
University Walk, Bristol BS8 1TR, UK
Tel: +44 (0)117 928 8233 
Fax: +44 (0)117 929 4423



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090629093853.GA44061>